aclocal: fix for more-than-once specified directories
[platform/upstream/automake.git] / t / silent-yacc.sh
index 4b493b5..5017d50 100755 (executable)
@@ -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
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check silent-rules mode for Yacc.
-# Keep this in sync with sister test 'silent-yacc-gcc.test'.
 
 required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
 
 mkdir sub
 
@@ -66,16 +65,16 @@ $AUTOMAKE --add-missing
 $AUTOCONF
 
 # Ensure per-target rules are used, to ensure their coverage below.
-$FGREP 'foo2-foo.c' Makefile.in || Exit 99
-$FGREP 'bar2-bar.c' sub/Makefile.in || Exit 99
+$FGREP 'foo2-foo.c' Makefile.in || exit 99
+$FGREP 'bar2-bar.c' sub/Makefile.in || exit 99
 
 ./configure --enable-silent-rules
 
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
 cat stdout
 
-$EGREP ' (-c|-o)' stdout && Exit 1
-$EGREP '(mv|ylwrap) ' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && exit 1
+$EGREP '(mv|ylwrap) ' stdout && exit 1
 
 grep 'YACC .*foo\.' stdout
 grep 'YACC .*bar\.' stdout
@@ -91,11 +90,11 @@ grep 'CCLD .*bar2' stdout
 # different set of rules.
 $MAKE clean
 
-$MAKE >stdout || { cat stdout; Exit 1; }
+$MAKE >stdout || { cat stdout; exit 1; }
 cat stdout
 
-$EGREP ' (-c|-o)' stdout && Exit 1
-$EGREP '(mv|ylwrap) ' stdout && Exit 1
+$EGREP ' (-c|-o)' stdout && exit 1
+$EGREP '(mv|ylwrap) ' stdout && exit 1
 
 # Don't look for YACC, as probably yacc hasn't been re-run.
 grep ' CC .*foo\.' stdout
@@ -109,27 +108,27 @@ grep 'CCLD .*bar2' stdout
 $MAKE clean
 rm -f *foo.[ch] sub/*bar.[ch]
 
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 >stdout || { cat stdout; exit 1; }
 cat stdout
 
 grep ' -c ' stdout
 grep ' -o ' stdout
 grep 'ylwrap ' stdout
 
-$EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+$EGREP '(YACC|CC|CCLD) ' stdout && exit 1
 
 # Cleaning and then rebuilding with the same V flag (and without
 # removing the generated sources in between) shouldn't trigger a
 # different set of rules.
 $MAKE clean
 
-$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+$MAKE V=1 >stdout || { cat stdout; exit 1; }
 cat stdout
 
 # Don't look for ylwrap, as probably lex hasn't been re-run.
 grep ' -c ' stdout
 grep ' -o ' stdout
 
-$EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+$EGREP '(YACC|CC|CCLD) ' stdout && exit 1
 
 :