Merge branch 'maint'
[platform/upstream/automake.git] / t / remake8a.sh
index 1b32a5e..5ec642d 100755 (executable)
 # This testcase checks dependency of generated Makefile from Makefile.am,
 # configure.ac, acinclude.m4, aclocal.m4, and extra m4 files considered
 # by aclocal.
-# Keep this in sync with sister test 'remake8b.test', which performs the
+# Keep this in sync with sister test 'remake8b.sh', which performs the
 # same checks for a VPATH build.
 
-. ./defs || Exit 1
+. ./defs || exit 1
 
 mv -f configure.ac configure.stub
 
@@ -43,7 +43,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-srcdir='.' # To make syncing with remake8b.test easier.
+srcdir='.' # To make syncing with remake8b.sh easier.
 
 $srcdir/configure
 
@@ -74,7 +74,7 @@ using_gmake || $MAKE Makefile
 $MAKE
 cat bar
 grep '!Baz!' bar
-test ! -r foo
+test ! -e foo
 $MAKE distcheck
 
 rm -f bar
@@ -105,34 +105,34 @@ using_gmake || $MAKE Makefile
 $MAKE
 cat quux
 grep '!Zardoz!' quux
-test ! -r bar
+test ! -e bar
 $MAKE distcheck
 
 rm -f quux
 
-# Modify Makefile.am to add a directory of extra m4 files
-# considered by aclocal.
+# Modify configure.ac and aclocal.m4 to add a directory of extra m4
+# files considered by aclocal.  Also update checks in Makefile.am.
+# Note that we won't use this new directory of extra m4 files in the
+# first rebuild below (but we will in the second).
 
 $sleep
 
 mkdir $srcdir/m4
 
 cat > $srcdir/Makefile.am <<'END'
-ACLOCAL_AMFLAGS = -I m4
+all-local: quux
 check-local:
        cat quux
        grep '%Foo%' quux
        test x'$(QUUX)' = x'%Foo%'
 END
 
-$MAKE # This should place aclocal flags in Makefile.
-grep '.*-I m4' Makefile # Sanity check.
-
 # Modify configure.ac and aclocal.m4.
 
 $sleep
 
 cat $srcdir/configure.stub - > $srcdir/configure.ac <<'END'
+AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_FILES([quux])
 MY_CUSTOM_MACRO
 AC_OUTPUT