]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Make it work in VPATH builds.
authorBruno Haible <bruno@clisp.org>
Thu, 24 Feb 2005 13:16:02 +0000 (13:16 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:17 +0000 (12:12 +0200)
24 files changed:
gettext-tools/examples/ChangeLog
gettext-tools/examples/hello-c++-qt/autogen.sh
gettext-tools/examples/hello-c++/autogen.sh
gettext-tools/examples/hello-c/autogen.sh
gettext-tools/examples/hello-clisp/autogen.sh
gettext-tools/examples/hello-csharp-forms/autogen.sh
gettext-tools/examples/hello-csharp/autogen.sh
gettext-tools/examples/hello-gawk/autogen.sh
gettext-tools/examples/hello-guile/autogen.sh
gettext-tools/examples/hello-java-awt/autogen.sh
gettext-tools/examples/hello-java-swing/autogen.sh
gettext-tools/examples/hello-java/autogen.sh
gettext-tools/examples/hello-librep/autogen.sh
gettext-tools/examples/hello-objc-gnustep/autogen.sh
gettext-tools/examples/hello-objc/autogen.sh
gettext-tools/examples/hello-pascal/autogen.sh
gettext-tools/examples/hello-perl/autogen.sh
gettext-tools/examples/hello-php/autogen.sh
gettext-tools/examples/hello-python/autogen.sh
gettext-tools/examples/hello-sh/autogen.sh
gettext-tools/examples/hello-smalltalk/autogen.sh
gettext-tools/examples/hello-tcl-tk/autogen.sh
gettext-tools/examples/hello-tcl/autogen.sh
gettext-tools/examples/hello-ycp/autogen.sh

index ec6fc5149b91f994badc8d99636f49e4d9e7ca6a..f819629b1caaccecaf3eedc861071f9084b70c63 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-24  Bruno Haible  <bruno@clisp.org>
+
+       * hello-*/autogen.sh: Define and use GETTEXT_TOPSRCDIR, to make it
+       work in VPATH builds.
+
 2005-02-23  Bruno Haible  <bruno@clisp.org>
 
        * xsmallpot.sh: Make the temporary directory writable.
index 1853bf4100ea0ae35387014410bb0c15689a47ec..4633d75ac67c36e99675d577c10da3d3b3963018 100755 (executable)
@@ -1,15 +1,32 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
 aclocal -I m4
 
index 65739de46aff2c71f957e32445192c964a15829a..272786729e31998b3528c6da31b281379065ce27 100755 (executable)
@@ -1,13 +1,30 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${GETTEXTSRCDIR-../../../gettext-tools/lib}/gettext.h gettext.h
+cp -p ${GETTEXTSRCDIR-$GETTEXT_TOPSRCDIR/gettext-tools/lib}/gettext.h gettext.h
 
 autopoint -f # was: gettextize -f -c
 rm po/Makevars.template
index c21af8cd02261b370ac05cc8cf4420389890c1f1..7dd3c2358c167adec810fa8cca7e11928a0b9fbd 100755 (executable)
@@ -1,13 +1,30 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${GETTEXTSRCDIR-../../../gettext-tools/lib}/gettext.h gettext.h
+cp -p ${GETTEXTSRCDIR-$GETTEXT_TOPSRCDIR/gettext-tools/lib}/gettext.h gettext.h
 
 autopoint -f # was: gettextize -f -c
 rm po/Makevars.template
index dc73bff82601f442336dc31eff4971fec0a9e984..591fa2947b5ede32fb9bcf77b0ea931a15de6973 100755 (executable)
@@ -1,15 +1,32 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
 aclocal -I m4
 
index acb18c508248b4c9bef1b20d94b7e264444d3d30..7a699ee80a009a667d21243bcbf834f70e81eaa3 100755 (executable)
@@ -1,21 +1,38 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003-2004 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/m4}/csharpcomp.m4 m4/csharpcomp.m4
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/m4}/csharpexec.m4 m4/csharpexec.m4
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/m4}/csharp.m4 m4/csharp.m4
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/lib}/csharpcomp.sh.in csharpcomp.sh.in
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/lib}/csharpexec.sh.in csharpexec.sh.in
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/m4}/csharpcomp.m4 m4/csharpcomp.m4
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/m4}/csharpexec.m4 m4/csharpexec.m4
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/m4}/csharp.m4 m4/csharp.m4
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/lib}/csharpcomp.sh.in csharpcomp.sh.in
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/lib}/csharpexec.sh.in csharpexec.sh.in
 
 aclocal -I m4
 
index acb18c508248b4c9bef1b20d94b7e264444d3d30..2b9c6ec86835c0ef54d0ced99b9b054fcd894f29 100755 (executable)
@@ -1,21 +1,38 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003-2004 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005-2004 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/m4}/csharpcomp.m4 m4/csharpcomp.m4
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/m4}/csharpexec.m4 m4/csharpexec.m4
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/m4}/csharp.m4 m4/csharp.m4
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/lib}/csharpcomp.sh.in csharpcomp.sh.in
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/lib}/csharpexec.sh.in csharpexec.sh.in
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/m4}/csharpcomp.m4 m4/csharpcomp.m4
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/m4}/csharpexec.m4 m4/csharpexec.m4
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/m4}/csharp.m4 m4/csharp.m4
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/lib}/csharpcomp.sh.in csharpcomp.sh.in
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/lib}/csharpexec.sh.in csharpexec.sh.in
 
 aclocal -I m4
 
index dc73bff82601f442336dc31eff4971fec0a9e984..591fa2947b5ede32fb9bcf77b0ea931a15de6973 100755 (executable)
@@ -1,15 +1,32 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
 aclocal -I m4
 
index dc73bff82601f442336dc31eff4971fec0a9e984..591fa2947b5ede32fb9bcf77b0ea931a15de6973 100755 (executable)
@@ -1,15 +1,32 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
 aclocal -I m4
 
index a8f05a9e0c2fa6df73bab01460a20d237199ac08..4eccce8a7b30a83af73ebe8128d0653e523656a0 100755 (executable)
@@ -1,21 +1,38 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/m4}/gcj.m4 m4/gcj.m4
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/m4}/javacomp.m4 m4/javacomp.m4
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/m4}/javaexec.m4 m4/javaexec.m4
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/lib}/javacomp.sh.in javacomp.sh.in
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/lib}/javaexec.sh.in javaexec.sh.in
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/m4}/gcj.m4 m4/gcj.m4
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/m4}/javacomp.m4 m4/javacomp.m4
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/m4}/javaexec.m4 m4/javaexec.m4
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/lib}/javacomp.sh.in javacomp.sh.in
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/lib}/javaexec.sh.in javaexec.sh.in
 
 aclocal -I m4
 
index a8f05a9e0c2fa6df73bab01460a20d237199ac08..4eccce8a7b30a83af73ebe8128d0653e523656a0 100755 (executable)
@@ -1,21 +1,38 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/m4}/gcj.m4 m4/gcj.m4
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/m4}/javacomp.m4 m4/javacomp.m4
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/m4}/javaexec.m4 m4/javaexec.m4
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/lib}/javacomp.sh.in javacomp.sh.in
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/lib}/javaexec.sh.in javaexec.sh.in
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/m4}/gcj.m4 m4/gcj.m4
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/m4}/javacomp.m4 m4/javacomp.m4
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/m4}/javaexec.m4 m4/javaexec.m4
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/lib}/javacomp.sh.in javacomp.sh.in
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/lib}/javaexec.sh.in javaexec.sh.in
 
 aclocal -I m4
 
index a8f05a9e0c2fa6df73bab01460a20d237199ac08..4eccce8a7b30a83af73ebe8128d0653e523656a0 100755 (executable)
@@ -1,21 +1,38 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/m4}/gcj.m4 m4/gcj.m4
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/m4}/javacomp.m4 m4/javacomp.m4
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/m4}/javaexec.m4 m4/javaexec.m4
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/lib}/javacomp.sh.in javacomp.sh.in
-cp -p ${EXAMPLESCONFIGDIR-../../../gettext-tools/lib}/javaexec.sh.in javaexec.sh.in
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/m4}/gcj.m4 m4/gcj.m4
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/m4}/javacomp.m4 m4/javacomp.m4
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/m4}/javaexec.m4 m4/javaexec.m4
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/lib}/javacomp.sh.in javacomp.sh.in
+cp -p ${EXAMPLESCONFIGDIR-$GETTEXT_TOPSRCDIR/gettext-tools/lib}/javaexec.sh.in javaexec.sh.in
 
 aclocal -I m4
 
index dc73bff82601f442336dc31eff4971fec0a9e984..591fa2947b5ede32fb9bcf77b0ea931a15de6973 100755 (executable)
@@ -1,15 +1,32 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
 aclocal -I m4
 
index 795b7f87d7dc2d9276895135e7b18a9bbceb7b5f..a296989cce2eaed8742b1153f36fb87676c6e6e5 100755 (executable)
@@ -1,10 +1,27 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
index c21af8cd02261b370ac05cc8cf4420389890c1f1..7dd3c2358c167adec810fa8cca7e11928a0b9fbd 100755 (executable)
@@ -1,13 +1,30 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${GETTEXTSRCDIR-../../../gettext-tools/lib}/gettext.h gettext.h
+cp -p ${GETTEXTSRCDIR-$GETTEXT_TOPSRCDIR/gettext-tools/lib}/gettext.h gettext.h
 
 autopoint -f # was: gettextize -f -c
 rm po/Makevars.template
index dc73bff82601f442336dc31eff4971fec0a9e984..591fa2947b5ede32fb9bcf77b0ea931a15de6973 100755 (executable)
@@ -1,15 +1,32 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
 aclocal -I m4
 
index dc73bff82601f442336dc31eff4971fec0a9e984..591fa2947b5ede32fb9bcf77b0ea931a15de6973 100755 (executable)
@@ -1,15 +1,32 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
 aclocal -I m4
 
index dc73bff82601f442336dc31eff4971fec0a9e984..591fa2947b5ede32fb9bcf77b0ea931a15de6973 100755 (executable)
@@ -1,15 +1,32 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
 aclocal -I m4
 
index dc73bff82601f442336dc31eff4971fec0a9e984..591fa2947b5ede32fb9bcf77b0ea931a15de6973 100755 (executable)
@@ -1,15 +1,32 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
 aclocal -I m4
 
index dc73bff82601f442336dc31eff4971fec0a9e984..591fa2947b5ede32fb9bcf77b0ea931a15de6973 100755 (executable)
@@ -1,15 +1,32 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
 aclocal -I m4
 
index dc73bff82601f442336dc31eff4971fec0a9e984..591fa2947b5ede32fb9bcf77b0ea931a15de6973 100755 (executable)
@@ -1,15 +1,32 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
 aclocal -I m4
 
index c9165aef04140e674f47e682ab5100557e3c1737..e11e9a092810e5f1216ac15c9cc8b761afa128c6 100755 (executable)
@@ -1,15 +1,32 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
 aclocal -I m4
 
index c9165aef04140e674f47e682ab5100557e3c1737..e11e9a092810e5f1216ac15c9cc8b761afa128c6 100755 (executable)
@@ -1,15 +1,32 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
 aclocal -I m4
 
index dc73bff82601f442336dc31eff4971fec0a9e984..591fa2947b5ede32fb9bcf77b0ea931a15de6973 100755 (executable)
@@ -1,15 +1,32 @@
 #!/bin/sh
 # Example for use of GNU gettext.
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005 Free Software Foundation, Inc.
 # This file is in the public domain.
 #
 # Script for regenerating all autogenerated files.
 
-test -r ../Makefile.am || . ../installpaths
+if test -r ../Makefile.am; then
+  # Inside the gettext source directory.
+  GETTEXT_TOPSRCDIR=../../..
+else
+  if test -r ../Makefile; then
+    # Inside a gettext build directory.
+    GETTEXT_TOOLS_SRCDIR=`sed -n -e 's,^top_srcdir *= *\(.*\)$,\1,p' ../Makefile`
+    # Adjust a relative top_srcdir.
+    case $GETTEXT_TOOLS_SRCDIR in
+      /*) ;;
+      *) GETTEXT_TOOLS_SRCDIR=../$GETTEXT_TOOLS_SRCDIR ;;
+    esac
+    GETTEXT_TOPSRCDIR=$GETTEXT_TOOLS_SRCDIR/..
+  else
+    # Installed under ${prefix}/share/doc/gettext/examples.
+    . ../installpaths
+  fi
+fi
 
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/nls.m4 m4/nls.m4
-cp -p ${ACLOCALDIR-../../../gettext-runtime/m4}/po.m4 m4/po.m4
-cp -p ${GETTEXTSRCPODIR-../../../gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/nls.m4 m4/nls.m4
+cp -p ${ACLOCALDIR-$GETTEXT_TOPSRCDIR/gettext-runtime/m4}/po.m4 m4/po.m4
+cp -p ${GETTEXTSRCPODIR-$GETTEXT_TOPSRCDIR/gettext-runtime/po}/remove-potcdate.sin po/remove-potcdate.sin
 
 aclocal -I m4