1 # Makefile for directory with message catalog handling library of GNU gettext
2 # Copyright (C) 1995-1998, 2000-2005 Free Software Foundation, Inc.
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)
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.
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
16 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
25 top_srcdir
= @top_srcdir@
30 exec_prefix = @
exec_prefix@
31 transform
= @program_transform_name@
33 includedir = @
includedir@
35 datarootdir
= @datarootdir@
36 localedir
= $(datadir)/locale
37 gettextsrcdir
= $(datadir)/gettext
/intl
38 aliaspath
= $(localedir
)
42 INSTALL_DATA
= @INSTALL_DATA@
43 MKINSTALLDIRS
= @MKINSTALLDIRS@
44 mkinstalldirs
= $(SHELL
) $(MKINSTALLDIRS
)
46 l
= @INTL_LIBTOOL_SUFFIX_PREFIX@
52 YACC
= @INTLBISON@
-y
-d
53 YFLAGS
= --name-prefix
=__gettext
55 DEFS
= -DLOCALEDIR
=\"$(localedir
)\" -DLOCALE_ALIAS_PATH
=\"$(aliaspath
)\" \
56 -DLIBDIR
=\"$(libdir)\" -DIN_LIBINTL \
57 -DENABLE_RELOCATABLE
=1 -DIN_LIBRARY
-DINSTALLDIR
=\"$(libdir)\" -DNO_XMALLOC \
58 -Dset_relocation_prefix
=libintl_set_relocation_prefix \
59 -Drelocate
=libintl_relocate \
60 -DDEPENDS_ON_LIBICONV
=1 @DEFS@
66 COMPILE
= $(CC
) -c
$(DEFS
) $(INCLUDES
) $(CPPFLAGS
) $(CFLAGS
) $(XCFLAGS
)
78 printf-args.h printf-args.c \
79 printf-parse.h wprintf-parse.h printf-parse.c \
80 vasnprintf.h vasnwprintf.h vasnprintf.c \
134 DISTFILES.common
= Makefile.in \
135 config.charset locale.alias ref-add.sin ref-del.sin
$(HEADERS
) $(SOURCES
)
136 DISTFILES.generated
= plural.c
137 DISTFILES.normal
= VERSION
138 DISTFILES.gettext
= COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \
139 libgnuintl.h_vms Makefile.vms \
140 libgnuintl.h.msvc-static libgnuintl.h.msvc-shared README.woe32 Makefile.msvc
141 DISTFILES.obsolete
= xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
142 COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h
144 all: all-@USE_INCLUDED_LIBINTL@
145 all-yes
: libintl.
$la libintl.h charset.alias ref-add.sed ref-del.sed
146 all-no
: all-no-@BUILD_INCLUDED_LIBINTL@
147 all-no-yes
: libgnuintl.
$la
150 libintl.a libgnuintl.a
: $(OBJECTS
)
152 $(AR
) cru
$@
$(OBJECTS
)
155 libintl.la libgnuintl.la
: $(OBJECTS
)
156 $(LIBTOOL
) --mode
=link \
157 $(CC
) $(CPPFLAGS
) $(CFLAGS
) $(XCFLAGS
) $(LDFLAGS
) -o
$@ \
158 $(OBJECTS
) @LTLIBICONV@ @INTL_MACOSX_LIBS@
$(LIBS
) -lc \
159 -version-info
$(LTV_CURRENT
):$(LTV_REVISION
):$(LTV_AGE
) \
163 # Libtool's library version information for libintl.
164 # Before making a gettext release, the gettext maintainer must change this
165 # according to the libtool documentation, section "Library interface versions".
166 # Maintainers of other packages that include the intl directory must *not*
167 # change these values.
173 .SUFFIXES
: .c .y .o .lo .sin .sed
179 $(YACC
) $(YFLAGS
) --output
$@
$<
182 bindtextdom.lo
: $(srcdir)/bindtextdom.c
183 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/bindtextdom.c
184 dcgettext.lo
: $(srcdir)/dcgettext.c
185 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/dcgettext.c
186 dgettext.lo
: $(srcdir)/dgettext.c
187 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/dgettext.c
188 gettext.lo
: $(srcdir)/gettext.c
189 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/gettext.c
190 finddomain.lo
: $(srcdir)/finddomain.c
191 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/finddomain.c
192 loadmsgcat.lo
: $(srcdir)/loadmsgcat.c
193 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/loadmsgcat.c
194 localealias.lo
: $(srcdir)/localealias.c
195 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/localealias.c
196 textdomain.lo
: $(srcdir)/textdomain.c
197 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/textdomain.c
198 l10nflist.lo
: $(srcdir)/l10nflist.c
199 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/l10nflist.c
200 explodename.lo
: $(srcdir)/explodename.c
201 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/explodename.c
202 dcigettext.lo
: $(srcdir)/dcigettext.c
203 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/dcigettext.c
204 dcngettext.lo
: $(srcdir)/dcngettext.c
205 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/dcngettext.c
206 dngettext.lo
: $(srcdir)/dngettext.c
207 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/dngettext.c
208 ngettext.lo
: $(srcdir)/ngettext.c
209 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/ngettext.c
210 plural.lo
: $(srcdir)/plural.c
211 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/plural.c
212 plural-exp.lo
: $(srcdir)/plural-exp.c
213 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/plural-exp.c
214 localcharset.lo
: $(srcdir)/localcharset.c
215 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/localcharset.c
216 relocatable.lo
: $(srcdir)/relocatable.c
217 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/relocatable.c
218 langprefs.lo
: $(srcdir)/langprefs.c
219 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/langprefs.c
220 localename.lo
: $(srcdir)/localename.c
221 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/localename.c
222 log.lo
: $(srcdir)/log.c
223 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/log.c
224 printf.lo
: $(srcdir)/printf.c
225 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/printf.c
226 osdep.lo
: $(srcdir)/osdep.c
227 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/osdep.c
228 intl-compat.lo
: $(srcdir)/intl-compat.c
229 $(LIBTOOL
) --mode
=compile
$(COMPILE
) $(srcdir)/intl-compat.c
231 ref-add.sed
: $(srcdir)/ref-add.sin
232 sed
-e
'/^#/d' -e
's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin
> t-ref-add.sed
233 mv t-ref-add.sed ref-add.sed
234 ref-del.sed
: $(srcdir)/ref-del.sin
235 sed
-e
'/^#/d' -e
's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin
> t-ref-del.sed
236 mv t-ref-del.sed ref-del.sed
238 INCLUDES
= -I.
-I
$(srcdir) -I..
240 libgnuintl.h
: $(srcdir)/libgnuintl.h.in
241 sed
-e
's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \
242 -e
's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
243 -e
's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
244 -e
's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
245 < $(srcdir)/libgnuintl.h.in
> libgnuintl.h
247 libintl.h
: libgnuintl.h
248 cp libgnuintl.h libintl.h
250 charset.alias
: $(srcdir)/config.charset
251 $(SHELL
) $(srcdir)/config.charset
'@host@' > t-
$@
256 # We must not install the libintl.h/libintl.a files if we are on a
257 # system which has the GNU gettext() function in its C library or in a
259 # If you want to use the one which comes with this version of the
260 # package, you have to use `configure --with-included-gettext'.
261 install: install-exec install-data
263 if
{ test "$(PACKAGE)" = "gettext-runtime" ||
test "$(PACKAGE)" = "gettext-tools"; } \
264 && test '@USE_INCLUDED_LIBINTL@' = yes
; then \
265 $(mkinstalldirs
) $(DESTDIR
)$(libdir) $(DESTDIR
)$(includedir); \
266 $(INSTALL_DATA
) libintl.h
$(DESTDIR
)$(includedir)/libintl.h
; \
267 $(LIBTOOL
) --mode
=install \
268 $(INSTALL_DATA
) libintl.
$la $(DESTDIR
)$(libdir)/libintl.
$la; \
269 if
test "@RELOCATABLE@" = yes
; then \
270 dependencies
=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \
271 if
test -n
"$$dependencies"; then \
272 rm -f
$(DESTDIR
)$(libdir)/libintl.la
; \
278 if
test "$(PACKAGE)" = "gettext-tools" \
279 && test '@USE_INCLUDED_LIBINTL@' = no \
280 && test @GLIBC2@
!= no
; then \
281 $(mkinstalldirs
) $(DESTDIR
)$(libdir); \
282 $(LIBTOOL
) --mode
=install \
283 $(INSTALL_DATA
) libgnuintl.
$la $(DESTDIR
)$(libdir)/libgnuintl.
$la; \
284 rm -f
$(DESTDIR
)$(libdir)/preloadable_libintl.so
; \
285 $(INSTALL_DATA
) $(DESTDIR
)$(libdir)/libgnuintl.so
$(DESTDIR
)$(libdir)/preloadable_libintl.so
; \
286 $(LIBTOOL
) --mode
=uninstall \
287 rm -f
$(DESTDIR
)$(libdir)/libgnuintl.
$la; \
291 if
test '@USE_INCLUDED_LIBINTL@' = yes
; then \
292 test @GLIBC21@
!= no ||
$(mkinstalldirs
) $(DESTDIR
)$(libdir); \
293 temp
=$(DESTDIR
)$(libdir)/t-charset.alias
; \
294 dest
=$(DESTDIR
)$(libdir)/charset.alias
; \
295 if
test -f
$(DESTDIR
)$(libdir)/charset.alias
; then \
296 orig
=$(DESTDIR
)$(libdir)/charset.alias
; \
297 sed
-f ref-add.sed
$$orig > $$temp; \
298 $(INSTALL_DATA
) $$temp $$dest; \
301 if
test @GLIBC21@
= no
; then \
302 orig
=charset.alias
; \
303 sed
-f ref-add.sed
$$orig > $$temp; \
304 $(INSTALL_DATA
) $$temp $$dest; \
308 $(mkinstalldirs
) $(DESTDIR
)$(localedir
); \
309 test -f
$(DESTDIR
)$(localedir
)/locale.alias \
310 && orig
=$(DESTDIR
)$(localedir
)/locale.alias \
311 || orig
=$(srcdir)/locale.alias
; \
312 temp
=$(DESTDIR
)$(localedir
)/t-locale.alias
; \
313 dest
=$(DESTDIR
)$(localedir
)/locale.alias
; \
314 sed
-f ref-add.sed
$$orig > $$temp; \
315 $(INSTALL_DATA
) $$temp $$dest; \
321 if
test "$(PACKAGE)" = "gettext-tools"; then \
322 $(mkinstalldirs
) $(DESTDIR
)$(gettextsrcdir
); \
323 $(INSTALL_DATA
) VERSION
$(DESTDIR
)$(gettextsrcdir
)/VERSION
; \
324 $(INSTALL_DATA
) ChangeLog.inst
$(DESTDIR
)$(gettextsrcdir
)/ChangeLog
; \
325 dists
="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
326 for file in
$$dists; do \
327 $(INSTALL_DATA
) $(srcdir)/$$file \
328 $(DESTDIR
)$(gettextsrcdir
)/$$file; \
330 chmod a
+x
$(DESTDIR
)$(gettextsrcdir
)/config.charset
; \
331 dists
="$(DISTFILES.generated)"; \
332 for file in
$$dists; do \
333 if
test -f
$$file; then
dir=.
; else dir=$(srcdir); fi
; \
334 $(INSTALL_DATA
) $$dir/$$file \
335 $(DESTDIR
)$(gettextsrcdir
)/$$file; \
337 dists
="$(DISTFILES.obsolete)"; \
338 for file in
$$dists; do \
339 rm -f
$(DESTDIR
)$(gettextsrcdir
)/$$file; \
345 install-strip
: install
348 if
{ test "$(PACKAGE)" = "gettext-runtime" ||
test "$(PACKAGE)" = "gettext-tools"; } \
349 && test '@USE_INCLUDED_LIBINTL@' = yes
; then \
350 $(mkinstalldirs
) $(DESTDIR
)$(libdir) $(DESTDIR
)$(includedir); \
354 if
test "$(PACKAGE)" = "gettext-tools" \
355 && test '@USE_INCLUDED_LIBINTL@' = no \
356 && test @GLIBC2@
!= no
; then \
357 $(mkinstalldirs
) $(DESTDIR
)$(libdir); \
361 if
test '@USE_INCLUDED_LIBINTL@' = yes
; then \
362 test @GLIBC21@
!= no ||
$(mkinstalldirs
) $(DESTDIR
)$(libdir); \
363 $(mkinstalldirs
) $(DESTDIR
)$(localedir
); \
367 if
test "$(PACKAGE)" = "gettext-tools"; then \
368 $(mkinstalldirs
) $(DESTDIR
)$(gettextsrcdir
); \
373 # Define this as empty until I found a useful application.
377 if
{ test "$(PACKAGE)" = "gettext-runtime" ||
test "$(PACKAGE)" = "gettext-tools"; } \
378 && test '@USE_INCLUDED_LIBINTL@' = yes
; then \
379 rm -f
$(DESTDIR
)$(includedir)/libintl.h
; \
380 $(LIBTOOL
) --mode
=uninstall \
381 rm -f
$(DESTDIR
)$(libdir)/libintl.
$la; \
385 if
test "$(PACKAGE)" = "gettext-tools" \
386 && test '@USE_INCLUDED_LIBINTL@' = no \
387 && test @GLIBC2@
!= no
; then \
388 rm -f
$(DESTDIR
)$(libdir)/preloadable_libintl.so
; \
392 if
test '@USE_INCLUDED_LIBINTL@' = yes
; then \
393 if
test -f
$(DESTDIR
)$(libdir)/charset.alias
; then \
394 temp
=$(DESTDIR
)$(libdir)/t-charset.alias
; \
395 dest
=$(DESTDIR
)$(libdir)/charset.alias
; \
396 sed
-f ref-del.sed
$$dest > $$temp; \
397 if grep
'^# Packages using this file: $$' $$temp > /dev
/null
; then \
400 $(INSTALL_DATA
) $$temp $$dest; \
404 if
test -f
$(DESTDIR
)$(localedir
)/locale.alias
; then \
405 temp
=$(DESTDIR
)$(localedir
)/t-locale.alias
; \
406 dest
=$(DESTDIR
)$(localedir
)/locale.alias
; \
407 sed
-f ref-del.sed
$$dest > $$temp; \
408 if grep
'^# Packages using this file: $$' $$temp > /dev
/null
; then \
411 $(INSTALL_DATA
) $$temp $$dest; \
418 if
test "$(PACKAGE)" = "gettext-tools"; then \
419 for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1
$(DISTFILES.common
) $(DISTFILES.generated
); do \
420 rm -f
$(DESTDIR
)$(gettextsrcdir
)/$$file; \
426 info dvi ps pdf html
:
428 $(OBJECTS
): ..
/config.h libgnuintl.h
429 bindtextdom.
$lo dcgettext.
$lo dcigettext.
$lo dcngettext.
$lo dgettext.
$lo dngettext.
$lo finddomain.
$lo gettext.
$lo intl-compat.
$lo loadmsgcat.
$lo localealias.
$lo ngettext.
$lo textdomain.
$lo: $(srcdir)/gettextP.h
$(srcdir)/gmo.h
$(srcdir)/loadinfo.h
430 dcigettext.
$lo loadmsgcat.
$lo: $(srcdir)/hash-string.h
431 explodename.
$lo l10nflist.
$lo: $(srcdir)/loadinfo.h
432 dcigettext.
$lo loadmsgcat.
$lo plural.
$lo plural-exp.
$lo: $(srcdir)/plural-exp.h
433 dcigettext.
$lo: $(srcdir)/eval-plural.h
434 localcharset.
$lo: $(srcdir)/localcharset.h
435 localealias.
$lo localcharset.
$lo relocatable.
$lo: $(srcdir)/relocatable.h
436 printf.
$lo: $(srcdir)/printf-args.h
$(srcdir)/printf-args.c
$(srcdir)/printf-parse.h
$(srcdir)/wprintf-parse.h
$(srcdir)/xsize.h
$(srcdir)/printf-parse.c
$(srcdir)/vasnprintf.h
$(srcdir)/vasnwprintf.h
$(srcdir)/vasnprintf.c
440 TAGS
: $(HEADERS
) $(SOURCES
)
441 here
=`pwd`; cd
$(srcdir) && etags
-o
$$here/TAGS
$(HEADERS
) $(SOURCES
)
445 CTAGS
: $(HEADERS
) $(SOURCES
)
446 here
=`pwd`; cd
$(srcdir) && ctags
-o
$$here/CTAGS
$(HEADERS
) $(SOURCES
)
450 ID
: $(HEADERS
) $(SOURCES
)
451 here
=`pwd`; cd
$(srcdir) && mkid
-f
$$here/ID
$(HEADERS
) $(SOURCES
)
455 rm -f
*.a
*.la
*.o
*.obj
*.lo core core.
*
456 rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed
462 rm -f Makefile ID TAGS
463 if
test "$(PACKAGE)" = "gettext-runtime" ||
test "$(PACKAGE)" = "gettext-tools"; then \
464 rm -f ChangeLog.inst
$(DISTFILES.normal
); \
469 maintainer-clean
: distclean
470 @echo
"This command is intended for maintainers to use;"
471 @echo
"it deletes files that may require special tools to rebuild."
474 # GNU gettext needs not contain the file `VERSION' but contains some
475 # other files which should not be distributed in other packages.
476 distdir
= ..
/$(PACKAGE
)-$(VERSION
)/$(subdir
)
477 dist distdir
: Makefile
478 if
test "$(PACKAGE)" = "gettext-tools"; then \
481 if
test "$(PACKAGE)" = "gettext-runtime"; then \
482 additional
="$(DISTFILES.gettext)"; \
484 additional
="$(DISTFILES.normal)"; \
486 $(MAKE
) $(DISTFILES.common
) $(DISTFILES.generated
) $$additional; \
487 for file in ChangeLog
$(DISTFILES.common
) $(DISTFILES.generated
) $$additional; do \
488 if
test -f
$$file; then
dir=.
; else dir=$(srcdir); fi
; \
489 cp
-p
$$dir/$$file $(distdir
) ||
test $$file = Makefile.in || exit
1; \
493 Makefile
: $(srcdir)/Makefile.in
$(top_builddir
)/config.status
494 cd
$(top_builddir
) && $(SHELL
) .
/config.status
495 # This would be more efficient, but doesn't work any more with autoconf-2.57,
496 # when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used.
497 # cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
499 # Tell versions [3.59,3.63) of GNU make not to export all variables.
500 # Otherwise a system limit (for SysV at least) may be exceeded.