# (This should also work without GNU Make.)
required=cc
-. ./defs || Exit 1
+. ./defs || exit 1
cat >>configure.ac <<'EOF'
AC_PROG_CC
SUBDIRS = sub3
.PHONY: test-prog-updated
test-prog-updated:
- stat older sub3/run$(EXEEXT) || : For debugging.
- test `ls -t older sub3/run$(EXEEXT) | sed 1q` = sub3/run$(EXEEXT)
+ is_newest sub3/run$(EXEEXT) sub2/config.bot
END
cat > sub3/Makefile.am <<'END'
./configure --enable-dependency-tracking
$MAKE
# Sanity check.
-cross_compiling || { sub3/run | grep grepme1; }
+cross_compiling || sub3/run | grep grepme1 || exit 1
-: > older
$sleep
echo '#define NAME "grepme2"' > sub2/config.bot
$MAKE
-cross_compiling || { sub3/run | grep grepme2; }
+cross_compiling || sub3/run | grep grepme2 || exit 1
$MAKE test-prog-updated
$MAKE distcheck