tests: cosmetic changes in t/extra-sources.sh
[platform/upstream/automake.git] / t / yflags2.sh
old mode 100755 (executable)
new mode 100644 (file)
index a933447..1987cac
@@ -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
 
 # Check that $(YFLAGS) takes precedence over both $(AM_YFLAGS) and
 # $(foo_YFLAGS).
-# Please keep this in sync with the sister tests yflags.test, lflags.test
-# and lflags2.test.
+# Please keep this in sync with the sister tests yflags.sh, lflags.sh
+# and lflags2.sh.
 
-. ./defs || Exit 1
+. test-init.sh
 
 cat >fake-yacc <<'END'
 #!/bin/sh
@@ -28,10 +28,6 @@ echo 'extern int dummy;' >> y.tab.c
 END
 chmod a+x fake-yacc
 
-# Remove Yacc from the environment, so that it won't interfere
-# with 'make -e' below.
-unset YACC || :
-
 cat >> configure.ac <<'END'
 AC_SUBST([CXX], [false])
 # Simulate presence of Yacc using our fake-yacc script.
@@ -51,15 +47,15 @@ END
 $ACLOCAL
 $AUTOMAKE -a
 
-grep '\$(YFLAGS).*\$(bar_YFLAGS)' Makefile.in && Exit 1
-grep '\$(YFLAGS).*\$(AM_YFLAGS)' Makefile.in && Exit 1
+grep '\$(YFLAGS).*\$(bar_YFLAGS)' Makefile.in && exit 1
+grep '\$(YFLAGS).*\$(AM_YFLAGS)' Makefile.in && exit 1
 
 : > foo.yy
 : > bar.y++
 
 $AUTOCONF
 ./configure
-env YFLAGS=__user_flags__ $MAKE -e foo.cc bar-bar.c++
+run_make YFLAGS=__user_flags__ foo.cc bar-bar.c++
 
 cat foo.cc
 cat bar-bar.c++