/[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.5 by akim, Fri Aug 3 08:22:03 2001 UTC revision 1.5.2.1 by akim, Wed Mar 20 08:43:12 2002 UTC
# Line 1  Line 1 
1  # Makefile for program source directory in GNU NLS utilities package.  # Makefile for PO directory in any package using GNU gettext.
2  # Copyright (C) 1995-1997, 2000, 2001 by Ulrich Drepper <drepper@gnu.ai.mit.edu>  # Copyright (C) 1995-1997, 2000-2002 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
3  #  #
4  # This file file 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 License  # be used in projects which are not available under the GNU General Public
6  # but which still want to provide support for the GNU gettext functionality.  # License but which still want to provide support for the GNU gettext
7  # Please note that the actual code is *not* freely available.  # functionality.
8    # Please note that the actual code of GNU gettext is covered by the GNU
9    # General Public License and is *not* in the public domain.
10    
11  PACKAGE = @PACKAGE@  PACKAGE = @PACKAGE@
12  VERSION = @VERSION@  VERSION = @VERSION@
13    
 # These two variables depend on the location of this directory.  
 subdir = po  
 top_builddir = ..  
   
14  SHELL = /bin/sh  SHELL = /bin/sh
15  @SET_MAKE@  @SET_MAKE@
16    
# Line 31  INSTALL_DATA = @INSTALL_DATA@ Line 29  INSTALL_DATA = @INSTALL_DATA@
29  MKINSTALLDIRS = @MKINSTALLDIRS@  MKINSTALLDIRS = @MKINSTALLDIRS@
30  mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`  mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
31    
 CC = @CC@  
32  GMSGFMT = @GMSGFMT@  GMSGFMT = @GMSGFMT@
33  MSGFMT = @MSGFMT@  MSGFMT = @MSGFMT@
34  XGETTEXT = @XGETTEXT@  XGETTEXT = @XGETTEXT@
35  MSGMERGE = msgmerge  MSGMERGE = msgmerge
36    MSGMERGE_UPDATE = @MSGMERGE@ --update
37  DEFS = @DEFS@  MSGINIT = msginit
38  CFLAGS = @CFLAGS@  MSGCONV = msgconv
39  CPPFLAGS = @CPPFLAGS@  MSGFILTER = msgfilter
   
 INCLUDES = -I.. -I$(top_srcdir)/intl  
   
 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)  
40    
41  POFILES = @POFILES@  POFILES = @POFILES@
42  GMOFILES = @GMOFILES@  GMOFILES = @GMOFILES@
43  DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \  UPDATEPOFILES = @UPDATEPOFILES@
44  $(POFILES) $(GMOFILES)  DUMMYPOFILES = @DUMMYPOFILES@
45    DISTFILES.common = Makefile.in.in Makevars remove-potcdate.sin \
46    $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
47    DISTFILES = $(DISTFILES.common) POTFILES.in $(DOMAIN).pot \
48    $(POFILES) $(GMOFILES) \
49    $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
50    
51  POTFILES = \  POTFILES = \
52    
53  CATALOGS = @CATALOGS@  CATALOGS = @CATALOGS@
54    
55  .SUFFIXES:  # Makevars gets inserted here. (Don't remove this line!)
 .SUFFIXES: .c .o .po .pox .gmo .mo  
   
 .c.o:  
         $(COMPILE) $<  
56    
57  .po.pox:  .SUFFIXES:
58          $(MAKE) $(PACKAGE).pot  .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update
         $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox  
59    
60  .po.mo:  .po.mo:
61          $(MSGFMT) -o $@ $<          @echo "$(MSGFMT) -c -o $@ $<"; \
62            $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
63    
64  .po.gmo:  .po.gmo:
65          file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \          @lang=`echo $* | sed -e 's,.*/,,'`; \
66            && rm -f $$file && $(GMSGFMT) --statistics -o $$file $<          test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
67            echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
68            cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
69    
70    .sin.sed:
71            sed -e '/^#/d' $< > t-$@
72            mv t-$@ $@
73    
74    
75  all: all-@USE_NLS@  all: all-@USE_NLS@
# Line 77  all: all-@USE_NLS@ Line 77  all: all-@USE_NLS@
77  all-yes: $(CATALOGS)  all-yes: $(CATALOGS)
78  all-no:  all-no:
79    
80  # Note: Target 'all' must not depend on target '$(srcdir)/$(PACKAGE).pot',  # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
81  # 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
82  # have been downloaded.  # have been downloaded.
83    
84  $(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in  $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
85          $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \          $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
86            --add-comments --keyword=_ --keyword=N_ \            --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
87            --files-from=$(srcdir)/POTFILES.in \            --files-from=$(srcdir)/POTFILES.in \
88          && test ! -f $(PACKAGE).po \            --copyright-holder='$(COPYRIGHT_HOLDER)'
89             || ( rm -f $(srcdir)/$(PACKAGE).pot \          test ! -f $(DOMAIN).po || { \
90                  && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )            if test -f $(srcdir)/$(DOMAIN).pot; then \
91                sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
92                sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
93                if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
94                  rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
95                else \
96                  rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
97                  mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
98                fi; \
99              else \
100                mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
101              fi; \
102            }
103    
104    $(srcdir)/$(DOMAIN).pot:
105            $(MAKE) $(DOMAIN).pot-update
106    
107    $(POFILES): $(srcdir)/$(DOMAIN).pot
108            @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
109            test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
110            echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
111            cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
112    
113    
114  install: install-exec install-data  install: install-exec install-data
# Line 95  install-exec: Line 116  install-exec:
116  install-data: install-data-@USE_NLS@  install-data: install-data-@USE_NLS@
117          if test "$(PACKAGE)" = "gettext"; then \          if test "$(PACKAGE)" = "gettext"; then \
118            $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \            $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
119            $(INSTALL_DATA) $(srcdir)/Makefile.in.in \            for file in $(DISTFILES.common); do \
120                            $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \              $(INSTALL_DATA) $(srcdir)/$$file \
121                                $(DESTDIR)$(gettextsrcdir)/$$file; \
122              done; \
123          else \          else \
124            : ; \            : ; \
125          fi          fi
# Line 106  install-data-yes: all Line 129  install-data-yes: all
129          @catalogs='$(CATALOGS)'; \          @catalogs='$(CATALOGS)'; \
130          for cat in $$catalogs; do \          for cat in $$catalogs; do \
131            cat=`basename $$cat`; \            cat=`basename $$cat`; \
132            lang=`echo $$cat | sed 's/\.gmo$$//'`; \            lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
133            dir=$(localedir)/$$lang/LC_MESSAGES; \            dir=$(localedir)/$$lang/LC_MESSAGES; \
134            $(mkinstalldirs) $(DESTDIR)$$dir; \            $(mkinstalldirs) $(DESTDIR)$$dir; \
135            if test -r $$cat; then \            if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
136              $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \            $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
137              echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \            echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
138            else \            for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
139              $(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \              if test -n "$$lc"; then \
140              echo "installing $(srcdir)/$$cat as" \                if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
141                   "$(DESTDIR)$$dir/$(PACKAGE).mo"; \                  link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
142            fi; \                  mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
143                    mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
144                    (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
145                     for file in *; do \
146                       if test -f $$file; then \
147                         ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
148                       fi; \
149                     done); \
150                    rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
151                  else \
152                    if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
153                      :; \
154                    else \
155                      rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
156                      mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
157                    fi; \
158                  fi; \
159                  rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
160                  ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
161                  ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
162                  cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
163                  echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
164                fi; \
165              done; \
166          done          done
167    
168  # Define this as empty until I found a useful application.  install-strip: install
 installcheck:  
169    
170  uninstall:  installdirs: installdirs-exec installdirs-data
171          catalogs='$(CATALOGS)'; \  installdirs-exec:
172    installdirs-data: installdirs-data-@USE_NLS@
173            if test "$(PACKAGE)" = "gettext"; then \
174              $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
175            else \
176              : ; \
177            fi
178    installdirs-data-no:
179    installdirs-data-yes:
180            $(mkinstalldirs) $(DESTDIR)$(datadir)
181            @catalogs='$(CATALOGS)'; \
182          for cat in $$catalogs; do \          for cat in $$catalogs; do \
183            cat=`basename $$cat`; \            cat=`basename $$cat`; \
184            lang=`echo $$cat | sed 's/\.gmo$$//'`; \            lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
185            rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \            dir=$(localedir)/$$lang/LC_MESSAGES; \
186              $(mkinstalldirs) $(DESTDIR)$$dir; \
187              for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
188                if test -n "$$lc"; then \
189                  if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
190                    link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
191                    mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
192                    mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
193                    (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
194                     for file in *; do \
195                       if test -f $$file; then \
196                         ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
197                       fi; \
198                     done); \
199                    rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
200                  else \
201                    if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
202                      :; \
203                    else \
204                      rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
205                      mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
206                    fi; \
207                  fi; \
208                fi; \
209              done; \
210          done          done
211    
212    # Define this as empty until I found a useful application.
213    installcheck:
214    
215    uninstall: uninstall-exec uninstall-data
216    uninstall-exec:
217    uninstall-data: uninstall-data-@USE_NLS@
218          if test "$(PACKAGE)" = "gettext"; then \          if test "$(PACKAGE)" = "gettext"; then \
219            rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \            for file in $(DISTFILES.common); do \
220                rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
221              done; \
222          else \          else \
223            : ; \            : ; \
224          fi          fi
225    uninstall-data-no:
226    uninstall-data-yes:
227            catalogs='$(CATALOGS)'; \
228            for cat in $$catalogs; do \
229              cat=`basename $$cat`; \
230              lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
231              for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
232                rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
233              done; \
234            done
235    
236  check: all  check: all
237    
238  dvi info tags TAGS ID:  dvi info tags TAGS ID:
239    
240  mostlyclean:  mostlyclean:
241          rm -f core core.* *.pox $(PACKAGE).po *.new.po          rm -f remove-potcdate.sed
242            rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
243          rm -fr *.o          rm -fr *.o
244    
245  clean: mostlyclean  clean: mostlyclean
# Line 160  dist distdir: Line 259  dist distdir:
259  # This is a separate target because 'update-po' must be executed before.  # This is a separate target because 'update-po' must be executed before.
260  dist2: $(DISTFILES)  dist2: $(DISTFILES)
261          dists="$(DISTFILES)"; \          dists="$(DISTFILES)"; \
262            if test -f $(srcdir)/ChangeLog; then dists="$$dists ChangeLog"; fi; \
263            if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
264          for file in $$dists; do \          for file in $$dists; do \
265            if test -f $$file; then dir=.; else dir=$(srcdir); fi; \            if test -f $$file; then \
266            cp -p $$dir/$$file $(distdir); \              cp -p $$file $(distdir); \
267              else \
268                cp -p $(srcdir)/$$file $(distdir); \
269              fi; \
270          done          done
271    
272  update-po: Makefile  update-po: Makefile
273          $(MAKE) $(PACKAGE).pot          $(MAKE) $(DOMAIN).pot-update
274            $(MAKE) $(UPDATEPOFILES)
275            $(MAKE) update-gmo
276    
277    # General rule for updating PO files.
278    
279    .nop.po-update:
280            @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
281          if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \          if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
282            tmpdir=`pwd`; \
283            echo "$$lang:"; \
284            test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
285            echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
286          cd $(srcdir); \          cd $(srcdir); \
287          catalogs='$(GMOFILES)'; \          if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
288          for cat in $$catalogs; do \            if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
289            cat=`basename $$cat`; \              rm -f $$tmpdir/$$lang.new.po; \
           lang=`echo $$cat | sed 's/\.gmo$$//'`; \  
           echo "$$lang:"; \  
           if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \  
             mv -f $$lang.new.po $$lang.po; \  
290            else \            else \
291              echo "msgmerge for $$cat failed!"; \              if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
292              rm -f $$lang.new.po; \                :; \
293                else \
294                  echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
295                  exit 1; \
296                fi; \
297            fi; \            fi; \
298          done          else \
299          $(MAKE) update-gmo            echo "msgmerge for $$lang.po failed!" 1>&2; \
300              rm -f $$tmpdir/$$lang.new.po; \
301            fi
302    
303    $(DUMMYPOFILES):
304    
305  update-gmo: Makefile $(GMOFILES)  update-gmo: Makefile $(GMOFILES)
306          @:          @:
# Line 191  Makefile: Makefile.in.in $(top_builddir) Line 310  Makefile: Makefile.in.in $(top_builddir)
310            && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \            && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
311                 $(SHELL) ./config.status                 $(SHELL) ./config.status
312    
313    force:
314    
315  # Tell versions [3.59,3.63) of GNU make not to export all variables.  # Tell versions [3.59,3.63) of GNU make not to export all variables.
316  # Otherwise a system limit (for SysV at least) may be exceeded.  # Otherwise a system limit (for SysV at least) may be exceeded.
317  .NOEXPORT:  .NOEXPORT:

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.5.2.1

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