/[bison]/bison/po/Makefile.in.in
ViewVC logotype

Diff of /bison/po/Makefile.in.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6 by akim, Thu Mar 14 18:31:14 2002 UTC revision 1.7 by eggert, Tue Jun 17 08:19:02 2003 UTC
# Line 1  Line 1 
1  # Makefile for PO directory in any package using GNU gettext.  # Makefile for PO directory in any package using GNU gettext.
2  # Copyright (C) 1995-1997, 2000-2002 by Ulrich Drepper <drepper@gnu.ai.mit.edu>  # Copyright (C) 1995-1997, 2000-2003 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
3  #  #
4  # This file can be copied and used freely without restrictions.  It can  # This file can be copied and used freely without restrictions.  It can
5  # be used in projects which are not available under the GNU General Public  # be used in projects which are not available under the GNU General Public
# Line 27  gettextsrcdir = $(datadir)/gettext/po Line 27  gettextsrcdir = $(datadir)/gettext/po
27  INSTALL = @INSTALL@  INSTALL = @INSTALL@
28  INSTALL_DATA = @INSTALL_DATA@  INSTALL_DATA = @INSTALL_DATA@
29  MKINSTALLDIRS = @MKINSTALLDIRS@  MKINSTALLDIRS = @MKINSTALLDIRS@
30  mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`  mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
31    
32  GMSGFMT = @GMSGFMT@  GMSGFMT = @GMSGFMT@
33  MSGFMT = @MSGFMT@  MSGFMT = @MSGFMT@
# Line 42  POFILES = @POFILES@ Line 42  POFILES = @POFILES@
42  GMOFILES = @GMOFILES@  GMOFILES = @GMOFILES@
43  UPDATEPOFILES = @UPDATEPOFILES@  UPDATEPOFILES = @UPDATEPOFILES@
44  DUMMYPOFILES = @DUMMYPOFILES@  DUMMYPOFILES = @DUMMYPOFILES@
45  DISTFILES.common = Makefile.in.in Makevars remove-potcdate.sin \  DISTFILES.common = Makefile.in.in remove-potcdate.sin \
46  $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)  $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
47  DISTFILES = $(DISTFILES.common) POTFILES.in $(DOMAIN).pot \  DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \
48  $(POFILES) $(GMOFILES) \  $(POFILES) $(GMOFILES) \
49  $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)  $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
50    
# Line 74  CATALOGS = @CATALOGS@ Line 74  CATALOGS = @CATALOGS@
74    
75  all: all-@USE_NLS@  all: all-@USE_NLS@
76    
77  all-yes: $(CATALOGS)  all-yes: stamp-po
78  all-no:  all-no:
79    
80    # stamp-po is a timestamp denoting the last time at which the CATALOGS have
81    # been loosely updated. Its purpose is that when a developer or translator
82    # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
83    # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
84    # invocations of "make" will do nothing. This timestamp would not be necessary
85    # if updating the $(CATALOGS) would always touch them; however, the rule for
86    # $(POFILES) has been designed to not touch files that don't need to be
87    # changed.
88    stamp-po: $(srcdir)/$(DOMAIN).pot
89            test -z "$(CATALOGS)" || $(MAKE) $(CATALOGS)
90            @echo "touch stamp-po"
91            @echo timestamp > stamp-poT
92            @mv stamp-poT stamp-po
93    
94  # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',  # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
95  # otherwise packages like GCC can not be built if only parts of the source  # otherwise packages like GCC can not be built if only parts of the source
96  # have been downloaded.  # have been downloaded.
97    
98    # This target rebuilds $(DOMAIN).pot; it is an expensive operation.
99    # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
100  $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed  $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
101          $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \          $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
102            --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \            --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
103            --files-from=$(srcdir)/POTFILES.in \            --files-from=$(srcdir)/POTFILES.in \
104            --copyright-holder='$(COPYRIGHT_HOLDER)'            --copyright-holder='$(COPYRIGHT_HOLDER)' \
105              --msgid-bugs-address='$(MSGID_BUGS_ADDRESS)'
106          test ! -f $(DOMAIN).po || { \          test ! -f $(DOMAIN).po || { \
107            if test -f $(srcdir)/$(DOMAIN).pot; then \            if test -f $(srcdir)/$(DOMAIN).pot; then \
108              sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \              sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
# Line 101  $(DOMAIN).pot-update: $(POTFILES) $(srcd Line 118  $(DOMAIN).pot-update: $(POTFILES) $(srcd
118            fi; \            fi; \
119          }          }
120    
121    # This rule has no dependencies: we don't need to update $(DOMAIN).pot at
122    # every "make" invocation, only create it when it is missing.
123    # Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
124  $(srcdir)/$(DOMAIN).pot:  $(srcdir)/$(DOMAIN).pot:
125          $(MAKE) $(DOMAIN).pot-update          $(MAKE) $(DOMAIN).pot-update
126    
127    # This target rebuilds a PO file if $(DOMAIN).pot has changed.
128    # Note that a PO file is not touched if it doesn't need to be changed.
129  $(POFILES): $(srcdir)/$(DOMAIN).pot  $(POFILES): $(srcdir)/$(DOMAIN).pot
130          @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \          @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
131          test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \          test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
# Line 114  $(POFILES): $(srcdir)/$(DOMAIN).pot Line 136  $(POFILES): $(srcdir)/$(DOMAIN).pot
136  install: install-exec install-data  install: install-exec install-data
137  install-exec:  install-exec:
138  install-data: install-data-@USE_NLS@  install-data: install-data-@USE_NLS@
139          if test "$(PACKAGE)" = "gettext"; then \          if test "$(PACKAGE)" = "gettext-tools"; then \
140            $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \            $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
141            for file in $(DISTFILES.common); do \            for file in $(DISTFILES.common) Makevars.template; do \
142              $(INSTALL_DATA) $(srcdir)/$$file \              $(INSTALL_DATA) $(srcdir)/$$file \
143                              $(DESTDIR)$(gettextsrcdir)/$$file; \                              $(DESTDIR)$(gettextsrcdir)/$$file; \
144            done; \            done; \
145              for file in Makevars; do \
146                rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
147              done; \
148          else \          else \
149            : ; \            : ; \
150          fi          fi
# Line 170  install-strip: install Line 195  install-strip: install
195  installdirs: installdirs-exec installdirs-data  installdirs: installdirs-exec installdirs-data
196  installdirs-exec:  installdirs-exec:
197  installdirs-data: installdirs-data-@USE_NLS@  installdirs-data: installdirs-data-@USE_NLS@
198          if test "$(PACKAGE)" = "gettext"; then \          if test "$(PACKAGE)" = "gettext-tools"; then \
199            $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \            $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
200          else \          else \
201            : ; \            : ; \
# Line 215  installcheck: Line 240  installcheck:
240  uninstall: uninstall-exec uninstall-data  uninstall: uninstall-exec uninstall-data
241  uninstall-exec:  uninstall-exec:
242  uninstall-data: uninstall-data-@USE_NLS@  uninstall-data: uninstall-data-@USE_NLS@
243          if test "$(PACKAGE)" = "gettext"; then \          if test "$(PACKAGE)" = "gettext-tools"; then \
244            for file in $(DISTFILES.common); do \            for file in $(DISTFILES.common) Makevars.template; do \
245              rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \              rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
246            done; \            done; \
247          else \          else \
# Line 235  uninstall-data-yes: Line 260  uninstall-data-yes:
260    
261  check: all  check: all
262    
263  dvi info tags TAGS ID:  info dvi ps pdf html tags TAGS ctags CTAGS ID:
264    
265  mostlyclean:  mostlyclean:
266          rm -f remove-potcdate.sed          rm -f remove-potcdate.sed
267            rm -f stamp-poT
268          rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po          rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
269          rm -fr *.o          rm -fr *.o
270    
# Line 250  distclean: clean Line 276  distclean: clean
276  maintainer-clean: distclean  maintainer-clean: distclean
277          @echo "This command is intended for maintainers to use;"          @echo "This command is intended for maintainers to use;"
278          @echo "it deletes files that may require special tools to rebuild."          @echo "it deletes files that may require special tools to rebuild."
279          rm -f $(GMOFILES)          rm -f stamp-po $(GMOFILES)
280    
281  distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)  distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
282  dist distdir:  dist distdir:
# Line 259  dist distdir: Line 285  dist distdir:
285  # This is a separate target because 'update-po' must be executed before.  # This is a separate target because 'update-po' must be executed before.
286  dist2: $(DISTFILES)  dist2: $(DISTFILES)
287          dists="$(DISTFILES)"; \          dists="$(DISTFILES)"; \
288          if test -f $(srcdir)/ChangeLog; then dists="$$dists ChangeLog"; fi; \          if test "$(PACKAGE)" = "gettext-tools"; then \
289              dists="$$dists Makevars.template"; \
290            fi; \
291            if test -f $(srcdir)/ChangeLog; then \
292              dists="$$dists ChangeLog"; \
293            fi; \
294            for i in 0 1 2 3 4 5 6 7 8 9; do \
295              if test -f $(srcdir)/ChangeLog.$$i; then \
296                dists="$$dists ChangeLog.$$i"; \
297              fi; \
298            done; \
299          if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \          if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
300          for file in $$dists; do \          for file in $$dists; do \
301            if test -f $$file; then \            if test -f $$file; then \
# Line 271  dist2: $(DISTFILES) Line 307  dist2: $(DISTFILES)
307    
308  update-po: Makefile  update-po: Makefile
309          $(MAKE) $(DOMAIN).pot-update          $(MAKE) $(DOMAIN).pot-update
310          $(MAKE) $(UPDATEPOFILES)          test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
311          $(MAKE) update-gmo          $(MAKE) update-gmo
312    
313  # General rule for updating PO files.  # General rule for updating PO files.
314    
315  .nop.po-update:  .nop.po-update:
316          @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \          @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
317          if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \          if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
318          tmpdir=`pwd`; \          tmpdir=`pwd`; \
319          echo "$$lang:"; \          echo "$$lang:"; \
320          test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \          test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
# Line 305  $(DUMMYPOFILES): Line 341  $(DUMMYPOFILES):
341  update-gmo: Makefile $(GMOFILES)  update-gmo: Makefile $(GMOFILES)
342          @:          @:
343    
344  Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in  Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@
345          cd $(top_builddir) \          cd $(top_builddir) \
346            && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \            && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
347                 $(SHELL) ./config.status                 $(SHELL) ./config.status

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26