From 3a9501f12981c0b652a8ab12b9bc2ad12e9b2eed Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 21 Jun 1996 16:48:32 +0000 Subject: [PATCH] Various fixups --- ChangeLog | 9 +++++++++ Makefile.am | 9 +++++++-- Makefile.in | 22 ++++++++++++++-------- TODO | 15 +++++++++++++++ automake.in | 27 ++++++++++++++++----------- lib/am/Makefile.am | 9 +++++++-- 6 files changed, 68 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index e2acb5e45..48033a250 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Fri Jun 21 10:42:06 1996 Tom Tromey + + * Makefile.am (maintainer-check): Ensure all invocations of + mkinstalldirs are correct. + +Tue Jun 18 10:53:54 1996 Tom Tromey + + * automake.in (handle_tests): Don't directly generate site.exp. + Mon Jun 10 21:11:20 1996 Tom Tromey * texinfo.tex: New version. diff --git a/Makefile.am b/Makefile.am index 4d459ffa3..7a2980405 100644 --- a/Makefile.am +++ b/Makefile.am @@ -56,9 +56,14 @@ maintainer-check: automake @if test `fgrep '$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \ echo "found too many uses of '\$${'" 1>&2; \ exit 1; \ - fi + else :; fi +## Make sure all invocations of mkinstalldirs are correct. + @if test `fgrep 'mkinstalldirs' $(srcdir)/[a-z]*.am | fgrep -v '$$(mkinstalldirs)' | wc -l` -ne 0; then \ + echo "found incorrect use of mkinstalldirs" 1>&2; \ + exit 1; \ + else :; fi ## Another syntax check, this time with Perl 4, if it exists. - if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \ + @if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \ perl4.036 -c -w automake; \ else :; fi $(MAKE) check diff --git a/Makefile.in b/Makefile.in index 3c47ce18a..34b02333b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -74,7 +74,7 @@ SCRIPTS = $(bin_SCRIPTS) $(pkgdata_SCRIPTS) MAKEINFO = makeinfo TEXI2DVI = texi2dvi -INFOS = automake.info* +INFOS = automake.info .info-[0-9] .info-[0-9][0-9] INFO_DEPS = automake.info DVIS = automake.dvi TEXINFOS = automake.texi @@ -100,7 +100,7 @@ default: all $(srcdir)/Makefile.in: Makefile.am configure.in - cd $(srcdir) && automake Makefile + cd $(srcdir) && automake --strictness=gnits Makefile # For an explanation of the following Makefile rules, see node # `Automatic Remaking' in GNU Autoconf documentation. @@ -180,10 +180,11 @@ automake.info: automake.texi version.texi install-info: $(INFO_DEPS) $(mkinstalldirs) $(infodir) - for file in $(INFO_DEPS); do \ - for ifile in `cd $(srcdir) && echo $$file*`; do \ - $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \ - done; \ + for file in $(INFO_DEPS); do \ + for ifile in `cd $(srcdir) && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ + test -f $(srcdir)/$$ifile \ + && $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \ + done; \ done uninstall-info: @@ -280,6 +281,7 @@ distcheck: dist cd $(distdir)/=build \ && ../configure --srcdir=.. --prefix=$$dc_install_base \ && $(MAKE) \ + && $(MAKE) dvi \ && $(MAKE) check \ && $(MAKE) install \ && $(MAKE) installcheck \ @@ -422,8 +424,12 @@ maintainer-check: automake @if test `fgrep '$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \ echo "found too many uses of '\$${'" 1>&2; \ exit 1; \ - fi - if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \ + else :; fi + @if test `fgrep 'mkinstalldirs' $(srcdir)/[a-z]*.am | fgrep -v '$$(mkinstalldirs)' | wc -l` -ne 0; then \ + echo "found incorrect use of mkinstalldirs" 1>&2; \ + exit 1; \ + else :; fi + @if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \ perl4.036 -c -w automake; \ else :; fi $(MAKE) check diff --git a/TODO b/TODO index e251d61d9..e40153f74 100644 --- a/TODO +++ b/TODO @@ -5,6 +5,10 @@ Priorities for release: lex/yacc trickery +consider printing full file name of Makefile.am or configure.in when +giving error. This would help for very large trees with many +configure.in scripts + consider supporting "var+= stuff" syntax. rewrite to just var=... on output. This is sometimes convenient when you want to write a Makefile.am in more-or-less modular parts @@ -218,6 +222,8 @@ including Metaconfig. Perl uses it. Should handle directory hierarchies deeper than 2. Right now there is some support for this. Here are some of the issues: * Should handle AC_CONFIG_SUBDIRS, ie must handle configure.in in subdirs + * can do this by looking at subdirs, seeing configure.in + and auto-running Automake there * Must handle SUBDIRS in subdir Makefile.am's dejagnu support: @@ -284,6 +290,15 @@ document _LISP handling document canonicalization for texinfos +automake must be run in each directory with a configure.in +This is insufficiently clear + +must document the targets required for integration with +non-automake-using subdirs + +document actual uses of PACKAGE and VERSION + + ================================================================ Libraries: diff --git a/automake.in b/automake.in index a3dc66510..c5b896511 100755 --- a/automake.in +++ b/automake.in @@ -447,7 +447,7 @@ sub handle_options { # Got a version number. Is the syntax too strict? local ($num_version); - ($num_version = $VERSION) =~ tr/0-9//d; + ($num_version = $VERSION) =~ tr/0-9//cd; if ($num_version < $_) { &am_line_error ('AUTOMAKE_OPTIONS', @@ -1935,16 +1935,19 @@ sub handle_tests push (@check, 'check-DEJAGNU'); push (@phony, 'check-DEJAGNU'); $output_rules .= &file_contents ('dejagnu') . "\n"; + # Note that in the rule we don't directly generate site.exp to + # avoid the possibility of a corrupted site.exp if make is + # interrupted. Jim Meyering has some useful text on this + # topic. $output_rules .= ("site.exp: Makefile\n" . "\t\@echo 'Making a new site.exp file...'\n" . "\t-\@rm -f site.bak\n" - . "\t-\@mv site.exp site.bak\n" - . "\t\@echo '## these variables are automatically generated by make ##' > site.exp\n" - . "\t\@echo '# Do not edit here. If you wish to override these values' >> site.exp\n" - . "\t\@echo '# edit the last section' >> site.exp\n" - . "\t\@echo 'set tool \$(DEJATOOL)' >> site.exp\n" - . "\t\@echo 'set srcdir \$(srcdir)' >> site.exp\n" - . "\t\@echo 'set objdir' \`pwd\` >> site.exp\n"); + . "\t\@echo '## these variables are automatically generated by make ##' > \$\@-t\n" + . "\t\@echo '# Do not edit here. If you wish to override these values' >> \$\@-t\n" + . "\t\@echo '# edit the last section' >> \$\@-t\n" + . "\t\@echo 'set tool \$(DEJATOOL)' >> \$\@-t\n" + . "\t\@echo 'set srcdir \$(srcdir)' >> \$\@-t\n" + . "\t\@echo 'set objdir' \`pwd\` >> \$\@-t\n"); # Extra stuff for AC_CANONICAL_* local (@whatlist) = (); @@ -1964,12 +1967,14 @@ sub handle_tests { foreach $c2 ('alias', 'triplet') { - $output_rules .= "\t\@echo 'set ${c1}_${c2} \$(${c1}_${c2})' >> site.exp\n"; + $output_rules .= "\t\@echo 'set ${c1}_${c2} \$(${c1}_${c2})' >> \$\@-t\n"; } } - $output_rules .= ("\t\@echo '## All variables above are generated by configure. Do Not Edit ##' >> site.exp\n" - . "\t-\@sed '1,/^## All variables above are.*##/ d' site.bak >> site.exp\n"); + $output_rules .= ("\t\@echo '## All variables above are generated by configure. Do Not Edit ##' >> \$\@-t\n" + . "\t-\@sed '1,/^## All variables above are.*##/ d' site.bak >> \$\@-t\n" + . "\t-\@mv site.exp site.bak\n" + . "\t\@mv \$\@-t site.exp\n"); } else { diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index 4d459ffa3..7a2980405 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -56,9 +56,14 @@ maintainer-check: automake @if test `fgrep '$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` -ne 0; then \ echo "found too many uses of '\$${'" 1>&2; \ exit 1; \ - fi + else :; fi +## Make sure all invocations of mkinstalldirs are correct. + @if test `fgrep 'mkinstalldirs' $(srcdir)/[a-z]*.am | fgrep -v '$$(mkinstalldirs)' | wc -l` -ne 0; then \ + echo "found incorrect use of mkinstalldirs" 1>&2; \ + exit 1; \ + else :; fi ## Another syntax check, this time with Perl 4, if it exists. - if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \ + @if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \ perl4.036 -c -w automake; \ else :; fi $(MAKE) check -- 2.11.4.GIT