#! /bin/sh
-# Copyright (C) 2001-2012 Free Software Foundation, Inc.
+# Copyright (C) 2001-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 automake yacc support ensures that yacc-generated C
# files use correct "#line" directives. Try also with the
# 'subdir-object' option enabled.
-# See also sister test 'lex-line.test'.
+# See also sister test 'lex-line.sh'.
required='cc yacc'
-. ./defs || Exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
-AM_PROG_CC_C_O
AC_PROG_YACC
AC_OUTPUT
END
$ACLOCAL
$AUTOCONF
-$AUTOMAKE -a
+# FIXME: stop disabling the warnings in the 'unsupported' category
+# FIXME: once the 'subdir-objects' option has been mandatory.
+$AUTOMAKE -a -Wno-unsupported
for vpath in : false; do
$EGREP 'line|\.y' $c_outputs
# Adjusted "#line" should not contain reference to the builddir.
- grep '#.*line.*build.*\.y' $c_outputs && Exit 1
+ grep '#.*line.*build.*\.y' $c_outputs && exit 1
# Adjusted "#line" should not contain reference to the absolute
# srcdir.
- $EGREP '#.*line *"?/.*\.y' $c_outputs && Exit 1
+ $EGREP '#.*line *"?/.*\.y' $c_outputs && exit 1
# Adjusted "#line" should not contain reference to the default
# output file names, e.g., 'y.tab.c' and 'y.tab.h'.
- grep '#.*line.*y\.tab\.' $c_outputs && Exit 1
+ grep '#.*line.*y\.tab\.' $c_outputs && exit 1
# Look out for a silly regression.
- grep "#.*\.y.*\.y" $c_outputs && Exit 1
+ grep "#.*\.y.*\.y" $c_outputs && exit 1
if $vpath; then
grep '#.*line.*"\.\./zardoz\.y"' zardoz.c
grep '#.*line.*"\.\./dir/quux\.y"' bar-quux.c