]>
Commit | Line | Data |
---|---|---|
c780aa21 | 1 | # Copyright (C) 1996-2000, 2002, 2003 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 | |
41bdb6e2 AJ |
5 | # modify it under the terms of the GNU Lesser General Public |
6 | # License as published by the Free Software Foundation; either | |
7 | # version 2.1 of the License, or (at your option) any later version. | |
a641835a RM |
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 | |
41bdb6e2 | 12 | # Lesser General Public License for more details. |
a641835a | 13 | |
41bdb6e2 AJ |
14 | # You should have received a copy of the GNU Lesser General Public |
15 | # License along with the GNU C Library; if not, write to the Free | |
16 | # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | |
17 | # 02111-1307 USA. | |
a641835a RM |
18 | |
19 | # | |
20 | # Makefile for catgets. | |
21 | # | |
22 | subdir := catgets | |
23 | ||
24 | headers = nl_types.h | |
c780aa21 | 25 | distribute = catgetsinfo.h config.h xopen-msg.sed test1.msg test2.msg \ |
14d5391f | 26 | test-gencat.sh sample.SJIS |
a641835a RM |
27 | routines = catgets open_catalog |
28 | others = gencat | |
29 | install-bin = gencat | |
61eb22d3 | 30 | extra-objs = $(gencat-modules:=.o) |
a641835a | 31 | |
04ba8790 | 32 | tests = tst-catgets |
14d5391f | 33 | test-srcs = test-gencat |
04ba8790 | 34 | |
a641835a RM |
35 | gencat-modules = xmalloc |
36 | ||
37 | # To find xmalloc.c | |
38 | vpath %.c ../locale/programs | |
39 | ||
40 | ||
41 | include ../Rules | |
42 | ||
43 | $(objpfx)gencat: $(gencat-modules:%=$(objpfx)%.o) | |
44 | ||
33f5839f UD |
45 | catgets-CPPFLAGS := -DNLSPATH='"$(msgcatdir)/%L/%N:$(msgcatdir)/%L/LC_MESSAGES/%N:$(msgcatdir)/%l/%N:$(msgcatdir)/%l/LC_MESSAGES/%N:"' \ |
46 | -DHAVE_CONFIG_H | |
3e300ca1 | 47 | |
51d46f73 UD |
48 | CPPFLAGS-gencat = -DNOT_IN_libc |
49 | ||
c780aa21 UD |
50 | generated = de.msg test1.cat test1.h test2.cat test2.h sample.SJIS.cat \ |
51 | test-gencat.h | |
04ba8790 UD |
52 | generated-dirs = de |
53 | ||
54 | tst-catgets-ENV = NLSPATH="$(objpfx)%l/%N.cat" LANG=de | |
3e300ca1 | 55 | |
ac72fbb1 | 56 | ifneq ($(cross-compiling),yes) |
c780aa21 UD |
57 | tests: $(objpfx)de/libc.cat $(objpfx)test1.cat $(objpfx)test2.cat \ |
58 | $(objpfx)test-gencat.out | |
3e300ca1 UD |
59 | # This test just checks whether the program produces any error or not. |
60 | # The result is not tested. | |
646fffb9 | 61 | $(objpfx)test1.cat: test1.msg $(objpfx)gencat |
d2defdc4 UD |
62 | LC_ALL=hr_HR.ISO-8859-2 LOCPATH=$(common-objpfx)localedata \ |
63 | GCONV_PATH=$(common-objpfx)iconvdata \ | |
646fffb9 | 64 | $(built-program-cmd) -H $(objpfx)test1.h $@ $< |
c780aa21 UD |
65 | $(objpfx)test2.cat: test2.msg $(objpfx)gencat |
66 | LOCPATH=$(common-objpfx)localedata \ | |
67 | GCONV_PATH=$(common-objpfx)iconvdata \ | |
68 | $(built-program-cmd) -H $(objpfx)test2.h $@ $< | |
04ba8790 | 69 | $(objpfx)de/libc.cat: $(objpfx)de.msg $(objpfx)gencat |
8719e0fd | 70 | $(make-target-directory) |
d2defdc4 UD |
71 | LC_ALL=de_DE.ISO-8859-1 LOCPATH=$(common-objpfx)localedata \ |
72 | GCONV_PATH=$(common-objpfx)iconvdata $(built-program-cmd) $@ $< | |
04ba8790 | 73 | $(objpfx)tst-catgets.out: $(objpfx)de/libc.cat |
3e300ca1 UD |
74 | |
75 | # Generate a non-simple input file. | |
7e7a548e | 76 | $(objpfx)de.msg: $(..)po/de.po |
3e300ca1 | 77 | sed -f xopen-msg.sed $< > $@ |
14d5391f UD |
78 | |
79 | $(objpfx)test-gencat.out: test-gencat.sh $(objpfx)test-gencat \ | |
80 | $(objpfx)sample.SJIS.cat | |
81 | $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)' | |
82 | ||
83 | $(objpfx)sample.SJIS.cat: sample.SJIS $(objpfx)gencat | |
84 | GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \ | |
f79bdc33 | 85 | $(built-program-cmd) -H $(objpfx)test-gencat.h < $(word 1,$^) > $@ |
ac72fbb1 | 86 | endif |