fixed file_contents_with_transform calls
authorTom Tromey <tromey@redhat.com>
Sat, 7 Dec 1996 20:57:42 +0000 (20:57 +0000)
committerTom Tromey <tromey@redhat.com>
Sat, 7 Dec 1996 20:57:42 +0000 (20:57 +0000)
ChangeLog
Makefile.in
automake.in
tests/Makefile.in

index 766915b..f50a5b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,13 @@ Sat Dec  7 11:34:39 1996  Tom Tromey  <tromey@cygnus.com>
 
        * automake.in (handle_dependencies): Added some missing ";"s in
        transforms.
+       (get_object_extension): Ditto.
+       (handle_tags): Ditto.
+       (handle_tests): Ditto.
+       (read_am_file): Ditto.
+       (am_install_var): Ditto.
+       (file_contents_with_transform): Die if transform missing trailing
+       ";".
 
        * automake.in (am_install_var): Quote $ in regexp substitution.
        From Ulrich Drepper.
index 6989550..ed29b18 100644 (file)
@@ -95,11 +95,18 @@ default: all
 
 .SUFFIXES:
 .SUFFIXES: .texi .texinfo .info .dvi
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in 
+       cd $(top_srcdir) && automake --gnits Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+       cd $(top_builddir) \
+         && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
 $(srcdir)/aclocal.m4: configure.in
        cd $(srcdir) && aclocal
 
 $(srcdir)/Makefile.in: Makefile.am configure.in
-       cd $(srcdir) && automake --gnits Makefile
+       cd $(srcdir) && automake @ARGS@ Makefile
 
 # For an explanation of the following Makefile rules, see node
 # `Automatic Remaking' in GNU Autoconf documentation.
index a7335c1..296c234 100755 (executable)
@@ -631,7 +631,7 @@ sub get_object_extension
                =~ s/(\W)/\\$1/g;
            $xform = '-I' . $xform;
        }
-       $xform = 's/\@CONFIG_INCLUDE_SPEC\@/' . $xform . '/go';
+       $xform = 's/\@CONFIG_INCLUDE_SPEC\@/' . $xform . '/go;';
        $output_vars .= &file_contents_with_transform ($xform,
                                                       'comp-vars');
        $output_rules .= &file_contents ('compile');
@@ -1086,10 +1086,10 @@ sub handle_lib_objects
 {
     local ($xname, $var, $lex_seen) = @_;
 
-    die "programming error 1 in handle_lib_objects"
+    die "automake: programming error 1 in handle_lib_objects\n"
        if ! &variable_defined ($var);
 
-    die "programming error 2 in handle_lib_objects"
+    die "automake: programming error 2 in handle_lib_objects\n"
        if $lex_seen && $var =~ /LIBADD/;
 
     # We recognize certain things that are commonly put in LIBADD or
@@ -1771,7 +1771,7 @@ sub handle_tags
            ($xform = &basename ($config_header)) =~ s/(\W)/\\$1/g;
        }
        $xform = ('s/\@CONFIG\@/' . $xform . '/;'
-                 . 's/\@DIRS\@/' . join (' ', @tag_deps) . '/');
+                 . 's/\@DIRS\@/' . join (' ', @tag_deps) . '/;');
 
        $output_rules .= &file_contents_with_transform ($xform, 'tags');
        $output_rules .= &file_contents ('tags-clean');
@@ -3009,7 +3009,7 @@ sub handle_tests
        }
        else
        {
-           $xform = 's/^CYGNUS.*$//';
+           $xform = 's/^CYGNUS.*$//;';
        }
        $output_rules .= &file_contents_with_transform ($xform, 'dejagnu');
 
@@ -3876,7 +3876,7 @@ sub read_am_file
     local ($build_rx);
     ($build_rx = $top_builddir) =~ s/(\W)/\\$1/g;
     $output_vars .= &file_contents_with_transform
-                        ('s/\@top_builddir\@/' . $build_rx . '/g',
+                        ('s/\@top_builddir\@/' . $build_rx . '/g;',
                         'header-vars');
 
     # Generate some useful variables when AC_CANONICAL_* used.  FIXME:
@@ -4132,6 +4132,11 @@ sub file_contents_with_transform
     local ($command, $basename) = @_;
     local ($file) = $am_dir . '/' . $basename . '.am';
 
+    if ($command ne '' && substr ($command, -1) != '~')
+    {
+       die "automake: programming error in file_contents_with_transform\n";
+    }
+
     open (FC_FILE, $file)
        || die "automake: installation error: cannot open \`$file'\n";
     # Looks stupid?
@@ -4410,7 +4415,7 @@ sub am_install_var
            if ($do_clean)
            {
                $output_rules .=
-                   &file_contents_with_transform ('s/\@DIR\@/' . $X . '/go',
+                   &file_contents_with_transform ('s/\@DIR\@/' . $X . '/go;',
                                                   $clean_file);
 
                push (@clean, $X . $primary);
@@ -4434,7 +4439,7 @@ sub am_install_var
            if ($do_ltlibs && $X eq 'lib')
            {
                $output_rules .=
-                   &file_contents_with_transform ('s/\@DIR\@/' . $X . '/go',
+                   &file_contents_with_transform ('s/\@DIR\@/' . $X . '/go;',
                                                   'ltlibs');
            }
            else
index 06071e5..023b26d 100644 (file)
@@ -58,7 +58,7 @@ confsub.test primary.test primary2.test depend2.test spell3.test \
 comment2.test vpath.test symlink.test discover.test acinclude.test req.test \
 acsilent.test distdir.test lex2.test libobj4.test libobj5.test version.test \
 ranlib.test confvar.test confvar2.test stdlib.test cxxo.test colon2.test \
-colon3.test remake.test
+colon3.test remake.test output.test output2.test
 
 EXTRA_DIST = defs $(TESTS)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs