Makefile.in (.po.pox): Look both in srcdir and builddir for $(PACKAGE).pot.
authorZack Weinberg <zack@codesourcery.com>
Fri, 9 Nov 2001 17:51:56 +0000 (17:51 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Fri, 9 Nov 2001 17:51:56 +0000 (17:51 +0000)
* Makefile.in (.po.pox): Look both in srcdir and builddir
for $(PACKAGE).pot.
(po/$(PACKAGE).pot): Don't move-if-change the new potfile over
to the source directory.
* po/exgettext: Deposit new potfile in po subdir.

From-SVN: r46884

gcc/ChangeLog
gcc/Makefile.in
gcc/po/ChangeLog
gcc/po/exgettext

index ddb272eeb52831d434bd7a384c21acbb8870155d..8581a299eca7c0bf09ed6833054c93c71d91351c 100644 (file)
@@ -1,3 +1,10 @@
+2001-11-08  Zack Weinberg  <zack@codesourcery.com>
+
+       * Makefile.in (.po.pox): Look both in srcdir and builddir
+       for $(PACKAGE).pot.
+       (po/$(PACKAGE).pot): Don't move-if-change the new potfile over
+       to the source directory.
+
 2001-11-09 Ben Elliston  <bje@redhat.com>
           Michael Meissner  <meissner@redhat.com>
            Andrew MacLeod  <amacleod@redhat.com>
index 31cafdc3461f8f9e766bfa54b710e8c61ffa4f77..f3caa0371071b1ad744c70b475b0d4d9e5e7b256 100644 (file)
@@ -3379,9 +3379,13 @@ update-po: $(CATALOGS:.gmo=.pox)
 
 # The new .po has to be gone over by hand, so we deposit it into
 # build/po with a different extension.
+# If build/po/$(PACKAGE).pot exists, use it (it was just created),
+# else use the one in srcdir.
 .po.pox:
        test -d po || mkdir po
-       $(MSGMERGE) $< $(srcdir)/po/$(PACKAGE).pot -o $@
+       $(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
+                       then echo po/$(PACKAGE).pot; \
+                       else echo $(srcdir)/po/$(PACKAGE).pot; fi` -o $@
 
 # This rule has to look for .gmo modules in both srcdir and
 # the cwd, and has to check that we actually have a catalog
@@ -3408,11 +3412,10 @@ install-po:
 # relatively harmless since the .po files do not directly depend on it.
 # Note that exgettext has an awk script embedded in it which requires a
 # fairly modern (POSIX-compliant) awk.
+# The .pot file is left in the build directory.
 $(PACKAGE).pot: po/$(PACKAGE).pot
 po/$(PACKAGE).pot: force
        test -d po || mkdir po
        $(MAKE) po-generated
        AWK=$(AWK) $(SHELL) $(srcdir)/po/exgettext \
                $(XGETTEXT) $(PACKAGE) $(srcdir)
-       $(SHELL) $(srcdir)/move-if-change $(PACKAGE).pot \
-               $(srcdir)/po/$(PACKAGE).pot
index 05af2a7a5ec9533d33758d9493064cbdab1f81b2..aae815fe089869ff3a6216df33d32ef74bc9743e 100644 (file)
@@ -1,3 +1,7 @@
+2001-11-08  Zack Weinberg  <zack@codesourcery.com>
+
+       * exgettext: Deposit new potfile in po subdir.
+
 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
 
        * EXCLUDES: New file.
index 824763fa463815fd2ac121bb1d025d3da31b4023..6b1073eff1d0e930a0d172f4c4b916a6de6071c7 100644 (file)
@@ -153,4 +153,4 @@ END {
 echo "running xgettext..." >&2
 $xgettext --default-domain=$package --directory=$srcdir \
          --add-comments `cat $kopt` --files-from=$posr \
-         -o $package.pot
+         -o po/$package.pot