]>
Commit | Line | Data |
---|---|---|
6eb95e99 ZW |
1 | # Makefile for directory with message catalog handling library of GNU gettext |
2 | # Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc. | |
3 | # | |
4 | # This program is free software; you can redistribute it and/or modify it | |
5 | # under the terms of the GNU Library General Public License as published | |
6 | # by the Free Software Foundation; either version 2, or (at your option) | |
7 | # any later version. | |
8 | # | |
9 | # This program 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 this program; if not, write to the Free Software | |
0e687cb4 | 16 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, |
6eb95e99 ZW |
17 | # USA. |
18 | ||
19 | # This Makefile has been modified from the original shipped with | |
20 | # gettext 0.12.1 to remove the ability to install libintl (which | |
21 | # we do not need nor want), the ability to build a shared library | |
22 | # (likewise), and a large number of heinous kludges. | |
23 | ||
88fa57d7 | 24 | SHELL = @SHELL@ |
6eb95e99 ZW |
25 | |
26 | srcdir = @srcdir@ | |
27 | VPATH = $(srcdir) | |
28 | ||
29 | prefix = @prefix@ | |
30 | exec_prefix = @exec_prefix@ | |
31 | transform = @program_transform_name@ | |
32 | libdir = @libdir@ | |
33 | includedir = @includedir@ | |
2d09b640 | 34 | datarootdir = @datarootdir@ |
6eb95e99 ZW |
35 | datadir = @datadir@ |
36 | localedir = $(datadir)/locale | |
6eb95e99 ZW |
37 | aliaspath = $(localedir) |
38 | ||
6eb95e99 | 39 | AR = ar |
88fa57d7 KC |
40 | ACLOCAL = @ACLOCAL@ |
41 | AUTOCONF = @AUTOCONF@ | |
42 | AUTOHEADER = @AUTOHEADER@ | |
6eb95e99 ZW |
43 | CC = @CC@ |
44 | RANLIB = @RANLIB@ | |
45 | YACC = @INTLBISON@ -y -d | |
46 | YFLAGS = --name-prefix=__gettext | |
47 | CPPFLAGS = @CPPFLAGS@ | |
48 | CFLAGS = @CFLAGS@ | |
49 | LDFLAGS = @LDFLAGS@ | |
50 | LIBS = @LIBS@ | |
51 | DEFS = -DHAVE_CONFIG_H | |
52 | ||
56694dd9 | 53 | COMPILE = $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFS) $(DEFS-$@) $(INCLUDES) |
6eb95e99 ZW |
54 | |
55 | HEADERS = \ | |
56 | gmo.h \ | |
57 | gettextP.h \ | |
58 | hash-string.h \ | |
59 | loadinfo.h \ | |
437eea66 | 60 | plural-config.h \ |
6eb95e99 ZW |
61 | plural-exp.h \ |
62 | eval-plural.h \ | |
63 | localcharset.h \ | |
64 | relocatable.h \ | |
56694dd9 | 65 | libgnuintl.h |
6eb95e99 ZW |
66 | SOURCES = \ |
67 | bindtextdom.c \ | |
68 | dcgettext.c \ | |
69 | dgettext.c \ | |
70 | gettext.c \ | |
71 | finddomain.c \ | |
72 | loadmsgcat.c \ | |
73 | localealias.c \ | |
74 | textdomain.c \ | |
75 | l10nflist.c \ | |
76 | explodename.c \ | |
77 | dcigettext.c \ | |
78 | dcngettext.c \ | |
79 | dngettext.c \ | |
80 | ngettext.c \ | |
81 | plural.y \ | |
82 | plural-exp.c \ | |
83 | localcharset.c \ | |
84 | relocatable.c \ | |
85 | localename.c \ | |
86 | log.c \ | |
87 | osdep.c \ | |
6eb95e99 ZW |
88 | intl-compat.c |
89 | OBJECTS = \ | |
90 | bindtextdom.o \ | |
91 | dcgettext.o \ | |
92 | dgettext.o \ | |
93 | gettext.o \ | |
94 | finddomain.o \ | |
95 | loadmsgcat.o \ | |
96 | localealias.o \ | |
97 | textdomain.o \ | |
98 | l10nflist.o \ | |
99 | explodename.o \ | |
100 | dcigettext.o \ | |
101 | dcngettext.o \ | |
102 | dngettext.o \ | |
103 | ngettext.o \ | |
104 | plural.o \ | |
105 | plural-exp.o \ | |
106 | localcharset.o \ | |
107 | relocatable.o \ | |
108 | localename.o \ | |
109 | log.o \ | |
110 | osdep.o \ | |
111 | intl-compat.o | |
112 | ||
56694dd9 ZW |
113 | DEFS-dcigettext.o = -DLOCALEDIR="\"$(localedir)\"" |
114 | DEFS-localealias.o = -DLOCALE_ALIAS_PATH="\"$(aliaspath)\"" | |
115 | DEFS-localcharset.o = -DLIBDIR="\"$(libdir)\"" | |
116 | DEFS-relocatable.o = -DINSTALLDIR="\"$(libdir)\"" | |
117 | ||
6eb95e99 | 118 | all: all-@USE_INCLUDED_LIBINTL@ |
56694dd9 | 119 | all-yes: libintl.a libintl.h config.intl |
6eb95e99 ZW |
120 | all-no: # nothing |
121 | ||
122 | libintl.a: $(OBJECTS) | |
123 | rm -f $@ | |
124 | $(AR) cru $@ $(OBJECTS) | |
125 | $(RANLIB) $@ | |
126 | ||
127 | libintl.h: $(srcdir)/libgnuintl.h | |
56694dd9 | 128 | cp $(srcdir)/libgnuintl.h $@ |
6eb95e99 ZW |
129 | |
130 | .SUFFIXES: | |
131 | .SUFFIXES: .c .y .o | |
132 | ||
133 | .c.o: | |
134 | $(COMPILE) $< | |
135 | ||
136 | .y.c: | |
437eea66 | 137 | @BISON3_YES@ echo '#define USE_BISON3' > $(patsubst %.c,%-config.h,$@) |
2ca17e0a JJ |
138 | @BISON3_YES@ sed 's,%pure_parser,,;s,^/\* BISON3 \(.*\) \*/$$,\1,' $< > $@.y |
139 | @BISON3_YES@ $(YACC) $(YFLAGS) --output $@.c $@.y | |
140 | @BISON3_YES@ sed 's/\.c\.y"/.y"/' $@.c > $@ | |
141 | @BISON3_YES@ rm -f $@.c $@.y $@.h | |
437eea66 | 142 | @BISON3_NO@ echo '/* #define USE_BISON3 */' > $(patsubst %.c,%-config.h,$@) |
2ca17e0a | 143 | @BISON3_NO@ $(YACC) $(YFLAGS) --output $@ $< |
6eb95e99 ZW |
144 | rm -f $*.h |
145 | ||
56694dd9 | 146 | INCLUDES = -I. -I$(srcdir) |
6eb95e99 ZW |
147 | |
148 | check: all | |
149 | ||
150 | # The installation targets have been disabled. | |
151 | install: install-exec install-data | |
152 | install-exec: all | |
153 | install-data: all | |
154 | install-strip: install | |
155 | installdirs: | |
156 | installcheck: | |
157 | uninstall: | |
158 | ||
1af3e54d DJ |
159 | .PHONY: info dvi ps pdf html |
160 | .PHONY: install-info install-dvi install-ps install-pdf install-html | |
e5fbdab9 | 161 | |
6eb95e99 | 162 | info dvi ps pdf html: |
1af3e54d | 163 | install-info install-dvi install-ps install-pdf install-html: |
6eb95e99 ZW |
164 | |
165 | $(OBJECTS): config.h libintl.h | |
166 | bindtextdom.o dcgettext.o dcigettext.o dcngettext.o dgettext.o \ | |
167 | dngettext.o finddomain.o gettext.o intl-compat.o loadmsgcat.o \ | |
168 | localealias.o ngettext.o textdomain.o: gettextP.h gmo.h loadinfo.h | |
169 | dcigettext.o loadmsgcat.o: hash-string.h | |
170 | explodename.o l10nflist.o: loadinfo.h | |
437eea66 | 171 | dcigettext.o loadmsgcat.o plural.o plural-exp.o: plural-exp.h plural-config.h |
6eb95e99 ZW |
172 | dcigettext.o: eval-plural.h |
173 | localcharset.o: localcharset.h | |
174 | localealias.o localcharset.o relocatable.o: relocatable.h | |
175 | ||
176 | tags: TAGS | |
6eb95e99 | 177 | TAGS: $(HEADERS) $(SOURCES) |
56694dd9 ZW |
178 | here=`pwd`; cd $(srcdir) && \ |
179 | etags -o $$here/TAGS $(HEADERS) $(SOURCES) | |
6eb95e99 ZW |
180 | |
181 | ctags: CTAGS | |
6eb95e99 | 182 | CTAGS: $(HEADERS) $(SOURCES) |
56694dd9 ZW |
183 | here=`pwd`; cd $(srcdir) && \ |
184 | ctags -o $$here/CTAGS $(HEADERS) $(SOURCES) | |
6eb95e99 ZW |
185 | |
186 | id: ID | |
6eb95e99 | 187 | ID: $(HEADERS) $(SOURCES) |
56694dd9 ZW |
188 | here=`pwd`; cd $(srcdir) && \ |
189 | mkid -f$$here/ID $(HEADERS) $(SOURCES) | |
6eb95e99 ZW |
190 | |
191 | mostlyclean: | |
56694dd9 | 192 | rm -f *.a *.la *.o *.obj *.lo core core.* libintl.h |
6eb95e99 ZW |
193 | |
194 | clean: mostlyclean | |
195 | ||
196 | distclean: clean | |
0d118786 | 197 | rm -f config.status config.cache config.log config.intl config.h |
6eb95e99 | 198 | rm -f Makefile ID TAGS |
6eb95e99 ZW |
199 | |
200 | maintainer-clean: distclean | |
201 | ||
202 | # The 'make dist' targets have been disabled; the GNU toolchain handles this | |
203 | # with a script maintained separately from the Makefile. | |
204 | dist: | |
205 | distdir: | |
206 | ||
88fa57d7 | 207 | # Rules to rebuild the configuration |
56694dd9 | 208 | |
88fa57d7 KC |
209 | Makefile: $(srcdir)/Makefile.in config.status |
210 | $(SHELL) ./config.status Makefile | |
6eb95e99 | 211 | |
1381bf1a | 212 | config.intl: $(srcdir)/config.intl.in config.status |
88fa57d7 | 213 | $(SHELL) ./config.status config.intl |
0d118786 | 214 | |
88fa57d7 KC |
215 | config.status: $(srcdir)/configure |
216 | $(SHELL) ./config.status --recheck | |
217 | ||
218 | $(srcdir)/configure: @MAINT@ $(srcdir)/aclocal.m4 $(srcdir)/configure.ac | |
219 | cd $(srcdir) && $(AUTOCONF) | |
220 | ||
6efbd53f RW |
221 | aclocal_deps = \ |
222 | $(srcdir)/configure.ac \ | |
223 | $(srcdir)/../config/codeset.m4 \ | |
224 | $(srcdir)/../config/gettext.m4 \ | |
225 | $(srcdir)/../config/glibc21.m4 \ | |
226 | $(srcdir)/../config/iconv.m4 \ | |
227 | $(srcdir)/../config/intdiv0.m4 \ | |
228 | $(srcdir)/../config/inttypes-pri.m4 \ | |
229 | $(srcdir)/../config/inttypes.m4 \ | |
230 | $(srcdir)/../config/inttypes_h.m4 \ | |
231 | $(srcdir)/../config/lcmessage.m4 \ | |
232 | $(srcdir)/../config/lib-ld.m4 \ | |
233 | $(srcdir)/../config/lib-link.m4 \ | |
234 | $(srcdir)/../config/lib-prefix.m4 \ | |
235 | $(srcdir)/../config/nls.m4 \ | |
236 | $(srcdir)/../config/po.m4 \ | |
237 | $(srcdir)/../config/progtest.m4 \ | |
238 | $(srcdir)/../config/stdint_h.m4 \ | |
239 | $(srcdir)/../config/uintmax_t.m4 \ | |
240 | $(srcdir)/../config/ulonglong.m4 | |
241 | ||
242 | $(srcdir)/aclocal.m4: @MAINT@ $(aclocal_deps) | |
88fa57d7 KC |
243 | cd $(srcdir) && $(ACLOCAL) -I ../config |
244 | ||
245 | config.h: stamp-h1 | |
246 | test -f config.h || (rm -f stamp-h1 && $(MAKE) stamp-h1) | |
247 | ||
437eea66 JJ |
248 | plural-config.h: plural.c |
249 | ||
1381bf1a | 250 | stamp-h1: $(srcdir)/config.h.in config.status |
88fa57d7 KC |
251 | -rm -f stamp-h1 |
252 | $(SHELL) ./config.status config.h | |
253 | ||
1381bf1a | 254 | $(srcdir)/config.h.in: @MAINT@ $(srcdir)/aclocal.m4 $(srcdir)/configure.ac |
88fa57d7 KC |
255 | cd $(srcdir) && $(AUTOHEADER) |
256 | -rm -f stamp-h1 | |
6eb95e99 ZW |
257 | |
258 | # Tell versions [3.59,3.63) of GNU make not to export all variables. | |
259 | # Otherwise a system limit (for SysV at least) may be exceeded. | |
260 | .NOEXPORT: |