summaryrefslogtreecommitdiff
path: root/t/lex-line.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/lex-line.sh')
-rw-r--r--t/lex-line.sh32
1 files changed, 5 insertions, 27 deletions
diff --git a/t/lex-line.sh b/t/lex-line.sh
index f63066f0c..7905ec287 100644
--- a/t/lex-line.sh
+++ b/t/lex-line.sh
@@ -15,15 +15,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check that automake lex support ensures that lex-generated C
-# files use correct "#line" directives. Try also with the
-# 'subdir-object' option enabled.
+# files use correct "#line" directives.
# See also sister test 'yacc-line.sh'.
required='cc lex'
. test-init.sh
cat >> configure.ac << 'END'
-AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AC_PROG_LEX
AC_OUTPUT
@@ -32,7 +30,6 @@ END
mkdir dir sub sub/dir
cat > Makefile.am << 'END'
-SUBDIRS = sub
bin_PROGRAMS = foo bar
LDADD = $(LEXLIB)
bar_LFLAGS = -v
@@ -43,19 +40,6 @@ zardoz.@OBJEXT@: zardoz.c
bar-quux.@OBJEXT@: bar-quux.c
END
-cat > sub/Makefile.am << 'END'
-AUTOMAKE_OPTIONS = subdir-objects
-noinst_PROGRAMS = foo bar
-## We already used $(LEXLIB) above, so try @LEXLIB@ now.
-LDADD = @LEXLIB@
-foo_LFLAGS = -v
-foo_SOURCES = zardoz.l
-bar_SOURCES = dir/quux.l
-## Avoid spurious failures with Solaris make.
-foo-zardoz.@OBJEXT@: foo-zardoz.c
-dir/quux.@OBJEXT@: dir/quux.c
-END
-
cat > zardoz.l << 'END'
%{
#define YY_NO_UNISTD_H 1
@@ -79,10 +63,8 @@ int yywrap (void)
END
cp zardoz.l dir/quux.l
-cp zardoz.l sub/zardoz.l
-cp zardoz.l sub/dir/quux.l
-c_outputs='zardoz.c bar-quux.c sub/foo-zardoz.c sub/dir/quux.c'
+c_outputs='zardoz.c dir/bar-quux.c'
$ACLOCAL
$AUTOCONF
@@ -104,7 +86,7 @@ for vpath in : false; do
$MAKE
# For debugging,
- ls -l . sub sub/dir
+ ls -l . dir
$EGREP 'line|\.l' $c_outputs
grep '#.*line.*build.*\.l' $c_outputs && exit 1
@@ -118,14 +100,10 @@ for vpath in : false; do
grep "#.*\.l.*\.l" $c_outputs && exit 1
if $vpath; then
grep '#.*line.*"\.\./zardoz\.l"' zardoz.c
- grep '#.*line.*"\.\./dir/quux\.l"' bar-quux.c
- grep '#.*line.*"\.\./\.\./sub/zardoz\.l"' sub/foo-zardoz.c
- grep '#.*line.*"\.\./\.\./sub/dir/quux\.l"' sub/dir/quux.c
+ grep '#.*line.*"\.\./dir/quux\.l"' dir/bar-quux.c
else
grep '#.*line.*"zardoz\.l"' zardoz.c
- grep '#.*line.*"dir/quux\.l"' bar-quux.c
- grep '#.*line.*"zardoz\.l"' sub/foo-zardoz.c
- grep '#.*line.*"dir/quux\.l"' sub/dir/quux.c
+ grep '#.*line.*"dir/quux\.l"' dir/bar-quux.c
fi
cd $srcdir