]>
Commit | Line | Data |
---|---|---|
33f5839f | 1 | # Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. |
a641835a RM |
2 | # This file is part of the GNU C Library. |
3 | ||
4 | # The GNU C Library is free software; you can redistribute it and/or | |
5 | # modify it under the terms of the GNU Library General Public License as | |
6 | # published by the Free Software Foundation; either version 2 of the | |
7 | # License, or (at your option) any later version. | |
8 | ||
9 | # The GNU C Library is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
12 | # Library General Public License for more details. | |
13 | ||
14 | # You should have received a copy of the GNU Library General Public | |
15 | # License along with the GNU C Library; see the file COPYING.LIB. If | |
16 | # not, write to the Free Software Foundation, Inc., | |
17 | # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
18 | ||
19 | # | |
20 | # Makefile for catgets. | |
21 | # | |
22 | subdir := catgets | |
23 | ||
24 | headers = nl_types.h | |
646fffb9 | 25 | distribute = catgetsinfo.h config.h xopen-msg.sed test1.msg |
a641835a RM |
26 | routines = catgets open_catalog |
27 | others = gencat | |
28 | install-bin = gencat | |
61eb22d3 | 29 | extra-objs = $(gencat-modules:=.o) |
a641835a | 30 | |
04ba8790 UD |
31 | tests = tst-catgets |
32 | ||
a641835a RM |
33 | gencat-modules = xmalloc |
34 | ||
35 | # To find xmalloc.c | |
36 | vpath %.c ../locale/programs | |
37 | ||
38 | ||
39 | include ../Rules | |
40 | ||
41 | $(objpfx)gencat: $(gencat-modules:%=$(objpfx)%.o) | |
42 | ||
33f5839f UD |
43 | catgets-CPPFLAGS := -DNLSPATH='"$(msgcatdir)/%L/%N:$(msgcatdir)/%L/LC_MESSAGES/%N:$(msgcatdir)/%l/%N:$(msgcatdir)/%l/LC_MESSAGES/%N:"' \ |
44 | -DHAVE_CONFIG_H | |
3e300ca1 | 45 | |
04ba8790 UD |
46 | generated = de.msg test1.cat test1.h |
47 | generated-dirs = de | |
48 | ||
49 | tst-catgets-ENV = NLSPATH="$(objpfx)%l/%N.cat" LANG=de | |
3e300ca1 | 50 | |
ac72fbb1 | 51 | ifneq ($(cross-compiling),yes) |
04ba8790 | 52 | tests: $(objpfx)de/libc.cat $(objpfx)test1.cat |
3e300ca1 UD |
53 | # This test just checks whether the program produces any error or not. |
54 | # The result is not tested. | |
646fffb9 UD |
55 | $(objpfx)test1.cat: test1.msg $(objpfx)gencat |
56 | $(built-program-cmd) -H $(objpfx)test1.h $@ $< | |
04ba8790 UD |
57 | $(objpfx)de/libc.cat: $(objpfx)de.msg $(objpfx)gencat |
58 | -mkdir $(objpfx)de | |
7e7a548e | 59 | $(built-program-cmd) $@ $< |
04ba8790 | 60 | $(objpfx)tst-catgets.out: $(objpfx)de/libc.cat |
3e300ca1 UD |
61 | |
62 | # Generate a non-simple input file. | |
7e7a548e | 63 | $(objpfx)de.msg: $(..)po/de.po |
3e300ca1 | 64 | sed -f xopen-msg.sed $< > $@ |
ac72fbb1 | 65 | endif |