]> git.ipfire.org Git - thirdparty/glibc.git/blame - catgets/Makefile
Use $(run-program-prefix) in posix/globtest.sh.
[thirdparty/glibc.git] / catgets / Makefile
CommitLineData
57c69bef 1# Copyright (C) 1996-2012 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 14# You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
15# License along with the GNU C Library; if not, see
16# <http://www.gnu.org/licenses/>.
a641835a
RM
17
18#
19# Makefile for catgets.
20#
21subdir := catgets
22
23headers = nl_types.h
a641835a
RM
24routines = catgets open_catalog
25others = gencat
26install-bin = gencat
61eb22d3 27extra-objs = $(gencat-modules:=.o)
a641835a 28
04ba8790 29tests = tst-catgets
14d5391f 30test-srcs = test-gencat
04ba8790 31
a641835a
RM
32gencat-modules = xmalloc
33
34# To find xmalloc.c
35vpath %.c ../locale/programs
36
37
38include ../Rules
39
40$(objpfx)gencat: $(gencat-modules:%=$(objpfx)%.o)
41
33f5839f
UD
42catgets-CPPFLAGS := -DNLSPATH='"$(msgcatdir)/%L/%N:$(msgcatdir)/%L/LC_MESSAGES/%N:$(msgcatdir)/%l/%N:$(msgcatdir)/%l/LC_MESSAGES/%N:"' \
43 -DHAVE_CONFIG_H
3e300ca1 44
51d46f73
UD
45CPPFLAGS-gencat = -DNOT_IN_libc
46
c780aa21
UD
47generated = de.msg test1.cat test1.h test2.cat test2.h sample.SJIS.cat \
48 test-gencat.h
04ba8790
UD
49generated-dirs = de
50
51tst-catgets-ENV = NLSPATH="$(objpfx)%l/%N.cat" LANG=de
3e300ca1 52
ac72fbb1 53ifneq ($(cross-compiling),yes)
c780aa21
UD
54tests: $(objpfx)de/libc.cat $(objpfx)test1.cat $(objpfx)test2.cat \
55 $(objpfx)test-gencat.out
3e300ca1
UD
56# This test just checks whether the program produces any error or not.
57# The result is not tested.
646fffb9 58$(objpfx)test1.cat: test1.msg $(objpfx)gencat
d2defdc4
UD
59 LC_ALL=hr_HR.ISO-8859-2 LOCPATH=$(common-objpfx)localedata \
60 GCONV_PATH=$(common-objpfx)iconvdata \
646fffb9 61 $(built-program-cmd) -H $(objpfx)test1.h $@ $<
c780aa21
UD
62$(objpfx)test2.cat: test2.msg $(objpfx)gencat
63 LOCPATH=$(common-objpfx)localedata \
64 GCONV_PATH=$(common-objpfx)iconvdata \
65 $(built-program-cmd) -H $(objpfx)test2.h $@ $<
04ba8790 66$(objpfx)de/libc.cat: $(objpfx)de.msg $(objpfx)gencat
8719e0fd 67 $(make-target-directory)
d2defdc4
UD
68 LC_ALL=de_DE.ISO-8859-1 LOCPATH=$(common-objpfx)localedata \
69 GCONV_PATH=$(common-objpfx)iconvdata $(built-program-cmd) $@ $<
04ba8790 70$(objpfx)tst-catgets.out: $(objpfx)de/libc.cat
3e300ca1
UD
71
72# Generate a non-simple input file.
704bc459
AS
73$(objpfx)de.msg: xopen-msg.awk $(..)po/de.po
74 LC_ALL=C $(AWK) -f $^ $< > $@
14d5391f
UD
75
76$(objpfx)test-gencat.out: test-gencat.sh $(objpfx)test-gencat \
77 $(objpfx)sample.SJIS.cat
57c69bef 78 $(SHELL) $< $(common-objpfx) '$(built-program-cmd)'
14d5391f
UD
79
80$(objpfx)sample.SJIS.cat: sample.SJIS $(objpfx)gencat
81 GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
f79bdc33 82 $(built-program-cmd) -H $(objpfx)test-gencat.h < $(word 1,$^) > $@
ac72fbb1 83endif