am-ft: make the environment available earlier
[platform/upstream/automake.git] / t / silent-lex.sh
old mode 100755 (executable)
new mode 100644 (file)
index 6cc0430..3bfc400
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# Copyright (C) 2010-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
@@ -22,7 +22,6 @@ required='cc lex'
 mkdir sub
 
 cat >>configure.ac <<'EOF'
-AM_PROG_CC_C_O
 AC_PROG_LEX
 AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
@@ -74,8 +73,7 @@ $FGREP 'bar2-bar.c' sub/Makefile.in || exit 99
 
 ./configure --enable-silent-rules
 
-$MAKE >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O
 
 $EGREP ' (-c|-o)' stdout && exit 1
 $EGREP '(mv|ylwrap) ' stdout && exit 1
@@ -94,8 +92,7 @@ grep 'CCLD .*bar2' stdout
 # different set of rules.
 $MAKE clean
 
-$MAKE >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O
 
 $EGREP ' (-c|-o)' stdout && exit 1
 $EGREP '(mv|ylwrap) ' stdout && exit 1
@@ -112,8 +109,7 @@ grep 'CCLD .*bar2' stdout
 $MAKE clean
 rm -f *foo.c sub/*bar.c
 
-$MAKE V=1 >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O V=1
 
 grep ' -c ' stdout
 grep ' -o ' stdout
@@ -126,8 +122,7 @@ $EGREP '(LEX|CC|CCLD) ' stdout && exit 1
 # different set of rules.
 $MAKE clean
 
-$MAKE V=1 >stdout || { cat stdout; exit 1; }
-cat stdout
+run_make -O V=1
 
 # Don't look for ylwrap, as probably lex hasn't been re-run.
 grep ' -c ' stdout