* automake.in (&handle_single_transform_list): Simplify
authorAkim Demaille <akim@epita.fr>
Sat, 12 May 2001 12:36:03 +0000 (12:36 +0000)
committerAkim Demaille <akim@epita.fr>
Sat, 12 May 2001 12:36:03 +0000 (12:36 +0000)
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.

ChangeLog
automake.in
tests/Makefile.am
tests/lex.test
tests/lex3.test
tests/pr19.test [deleted file]

index 5bd5ab6..1338ae4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+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.
index 50eb7a5..e1707e8 100755 (executable)
@@ -1767,17 +1767,8 @@ sub handle_single_transform_list ($$$@)
             # 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))
index 2583ee4..0a2a455 100644 (file)
@@ -207,7 +207,6 @@ pluseq8.test \
 ppf77.test \
 pr2.test \
 pr9.test \
-pr19.test \
 pr72.test \
 pr87.test \
 prefix.test \
index 0c96521..6fdfd23 100755 (executable)
@@ -1,10 +1,9 @@
 #! /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
@@ -20,4 +19,14 @@ 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
index c3c7515..98c37ca 100755 (executable)
@@ -1,25 +1,65 @@
 #! /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
diff --git a/tests/pr19.test b/tests/pr19.test
deleted file mode 100755 (executable)
index 00056e9..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#! /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