]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Make "make dist" work in VPATH builds.
authorBruno Haible <bruno@clisp.org>
Wed, 23 Feb 2005 20:47:49 +0000 (20:47 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:17 +0000 (12:12 +0200)
gettext-tools/examples/ChangeLog
gettext-tools/examples/po/Makefile.am
gettext-tools/examples/po/xsmallpot.sh

index 55772fec7e6e9d934396e69e81e0faed57583a95..36ef75b71d8979883b770cd6684ac8bc176bddf8 100644 (file)
@@ -1,3 +1,9 @@
+2005-02-23  Bruno Haible  <bruno@clisp.org>
+
+       * xsmallpot.sh: Add srcdir argument. Make it work when
+       builddir != srcdir.
+       * Makefile.am (hello-*.pot): Update xsmallpot.sh invocations.
+
 2005-02-21  Bruno Haible  <bruno@clisp.org>
 
        * po/vi.po: New file, from Clytie Siddall <clytie@riverland.net.au>.
index a8a7f0d1b5adb5269e32785dfbbe27cb92e2d35e..8ff78e4678697fbc5d6b07c3d564e34a0127fcce 100644 (file)
@@ -196,85 +196,85 @@ $(DOMAIN).pot-update: $(POTFILES_DEPS) $(SMALLPOTS) remove-potcdate.sed
 
 
 hello-c.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-c
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c
 
 hello-c-gnome.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-c-gnome
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c-gnome
 
 hello-c++.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-c++
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c++
 
 hello-c++-qt.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-c++-qt
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c++-qt
 
 hello-c++-kde.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-c++-kde
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c++-kde
 
 hello-c++-gnome.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-c++-gnome
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c++-gnome
 
 hello-objc.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-objc
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-objc
 
 hello-objc-gnustep.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-objc-gnustep
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-objc-gnustep
 
 hello-objc-gnome.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-objc-gnome
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-objc-gnome
 
 hello-sh.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-sh
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-sh
 
 hello-python.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-python
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-python
 
 hello-clisp.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-clisp
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-clisp
 
 hello-librep.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-librep
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-librep
 
 hello-guile.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-guile
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-guile
 
 hello-smalltalk.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-smalltalk
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-smalltalk
 
 hello-java.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-java
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-java
 
 hello-java-awt.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-java-awt
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-java-awt
 
 hello-java-swing.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-java-swing
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-java-swing
 
 hello-csharp.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-csharp
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-csharp
 
 hello-csharp-forms.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-csharp-forms
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-csharp-forms
 
 hello-gawk.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-gawk
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-gawk
 
 hello-pascal.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-pascal
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-pascal
 
 hello-ycp.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-ycp
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-ycp
 
 hello-tcl.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-tcl
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-tcl
 
 hello-tcl-tk.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-tcl-tk
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-tcl-tk
 
 hello-perl.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-perl
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-perl
 
 hello-php.pot : $(POTFILES_DEPS)
-       $(SHELL) xsmallpot.sh hello-php
+       $(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-php
 
 
 # This rule has no dependencies: we don't need to update $(DOMAIN).pot at
index 9d0c98f8980ad248c91560622981d8ea8cb22147..e107bb66f53180baa38d4bcb4beef129eb5cbae1 100755 (executable)
@@ -1,15 +1,21 @@
 #!/bin/sh
-# Usage: xsmallpot.sh hello-foo [hello-foobar.pot]
+# Usage: xsmallpot.sh srcdir hello-foo [hello-foobar.pot]
 
 set -e
 
-test $# = 1 || test $# = 2 || { echo "Usage: xsmallpot.sh hello-foo [hello-foobar.pot]" 1>&2; exit 1; }
-directory=$1
-potfile=${2-$directory.pot}
+# Nuisances.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+test $# = 2 || test $# = 3 || { echo "Usage: xsmallpot.sh srcdir hello-foo [hello-foobar.pot]" 1>&2; exit 1; }
+srcdir=$1
+directory=$2
+potfile=${3-$directory.pot}
+
+abs_srcdir=`cd "$srcdir" && pwd`
 
 cd ..
 rm -rf tmp-$directory
-cp -p -r $directory tmp-$directory
+cp -p -r "$abs_srcdir"/../$directory tmp-$directory
 cd tmp-$directory
 case $directory in
   hello-c++-kde)