tests: prune some weed in a non-POSIX test
[platform/upstream/automake.git] / t / yflags-cmdline-override.sh
old mode 100755 (executable)
new mode 100644 (file)
index a164872..03c0483
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-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
@@ -18,9 +18,7 @@
 # at configure time and/or at make time.
 
 required='cc yacc'
-. ./defs || exit 1
-
-unset YFLAGS || :
+. test-init.sh
 
 cat >> configure.ac <<'END'
 AC_PROG_CC
@@ -36,8 +34,9 @@ foo_SOURCES = foo.y
 # would be useful in general, so it's probably better to be
 # conservative).
 CLEANFILES = foo.output
-# Another automake wart: '-d' flag won't be given at automake time,
-# so automake won't be able to generate code to clean 'foo.h' :-(
+# As the '-d' flag won't be given at automake time, automake won't
+# be able to generate code to clean 'foo.h'.  We can't really blame
+# automake for that.
 MAINTAINERCLEANFILES = foo.h
 END
 
@@ -69,18 +68,18 @@ ls -l
 $MAKE
 ls -l
 test -f foo.c
-test ! -r foo.h
+test ! -e foo.h
 test -f foo.output
 
 $MAKE maintainer-clean
 ls -l
 
 ./configure YFLAGS='-v'
-YFLAGS=-d $MAKE -e
+run_make YFLAGS=-d
 ls -l
 test -f foo.c
 test -f foo.h
-test ! -r foo.output
+test ! -e foo.output
 
 $MAKE maintainer-clean
 ls -l