]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
tests: use absolute path of source files
authorRoumen Petrov <bugtrack@roumenpetrov.info>
Sun, 12 Jan 2014 18:16:53 +0000 (20:16 +0200)
committerDaiki Ueno <ueno@gnu.org>
Tue, 28 Jan 2014 07:00:51 +0000 (16:00 +0900)
Replace ../$top_srcdir with $abs_top_srcdir in gettext-tools tests
to add support for configuration with absolute path.

gettext-tools/tests/Makefile.am
gettext-tools/tests/lang-c
gettext-tools/tests/lang-c++
gettext-tools/tests/lang-objc
gettext-tools/tests/msgunfmt-tcl-1
gettext-tools/tests/xgettext-1
gettext-tools/tests/xgettext-c-1

index 12a25cfd6082c3b84f36c422a3ed0d9fc491aefc..d727bfa590bd2989d7b046c916c7fe7a92c024c5 100644 (file)
@@ -161,6 +161,7 @@ CHECKER =
 
 TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) \
                    abs_srcdir=$(abs_srcdir) \
+                   abs_top_srcdir=$(abs_top_srcdir) \
                    GETTEXT="$(CHECKER) tstgettext" \
                    NGETTEXT="$(CHECKER) tstngettext" \
                    XGETTEXT="$(CHECKER) xgettext" \
index 87cfdcc5cb8114901e01ea8dfdfecca0c8a8a9c0..a4103c9d59644ab68bb50c9aa957952a6695e5f1 100755 (executable)
@@ -48,7 +48,7 @@ tmpfiles="$tmpfiles l-c-prog.${OBJEXT} l-c-prog${EXEEXT}"
 # is found in the build directory, regardless of -I options present in
 # ${CFLAGS} or ${CPPFLAGS}.
 : ${LIBTOOL=/bin/sh ../../libtool}
-${LIBTOOL} --quiet --mode=link ${CC} -I../.. -I../${top_srcdir=..}/gnulib-lib ../../gnulib-lib/libgettextlib.la -I../../intl ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o l-c-prog prog.c ${LTLIBINTL} \
+${LIBTOOL} --quiet --mode=link ${CC} -I../.. -I"$abs_top_srcdir"/gnulib-lib ../../gnulib-lib/libgettextlib.la -I../../intl ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o l-c-prog prog.c ${LTLIBINTL} \
   || exit 1
 
 tmpfiles="$tmpfiles l-c-prog.tmp l-c-prog.pot"
index 0b18b1ea7c185496ee124c3945838441adfe1fdb..f21057d2c6bb34bd0d65239f27a02caa016bbf92 100755 (executable)
@@ -66,7 +66,7 @@ tmpfiles="$tmpfiles l-c++-prog.${OBJEXT} l-c++-prog${EXEEXT}"
 # Put the -I flags before ${CXXFLAGS} ${CPPFLAGS}, to make sure that libintl.h
 # is found in the build directory, regardless of -I options present in
 # ${CXXFLAGS} or ${CPPFLAGS}.
-${CXX} -I../.. -I../../../gettext-runtime/libasprintf -I../${top_srcdir=..}/gnulib-lib -I../../intl ${CXXFLAGS} ${CPPFLAGS} -c l-c++-prog.cc \
+${CXX} -I../.. -I../../../gettext-runtime/libasprintf -I"$abs_top_srcdir"/gnulib-lib -I../../intl ${CXXFLAGS} ${CPPFLAGS} -c l-c++-prog.cc \
   || exit 1
 # Remove the -Wl,--disable-auto-import option here that is added by
 # woe32-dll.m4. Cygwin 1.7.2 does not support it in C++ mode: It gives
index ec13cef95619b1d0bb077cd7f69bbfcb29c3b23a..75884e517c112b983b4e2d5be7f1319e3d37e710 100755 (executable)
@@ -64,7 +64,7 @@ tmpfiles="$tmpfiles l-objc-prog.${OBJEXT} l-objc-prog${EXEEXT}"
 # is found in the build directory, regardless of -I options present in
 # ${CFLAGS} or ${CPPFLAGS}.
 : ${LIBTOOL=/bin/sh ../../libtool}
-${LIBTOOL} --quiet --mode=link ${CC} -I../.. -I../${top_srcdir=..}/gnulib-lib ../../gnulib-lib/libgettextlib.la -I../../intl ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o l-objc-prog prog.m ${LTLIBINTL} \
+${LIBTOOL} --quiet --mode=link ${CC} -I../.. -I"$abs_top_srcdir"/gnulib-lib ../../gnulib-lib/libgettextlib.la -I../../intl ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o l-objc-prog prog.m ${LTLIBINTL} \
   || exit 1
 
 tmpfiles="$tmpfiles l-objc-prog.tmp l-objc-prog.pot"
index 4f91b85bae2f4f894ff732457f833ebd52d73053..2dae62a88c6ee3e4cb98c10656145668b196da16 100755 (executable)
@@ -49,7 +49,7 @@ ${MSGFMT} --tcl -d mu-tcl-1-msgs -l fr mu-tcl-1-fr.po || exit 1
 
 tmpfiles="$tmpfiles mu-tcl-1-prog.out"
 : ${MSGUNFMT=msgunfmt}
-GETTEXTDATADIR=../${top_srcdir=..}/src \
+GETTEXTDATADIR="$abs_top_srcdir"/src \
 ${MSGUNFMT} --tcl -d mu-tcl-1-msgs -l fr -o mu-tcl-1-prog.out || exit 1
 
 tmpfiles="$tmpfiles mu-tcl-1-prog.ok"
index 0c4c9c51493064db53303883c6dc85c419495c25..64c190a2b21af8ac8289bc74c2140b8dc58c7489 100755 (executable)
@@ -12,8 +12,8 @@ tmpfiles="$tmpfiles zero-domain.po xg-test1.err"
 rm -f zero-domain.po
 : ${XGETTEXT=xgettext}
 LC_MESSAGES=C LC_ALL= \
-${XGETTEXT} -k_ -d zero-domain -x ../${top_srcdir=..}/po/gettext-tools.pot \
-  ../${top_srcdir=..}/src/xgettext.c >xg-test1.err 2>&1
+${XGETTEXT} -k_ -d zero-domain -x "$abs_top_srcdir"/po/gettext-tools.pot \
+  "$abs_top_srcdir"/src/xgettext.c >xg-test1.err 2>&1
 result=$?
 cat xg-test1.err | grep -v 'warning: Charset' | grep -v '^ '
 test $result = 0 || { rm -fr $tmpfiles; exit 1; }
index 084df37f68ca2685e3ce703058ccab7503525710..c6d94cce9869541f46e4da681cd3377ba7eef62f 100755 (executable)
@@ -11,7 +11,7 @@ trap 'rm -fr $tmpfiles' 1 2 3 15
 tmpfiles="$tmpfiles xg-c-1.tmp.po xg-c-1.po"
 : ${XGETTEXT=xgettext}
 ${XGETTEXT} -d xg-c-1.tmp -k_ --omit-header --no-location \
../${top_srcdir=..}/src/xgettext.c ../${top_srcdir=..}/src/msgfmt.c
"$abs_top_srcdir"/src/xgettext.c "$abs_top_srcdir"/src/msgfmt.c
 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
 LC_ALL=C tr -d '\r' < xg-c-1.tmp.po > xg-c-1.po
 test $? = 0 || { rm -fr $tmpfiles; exit 1; }