Makefile.in 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. # Makefile for directory with message catalog handling in GNU NLS Utilities.
  2. # Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # 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
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17. PACKAGE = @PACKAGE@
  18. VERSION = @VERSION@
  19. SHELL = /bin/sh
  20. srcdir = @srcdir@
  21. top_srcdir = @top_srcdir@
  22. top_builddir = ..
  23. VPATH = @srcdir@
  24. prefix = @prefix@
  25. exec_prefix = @exec_prefix@
  26. transform = @program_transform_name@
  27. libdir = @libdir@
  28. includedir = @includedir@
  29. datadir = @datadir@
  30. localedir = $(datadir)/locale
  31. gettextsrcdir = $(datadir)/gettext/intl
  32. aliaspath = $(localedir)
  33. subdir = intl
  34. INSTALL = @INSTALL@
  35. INSTALL_DATA = @INSTALL_DATA@
  36. MKINSTALLDIRS = @MKINSTALLDIRS@
  37. mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
  38. l = @INTL_LIBTOOL_SUFFIX_PREFIX@
  39. AR = ar
  40. CC = @CC@
  41. LIBTOOL = @LIBTOOL@
  42. RANLIB = @RANLIB@
  43. YACC = @INTLBISON@ -y -d
  44. YFLAGS = --name-prefix=__gettext
  45. DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
  46. -DLIBDIR=\"$(libdir)\" @DEFS@
  47. CPPFLAGS = @CPPFLAGS@
  48. CFLAGS = @CFLAGS@
  49. LDFLAGS = @LDFLAGS@
  50. COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
  51. HEADERS = $(COMHDRS) libgnuintl.h libgettext.h loadinfo.h
  52. COMHDRS = gettext.h gettextP.h hash-string.h
  53. SOURCES = $(COMSRCS) intl-compat.c
  54. COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
  55. finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
  56. explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \
  57. localcharset.c
  58. OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
  59. finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
  60. explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
  61. plural.$lo localcharset.$lo
  62. GETTOBJS = intl-compat.$lo
  63. DISTFILES.common = Makefile.in \
  64. config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
  65. DISTFILES.generated = plural.c
  66. DISTFILES.normal = VERSION
  67. DISTFILES.gettext = libintl.glibc
  68. DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c
  69. # Libtool's library version information for libintl.
  70. # Before making a gettext release, the gettext maintainer must change this
  71. # according to the libtool documentation, section "Library interface versions".
  72. # Maintainers of other packages that include the intl directory must *not*
  73. # change these values.
  74. LTV_CURRENT=1
  75. LTV_REVISION=1
  76. LTV_AGE=0
  77. .SUFFIXES:
  78. .SUFFIXES: .c .y .o .lo .sin .sed
  79. .c.o:
  80. $(COMPILE) $<
  81. .c.lo:
  82. $(LIBTOOL) --mode=compile $(COMPILE) $<
  83. .y.c:
  84. $(YACC) $(YFLAGS) --output $@ $<
  85. rm -f $*.h
  86. .sin.sed:
  87. sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
  88. mv t-$@ $@
  89. INCLUDES = -I.. -I. -I$(top_srcdir)/intl
  90. all: all-@USE_INCLUDED_LIBINTL@
  91. all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
  92. all-no: all-no-@BUILD_INCLUDED_LIBINTL@
  93. all-no-yes: libgnuintl.$la
  94. all-no-no:
  95. libintl.a libgnuintl.a: $(OBJECTS)
  96. rm -f $@
  97. $(AR) cru $@ $(OBJECTS)
  98. $(RANLIB) $@
  99. libintl.la libgnuintl.la: $(OBJECTS)
  100. $(LIBTOOL) --mode=link \
  101. $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
  102. $(OBJECTS) @LIBICONV@ \
  103. -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
  104. -rpath $(libdir) \
  105. -no-undefined
  106. libintl.h: libgnuintl.h
  107. cp $(srcdir)/libgnuintl.h libintl.h
  108. charset.alias: config.charset
  109. $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
  110. mv t-$@ $@
  111. check: all
  112. # This installation goal is only used in GNU gettext. Packages which
  113. # only use the library should use install instead.
  114. # We must not install the libintl.h/libintl.a files if we are on a
  115. # system which has the GNU gettext() function in its C library or in a
  116. # separate library.
  117. # If you want to use the one which comes with this version of the
  118. # package, you have to use `configure --with-included-gettext'.
  119. install: install-exec install-data
  120. install-exec: all
  121. if test "$(PACKAGE)" = "gettext" \
  122. && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
  123. $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
  124. $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
  125. $(LIBTOOL) --mode=install \
  126. $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
  127. else \
  128. : ; \
  129. fi
  130. if test '@USE_INCLUDED_LIBINTL@' = yes; then \
  131. $(mkinstalldirs) $(DESTDIR)$(libdir); \
  132. temp=$(DESTDIR)$(libdir)/t-charset.alias; \
  133. dest=$(DESTDIR)$(libdir)/charset.alias; \
  134. if test -f $(DESTDIR)$(libdir)/charset.alias; then \
  135. orig=$(DESTDIR)$(libdir)/charset.alias; \
  136. sed -f ref-add.sed $$orig > $$temp; \
  137. $(INSTALL_DATA) $$temp $$dest; \
  138. rm -f $$temp; \
  139. else \
  140. if test @GLIBC21@ = no; then \
  141. orig=charset.alias; \
  142. sed -f ref-add.sed $$orig > $$temp; \
  143. $(INSTALL_DATA) $$temp $$dest; \
  144. rm -f $$temp; \
  145. fi; \
  146. fi; \
  147. $(mkinstalldirs) $(DESTDIR)$(localedir); \
  148. test -f $(DESTDIR)$(localedir)/locale.alias \
  149. && orig=$(DESTDIR)$(localedir)/locale.alias \
  150. || orig=$(srcdir)/locale.alias; \
  151. temp=$(DESTDIR)$(localedir)/t-locale.alias; \
  152. dest=$(DESTDIR)$(localedir)/locale.alias; \
  153. sed -f ref-add.sed $$orig > $$temp; \
  154. $(INSTALL_DATA) $$temp $$dest; \
  155. rm -f $$temp; \
  156. else \
  157. : ; \
  158. fi
  159. install-data: all
  160. if test "$(PACKAGE)" = "gettext"; then \
  161. $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
  162. $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
  163. $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
  164. dists="$(DISTFILES.common)"; \
  165. for file in $$dists; do \
  166. $(INSTALL_DATA) $(srcdir)/$$file \
  167. $(DESTDIR)$(gettextsrcdir)/$$file; \
  168. done; \
  169. chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
  170. dists="$(DISTFILES.generated)"; \
  171. for file in $$dists; do \
  172. if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
  173. $(INSTALL_DATA) $$dir/$$file \
  174. $(DESTDIR)$(gettextsrcdir)/$$file; \
  175. done; \
  176. dists="$(DISTFILES.obsolete)"; \
  177. for file in $$dists; do \
  178. rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
  179. done; \
  180. else \
  181. : ; \
  182. fi
  183. # Define this as empty until I found a useful application.
  184. installcheck:
  185. uninstall:
  186. if test "$(PACKAGE)" = "gettext" \
  187. && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
  188. rm -f $(DESTDIR)$(includedir)/libintl.h; \
  189. $(LIBTOOL) --mode=uninstall \
  190. rm -f $(DESTDIR)$(libdir)/libintl.$la; \
  191. else \
  192. : ; \
  193. fi
  194. if test '@USE_INCLUDED_LIBINTL@' = yes; then \
  195. if test -f $(DESTDIR)$(libdir)/charset.alias; then \
  196. temp=$(DESTDIR)$(libdir)/t-charset.alias; \
  197. dest=$(DESTDIR)$(libdir)/charset.alias; \
  198. sed -f ref-del.sed $$dest > $$temp; \
  199. if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
  200. rm -f $$dest; \
  201. else \
  202. $(INSTALL_DATA) $$temp $$dest; \
  203. fi; \
  204. rm -f $$temp; \
  205. fi; \
  206. if test -f $(DESTDIR)$(localedir)/locale.alias; then \
  207. temp=$(DESTDIR)$(localedir)/t-locale.alias; \
  208. dest=$(DESTDIR)$(localedir)/locale.alias; \
  209. sed -f ref-del.sed $$dest > $$temp; \
  210. if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
  211. rm -f $$dest; \
  212. else \
  213. $(INSTALL_DATA) $$temp $$dest; \
  214. fi; \
  215. rm -f $$temp; \
  216. fi; \
  217. else \
  218. : ; \
  219. fi
  220. if test "$(PACKAGE)" = "gettext"; then \
  221. for file in VERSION ChangeLog $(DISTFILES.common) $(DISTFILES.generated); do \
  222. rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
  223. done; \
  224. else \
  225. : ; \
  226. fi
  227. info dvi:
  228. $(OBJECTS): ../config.h libgnuintl.h
  229. bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
  230. dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
  231. tags: TAGS
  232. TAGS: $(HEADERS) $(SOURCES)
  233. here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
  234. id: ID
  235. ID: $(HEADERS) $(SOURCES)
  236. here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
  237. mostlyclean:
  238. rm -f *.a *.la *.o *.lo core core.*
  239. rm -f libintl.h charset.alias ref-add.sed ref-del.sed
  240. rm -f -r .libs _libs
  241. clean: mostlyclean
  242. distclean: clean
  243. rm -f Makefile ID TAGS
  244. if test "$(PACKAGE)" = gettext; then \
  245. rm -f ChangeLog.inst $(DISTFILES.normal); \
  246. else \
  247. : ; \
  248. fi
  249. maintainer-clean: distclean
  250. @echo "This command is intended for maintainers to use;"
  251. @echo "it deletes files that may require special tools to rebuild."
  252. # GNU gettext needs not contain the file `VERSION' but contains some
  253. # other files which should not be distributed in other packages.
  254. distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
  255. dist distdir: Makefile
  256. if test "$(PACKAGE)" = gettext; then \
  257. additional="$(DISTFILES.gettext)"; \
  258. else \
  259. additional="$(DISTFILES.normal)"; \
  260. fi; \
  261. $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
  262. for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
  263. if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
  264. ln $$dir/$$file $(distdir) 2> /dev/null \
  265. || cp -p $$dir/$$file $(distdir); \
  266. done
  267. Makefile: Makefile.in ../config.status
  268. cd .. \
  269. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
  270. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  271. # Otherwise a system limit (for SysV at least) may be exceeded.
  272. .NOEXPORT: