From: Tom Tromey Date: Sat, 7 Dec 1996 20:57:42 +0000 (+0000) Subject: fixed file_contents_with_transform calls X-Git-Tag: Release-1-1l~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=199c6971b146d703f5a8da2e97ca8d24194354bd;p=thirdparty%2Fautomake.git fixed file_contents_with_transform calls --- diff --git a/ChangeLog b/ChangeLog index 766915b97..f50a5b76d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,13 @@ Sat Dec 7 11:34:39 1996 Tom Tromey * 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. diff --git a/Makefile.in b/Makefile.in index 69895503e..ed29b1865 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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. diff --git a/automake.in b/automake.in index a7335c1d9..296c234b9 100755 --- a/automake.in +++ b/automake.in @@ -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 diff --git a/tests/Makefile.in b/tests/Makefile.in index 06071e532..023b26d03 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -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