From: Roumen Petrov Date: Sun, 12 Jan 2014 18:16:53 +0000 (+0200) Subject: tests: use absolute path of source files X-Git-Tag: v0.19~148 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68cb2ce13e9ed2c6edb3517bdafc56ed34540885;p=thirdparty%2Fgettext.git tests: use absolute path of source files Replace ../$top_srcdir with $abs_top_srcdir in gettext-tools tests to add support for configuration with absolute path. --- diff --git a/gettext-tools/tests/Makefile.am b/gettext-tools/tests/Makefile.am index 12a25cfd6..d727bfa59 100644 --- a/gettext-tools/tests/Makefile.am +++ b/gettext-tools/tests/Makefile.am @@ -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" \ diff --git a/gettext-tools/tests/lang-c b/gettext-tools/tests/lang-c index 87cfdcc5c..a4103c9d5 100755 --- a/gettext-tools/tests/lang-c +++ b/gettext-tools/tests/lang-c @@ -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" diff --git a/gettext-tools/tests/lang-c++ b/gettext-tools/tests/lang-c++ index 0b18b1ea7..f21057d2c 100755 --- a/gettext-tools/tests/lang-c++ +++ b/gettext-tools/tests/lang-c++ @@ -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 diff --git a/gettext-tools/tests/lang-objc b/gettext-tools/tests/lang-objc index ec13cef95..75884e517 100755 --- a/gettext-tools/tests/lang-objc +++ b/gettext-tools/tests/lang-objc @@ -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" diff --git a/gettext-tools/tests/msgunfmt-tcl-1 b/gettext-tools/tests/msgunfmt-tcl-1 index 4f91b85ba..2dae62a88 100755 --- a/gettext-tools/tests/msgunfmt-tcl-1 +++ b/gettext-tools/tests/msgunfmt-tcl-1 @@ -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" diff --git a/gettext-tools/tests/xgettext-1 b/gettext-tools/tests/xgettext-1 index 0c4c9c514..64c190a2b 100755 --- a/gettext-tools/tests/xgettext-1 +++ b/gettext-tools/tests/xgettext-1 @@ -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; } diff --git a/gettext-tools/tests/xgettext-c-1 b/gettext-tools/tests/xgettext-c-1 index 084df37f6..c6d94cce9 100755 --- a/gettext-tools/tests/xgettext-c-1 +++ b/gettext-tools/tests/xgettext-c-1 @@ -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; }