#! /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
# 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
: