Merge branch 'yacc-work' into yl-work-for-master
[platform/upstream/automake.git] / tests / yacc-pr204.test
similarity index 77%
rename from tests/pr204.test
rename to tests/yacc-pr204.test
index 1c4b0fa..bab841a 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2002, 2004, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2010, 2011, 2012 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/>.
 
 # For PR 204.
-# Sources derived from nodist_ sources should not be distributed.
+# C sources derived from nodist_ yacc sources should not be distributed.
+# See also related test `yacc-nodist.test'.
+# The tests 'lex-nodist.test' and 'lex-pr204.test' does similar checks
+# for lex-generated C files.
 
 required='cc yacc'
 . ./defs || Exit 1
@@ -71,9 +75,11 @@ test -f parse2.c
 # Ensure the rebuild rule works despite AM_MAINTAINER_MODE, because
 # it's a nodist_ parser.
 $sleep
-touch parse.y
+touch parse.y parse2.y
 $sleep
 $MAKE parse.c parse2.c
-test `ls -1t parse.c parse.y | sed 1q` = parse.c
+stat parse.c parse.y parse2.c parse2.y || : # For debugging.
+test `ls -t parse.c parse.y | sed 1q` = parse.c
+test `ls -t parse2.c parse2.y | sed 1q` = parse2.c
 
 :