Replace FSF snail mail address with URLs.
[glibc.git] / catgets / Makefile
blob9e308c50cf5b8d2ec5d45092ef455fd088044492
1 # Copyright (C) 1996-2000, 2002, 2003, 2004 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
4 # The GNU C Library is free software; you can redistribute it and/or
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.
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 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library; if not, see
16 # <http://www.gnu.org/licenses/>.
19 # Makefile for catgets.
21 subdir := catgets
23 headers = nl_types.h
24 distribute = catgetsinfo.h config.h xopen-msg.sed test1.msg test2.msg \
25 test-gencat.sh sample.SJIS
26 routines = catgets open_catalog
27 others = gencat
28 install-bin = gencat
29 extra-objs = $(gencat-modules:=.o)
31 tests = tst-catgets
32 test-srcs = test-gencat
34 gencat-modules = xmalloc
36 # To find xmalloc.c
37 vpath %.c ../locale/programs
40 include ../Rules
42 $(objpfx)gencat: $(gencat-modules:%=$(objpfx)%.o)
44 catgets-CPPFLAGS := -DNLSPATH='"$(msgcatdir)/%L/%N:$(msgcatdir)/%L/LC_MESSAGES/%N:$(msgcatdir)/%l/%N:$(msgcatdir)/%l/LC_MESSAGES/%N:"' \
45 -DHAVE_CONFIG_H
47 CPPFLAGS-gencat = -DNOT_IN_libc
49 generated = de.msg test1.cat test1.h test2.cat test2.h sample.SJIS.cat \
50 test-gencat.h
51 generated-dirs = de
53 tst-catgets-ENV = NLSPATH="$(objpfx)%l/%N.cat" LANG=de
55 ifneq ($(cross-compiling),yes)
56 tests: $(objpfx)de/libc.cat $(objpfx)test1.cat $(objpfx)test2.cat \
57 $(objpfx)test-gencat.out
58 # This test just checks whether the program produces any error or not.
59 # The result is not tested.
60 $(objpfx)test1.cat: test1.msg $(objpfx)gencat
61 LC_ALL=hr_HR.ISO-8859-2 LOCPATH=$(common-objpfx)localedata \
62 GCONV_PATH=$(common-objpfx)iconvdata \
63 $(built-program-cmd) -H $(objpfx)test1.h $@ $<
64 $(objpfx)test2.cat: test2.msg $(objpfx)gencat
65 LOCPATH=$(common-objpfx)localedata \
66 GCONV_PATH=$(common-objpfx)iconvdata \
67 $(built-program-cmd) -H $(objpfx)test2.h $@ $<
68 $(objpfx)de/libc.cat: $(objpfx)de.msg $(objpfx)gencat
69 $(make-target-directory)
70 LC_ALL=de_DE.ISO-8859-1 LOCPATH=$(common-objpfx)localedata \
71 GCONV_PATH=$(common-objpfx)iconvdata $(built-program-cmd) $@ $<
72 $(objpfx)tst-catgets.out: $(objpfx)de/libc.cat
74 # Generate a non-simple input file.
75 $(objpfx)de.msg: $(..)po/de.po
76 LC_ALL=C sed -f xopen-msg.sed $< > $@
78 $(objpfx)test-gencat.out: test-gencat.sh $(objpfx)test-gencat \
79 $(objpfx)sample.SJIS.cat
80 $(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)'
82 $(objpfx)sample.SJIS.cat: sample.SJIS $(objpfx)gencat
83 GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
84 $(built-program-cmd) -H $(objpfx)test-gencat.h < $(word 1,$^) > $@
85 endif