tests: expose automake bug#13940
[platform/upstream/automake.git] / t / gettext-macros.sh
old mode 100755 (executable)
new mode 100644 (file)
index 1d94dad..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 ()
 {
@@ -61,7 +61,10 @@ AM_GNU_GETTEXT
 AM_GNU_GETTEXT_VERSION([$autopoint_version])
 END
 
-if ! ($am_gettextize_command --force && test -f m4/gettext.m4); then
+if $am_gettextize_command --force && test -f m4/gettext.m4; then
+  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
   # available, but this doesn't mean the user hasn't made the gettext
   # macros available, e.g., by properly setting ACLOCAL_PATH.
@@ -75,12 +78,12 @@ if ! ($am_gettextize_command --force && test -f m4/gettext.m4); then
   fi
 fi
 
-echo "ACLOCAL_PATH='$(pwd)/m4':\$ACLOCAL_PATH" >> get.sh
-echo "export ACLOCAL_PATH" >> 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.
-echo 'AC_DEFUN([AM_MKDIR_P], [AC_MKDIR_P([$@])])' >> m4/mk-dirp.m4
+ACLOCAL="$ACLOCAL -Wno-obsolete"
+AUTOMAKE="$AUTOMAKE -Wno-obsolete"
+END
 
 . ./get.sh