computation of $object and $this_obj_ext.
* tests/lex3.test: Merge into...
* tests/lex.test: here.
* tests/pr19.test: Improve and rename as...
* tests/lex3.test: this.
+2001-05-12 Akim Demaille <akim@epita.fr>
+
+ * automake.in (&handle_single_transform_list): Simplify
+ computation of $object and $this_obj_ext.
+ * tests/lex3.test: Merge into...
+ * tests/lex.test: here.
+ * tests/pr19.test: Improve and rename as...
+ * tests/lex3.test: this.
+
2001-05-09 Tom Tromey <tromey@redhat.com>
* automake.in (read_am_file): Correctly compute $saw_bk.
# Now extract linker and other info.
$linker = $lang->linker;
- my $this_obj_ext;
- if ($lang->ansi)
- {
- $object = $base . $obj;
- $this_obj_ext = $obj;
- }
- else
- {
- $object = $base . $nonansi_obj;
- $this_obj_ext = $nonansi_obj;
- }
+ my $this_obj_ext = $lang->ansi ? $obj : $nonansi_obj;
+ $object = $base . $this_obj_ext;
if (defined $lang->flags
&& &variable_defined ($derived . '_' . $lang->flags))
ppf77.test \
pr2.test \
pr9.test \
-pr19.test \
pr72.test \
pr87.test \
prefix.test \
#! /bin/sh
-# Test to make sure that lex source generates correct target.
-
. $srcdir/defs || exit 1
cat >> configure.in << 'END'
+AC_INIT
AC_PROG_CC
AM_PROG_LEX
END
$ACLOCAL || exit 1
$AUTOMAKE || exit 1
-grep '\$(LEX)' Makefile.in
+
+# Test to make sure that lex source generates correct target.
+
+fgrep '$(LEX)' Makefile.in || exit 1
+
+# Test to make sure that lex source generates correct clean rule.
+# From Ralf Corsepius.
+
+fgrep joel Makefile.in && exit 1
+
+exit 0
#! /bin/sh
-# Test to make sure that lex source generates correct clean rule.
-# From Ralf Corsepius.
+# Test associated with PR 19.
+# From Matthew D. Langston.
. $srcdir/defs || exit 1
-cat >> configure.in << 'END'
+# Fail gracefully if no autoconf.
+$needs_autoconf
+
+# Likewise for gcc.
+(gcc -v) > /dev/null 2>&1 || exit 77
+
+# Likewise for gzip.
+(gzip --version) > /dev/null 2>&1 || exit 77
+
+cat > configure.in << 'END'
+AC_INIT
+dnl Prevent automake from looking in .. and ../..
+AC_CONFIG_AUX_DIR(.)
+AM_INIT_AUTOMAKE(am_lex_bug, 0.1.1)
+
+dnl Checks for programs.
AC_PROG_CC
AM_PROG_LEX
+AC_PROG_YACC
+AC_OUTPUT(Makefile)
END
cat > Makefile.am << 'END'
-bin_PROGRAMS = zot
-zot_SOURCES = joe.l
-LDADD = @LEXLIB@
+AUTOMAKE_OPTIONS = foreign
+LDADD = @LEXLIB@
+
+noinst_PROGRAMS = foo
+foo_SOURCES = foo.l
+END
+
+cat > foo.l << 'END'
+%%
+"END" return EOF;
+.
+%%
+int
+main ()
+{
+ while (yylex () != EOF)
+ ;
+
+ return 0;
+}
END
-: > joe.l
+set -e
-$ACLOCAL || exit 1
-$AUTOMAKE || exit 1
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+./configure
+$MAKE
+echo 'This is the END' | ./foo
+$MAKE distcheck
-fgrep joel Makefile.in && exit 1
-exit 0
+# foo.c must be shipped.
+gunzip am_lex_bug-0.1.1.tar.gz
+tar tf am_lex_bug-0.1.1.tar | fgrep foo.c
+++ /dev/null
-#! /bin/sh
-
-# Test associated with PR 19.
-# From Matthew D. Langston.
-
-. $srcdir/defs || exit 1
-
-cat > configure.in << 'END'
-AC_INIT(foo.l)
-dnl Prevent automake from looking in .. and ../..
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(am_lex_bug, 0.1.1)
-
-dnl Checks for programs.
-AC_PROG_CC
-AM_PROG_LEX
-AC_PROG_YACC
-
-AC_OUTPUT(Makefile)
-END
-
-cat > Makefile.am << 'END'
-AUTOMAKE_OPTIONS = foreign
-LDADD = @LEXLIB@
-
-noinst_PROGRAMS = foo
-foo_SOURCES = foo.l
-END
-
-echo %% > foo.l
-
-# Fail gracefully if no autoconf.
-$needs_autoconf
-
-# Likewise for gcc.
-(gcc -v) > /dev/null 2>&1 || exit 77
-
-# Likewise for gzip.
-(gzip --version) > /dev/null 2>&1 || exit 77
-
-$ACLOCAL || exit 1
-$AUTOCONF || exit 1
-$AUTOMAKE -a || exit 1
-CC=gcc ./configure || exit 1
-$MAKE || exit 1
-$MAKE distcheck || exit 1
-
-gunzip am_lex_bug-0.1.1.tar.gz || exit 1
-
-tar tf am_lex_bug-0.1.1.tar | fgrep foo.c