summaryrefslogtreecommitdiffstats
path: root/gettext-tools/examples/hello-objc
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2005-02-24 13:16:02 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:12:17 +0200
commit4db28b11882ef2cf819ee270abb2cf6d3a44780f (patch)
treecd2cd02401731d778039b28df3d0aec719b6ce87 /gettext-tools/examples/hello-objc
parent840c7f9ca5c47d9ea80df9b5e338f24f24bda772 (diff)
downloadexternal_gettext-4db28b11882ef2cf819ee270abb2cf6d3a44780f.zip
external_gettext-4db28b11882ef2cf819ee270abb2cf6d3a44780f.tar.gz
external_gettext-4db28b11882ef2cf819ee270abb2cf6d3a44780f.tar.bz2
Make it work in VPATH builds.
Diffstat (limited to 'gettext-tools/examples/hello-objc')
-rwxr-xr-xgettext-tools/examples/hello-objc/autogen.sh23
1 files changed, 20 insertions, 3 deletions
diff --git a/gettext-tools/examples/hello-objc/autogen.sh b/gettext-tools/examples/hello-objc/autogen.sh
index c21af8c..7dd3c23 100755
--- a/gettext-tools/examples/hello-objc/autogen.sh
+++ b/gettext-tools/examples/hello-objc/autogen.sh
@@ -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