tests: expose automake bug#13940
[platform/upstream/automake.git] / t / gettext-macros.sh
old mode 100755 (executable)
new mode 100644 (file)
index 416a8e5..639a172
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2013 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
 # to the test cases requiring them.
 # See also automake bug#9807.
 
-. ./defs || Exit 1
+. test-init.sh
 
 extract_program_version ()
 {
@@ -49,7 +49,7 @@ fi
 # in the AM_GNU_GETTEXT_VERSION call in configure.ac if we want autopoint
 # (or gettextize) to setup the correct infrastructure -- in particular,
 # for what concerns us, to bring in all the required .m4 files.
-autopoint_version=`extract_program_version $am_gettextize_command` \
+autopoint_version=$(extract_program_version $am_gettextize_command) \
   && test -n "$autopoint_version" \
   || autopoint_version=0.10.35
 
@@ -62,7 +62,7 @@ AM_GNU_GETTEXT_VERSION([$autopoint_version])
 END
 
 if $am_gettextize_command --force && test -f m4/gettext.m4; then
-  echo "ACLOCAL_PATH='`pwd`/m4':\$ACLOCAL_PATH" >> get.sh
+  echo "ACLOCAL_PATH='$(pwd)/m4':\$ACLOCAL_PATH" >> get.sh
   echo "export ACLOCAL_PATH" >> get.sh
 else
   # Older versions of gettext might not have a gettextize program
@@ -78,8 +78,6 @@ else
   fi
 fi
 
-. ./get.sh
-
 cat >> get.sh <<'END'
 # Even recent versions of gettext used the now-obsolete 'AM_PROG_MKDIR_P'
 # m4 macro.  So we need the following to avoid spurious errors.
@@ -87,6 +85,8 @@ ACLOCAL="$ACLOCAL -Wno-obsolete"
 AUTOMAKE="$AUTOMAKE -Wno-obsolete"
 END
 
+. ./get.sh
+
 $ACLOCAL --force -I m4 || cat >> get.sh <<'END'
 # We need to use '-Wno-syntax', since we do not want our test suite
 # to fail merely because some third-party '.m4' file is underquoted.
@@ -95,7 +95,7 @@ END
 
 # Remove any Makefile.in possibly created by gettextize/autopoint, to
 # avoid spurious maintainer-check failures.
-rm -f `find . -name Makefile.in`
+rm -f $(find . -name Makefile.in)
 
 # The file gettextize or autopoint might have copied in the 'm4'
 # subdirectory of the test directory are going to be needed by