4
0

Makefile.in.in 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. # Makefile for program source directory in GNU NLS utilities package.
  2. # Copyright (C) 1995-1997, 2000, 2001 by Ulrich Drepper <[email protected]>
  3. #
  4. # This file can be copied and used freely without restrictions. It can
  5. # be used in projects which are not available under the GNU Public License
  6. # but which still want to provide support for the GNU gettext functionality.
  7. # Please note that the actual code is *not* freely available.
  8. PACKAGE = @PACKAGE@
  9. VERSION = @VERSION@
  10. # These two variables depend on the location of this directory.
  11. subdir = po
  12. top_builddir = ..
  13. SHELL = /bin/sh
  14. @SET_MAKE@
  15. srcdir = @srcdir@
  16. top_srcdir = @top_srcdir@
  17. VPATH = @srcdir@
  18. prefix = @prefix@
  19. exec_prefix = @exec_prefix@
  20. datadir = @datadir@
  21. localedir = $(datadir)/locale
  22. gettextsrcdir = $(datadir)/gettext/po
  23. INSTALL = @INSTALL@
  24. INSTALL_DATA = @INSTALL_DATA@
  25. MKINSTALLDIRS = @MKINSTALLDIRS@
  26. mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
  27. CC = @CC@
  28. GMSGFMT = @GMSGFMT@
  29. MSGFMT = @MSGFMT@
  30. XGETTEXT = @XGETTEXT@
  31. MSGMERGE = msgmerge
  32. DEFS = @DEFS@
  33. CFLAGS = @CFLAGS@
  34. CPPFLAGS = @CPPFLAGS@
  35. INCLUDES = -I.. -I$(top_srcdir)/intl
  36. COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
  37. POFILES = @POFILES@
  38. GMOFILES = @GMOFILES@
  39. DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
  40. $(POFILES) $(GMOFILES)
  41. POTFILES = \
  42. CATALOGS = @CATALOGS@
  43. .SUFFIXES:
  44. .SUFFIXES: .c .o .po .pox .gmo .mo
  45. .c.o:
  46. $(COMPILE) $<
  47. .po.pox:
  48. $(MAKE) $(PACKAGE).pot
  49. $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
  50. .po.mo:
  51. $(MSGFMT) -o $@ $<
  52. .po.gmo:
  53. file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
  54. && rm -f $$file && $(GMSGFMT) --statistics -o $$file $<
  55. all: all-@USE_NLS@
  56. all-yes: $(CATALOGS)
  57. all-no:
  58. # Note: Target 'all' must not depend on target '$(srcdir)/$(PACKAGE).pot',
  59. # otherwise packages like GCC can not be built if only parts of the source
  60. # have been downloaded.
  61. $(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in
  62. $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
  63. --add-comments --keyword=_ --keyword=N_ \
  64. --files-from=$(srcdir)/POTFILES.in \
  65. && test ! -f $(PACKAGE).po \
  66. || ( rm -f $(srcdir)/$(PACKAGE).pot \
  67. && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
  68. install: install-exec install-data
  69. install-exec:
  70. install-data: install-data-@USE_NLS@
  71. if test "$(PACKAGE)" = "gettext"; then \
  72. $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
  73. $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
  74. $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
  75. else \
  76. : ; \
  77. fi
  78. install-data-no: all
  79. install-data-yes: all
  80. $(mkinstalldirs) $(DESTDIR)$(datadir)
  81. @catalogs='$(CATALOGS)'; \
  82. for cat in $$catalogs; do \
  83. cat=`basename $$cat`; \
  84. lang=`echo $$cat | sed 's/\.gmo$$//'`; \
  85. dir=$(localedir)/$$lang/LC_MESSAGES; \
  86. $(mkinstalldirs) $(DESTDIR)$$dir; \
  87. if test -r $$cat; then \
  88. $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
  89. echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \
  90. else \
  91. $(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
  92. echo "installing $(srcdir)/$$cat as" \
  93. "$(DESTDIR)$$dir/$(PACKAGE).mo"; \
  94. fi; \
  95. done
  96. # Define this as empty until I found a useful application.
  97. installcheck:
  98. uninstall:
  99. catalogs='$(CATALOGS)'; \
  100. for cat in $$catalogs; do \
  101. cat=`basename $$cat`; \
  102. lang=`echo $$cat | sed 's/\.gmo$$//'`; \
  103. rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
  104. done
  105. if test "$(PACKAGE)" = "gettext"; then \
  106. rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
  107. else \
  108. : ; \
  109. fi
  110. check: all
  111. dvi info tags TAGS ID:
  112. mostlyclean:
  113. rm -f core core.* *.pox $(PACKAGE).po *.new.po
  114. rm -fr *.o
  115. clean: mostlyclean
  116. distclean: clean
  117. rm -f Makefile Makefile.in POTFILES *.mo
  118. maintainer-clean: distclean
  119. @echo "This command is intended for maintainers to use;"
  120. @echo "it deletes files that may require special tools to rebuild."
  121. rm -f $(GMOFILES)
  122. distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
  123. dist distdir:
  124. $(MAKE) update-po
  125. @$(MAKE) dist2
  126. # This is a separate target because 'update-po' must be executed before.
  127. dist2: $(DISTFILES)
  128. dists="$(DISTFILES)"; \
  129. for file in $$dists; do \
  130. if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
  131. cp -p $$dir/$$file $(distdir); \
  132. done
  133. update-po: Makefile
  134. $(MAKE) $(PACKAGE).pot
  135. if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
  136. cd $(srcdir); \
  137. catalogs='$(GMOFILES)'; \
  138. for cat in $$catalogs; do \
  139. cat=`basename $$cat`; \
  140. lang=`echo $$cat | sed 's/\.gmo$$//'`; \
  141. echo "$$lang:"; \
  142. if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \
  143. mv -f $$lang.new.po $$lang.po; \
  144. else \
  145. echo "msgmerge for $$cat failed!"; \
  146. rm -f $$lang.new.po; \
  147. fi; \
  148. done
  149. $(MAKE) update-gmo
  150. update-gmo: Makefile $(GMOFILES)
  151. @:
  152. Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
  153. cd $(top_builddir) \
  154. && CONFIG_FILES=$(subdir)/[email protected] CONFIG_HEADERS= \
  155. $(SHELL) ./config.status
  156. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  157. # Otherwise a system limit (for SysV at least) may be exceeded.
  158. .NOEXPORT: