From 2aaa5485bd6e378827fd7024fbffca924c0b2a48 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 1 Mar 1996 03:40:31 +0000 Subject: [PATCH] Bug fixes --- ChangeLog | 14 ++++++++ Makefile.in | 2 ++ TODO | 5 +-- automake.in | 79 ++++++++++++++++++++++++++++++++++++++++++++-- lib/am/texinfos.am | 2 +- tests/ChangeLog | 4 +++ tests/Makefile.am | 3 +- tests/Makefile.in | 5 ++- texinfos.am | 2 +- 9 files changed, 108 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 638836a4..26c7f970 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Thu Feb 29 12:00:30 1996 Tom Tromey + + * automake.in (get_object_extension): Don't allow + @CONFIG_INCLUDE_SPEC@ in the Makefile.in when config.h not used. + From Gord Matzigkeit. Test confincl.test. + + * texinfos.am (install-info): Changed usage of install-info (in + comment). Per Feb 25 GNU Standards document. + Wed Feb 28 08:40:55 1996 Tom Tromey * automake.in (handle_tests): New function. @@ -8,6 +17,11 @@ Wed Feb 28 08:40:55 1996 Tom Tromey when using gettext. (scan_configure): Clear in_ac_output if "]" found. Test acoutqnl.test. + (require_config_file): New function. + (generate_makefile): Use require_config_file. + (config_aux_path): New variable. + (scan_configure): Check for AC_CONFIG_AUX_DIR. + (handle_merge_targets): Add install-strip rule. Tue Feb 27 12:00:36 1996 Tom Tromey diff --git a/Makefile.in b/Makefile.in index 86863ade..3bf4a1d0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -306,6 +306,8 @@ uninstall: uninstall-recursive uninstall-am all: all-recursive all-am +install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install installdirs: installdirs-recursive $(top_srcdir)/mkinstalldirs $(bindir) $(pkgdatadir) $(infodir) \ $(pkgdatadir) diff --git a/TODO b/TODO index 0b0b3875..e7572104 100644 --- a/TODO +++ b/TODO @@ -1,8 +1,9 @@ Priorities for release: * Check all require_file errors to see if any should reference a line in Makefile.am or configure.in. [handle_configure does] -* test gettext stuff for po/intl -* test for AC_OUTPUT command -- send patch for this +* test gettext stuff for po/intl? +* handle AC_CONFIG_AUX_DIR; must include install-sh + what about mkinstalldirs, mdate-sh? Other priorities: diff --git a/automake.in b/automake.in index 4b04145b..9618f103 100755 --- a/automake.in +++ b/automake.in @@ -97,6 +97,10 @@ $top_builddir = ''; # List of files in AC_OUTPUT without Makefile.am. @other_input_files = (); +# List of directories to search for configure-required files. This +# can be set by AC_CONFIG_AUX_DIR. +@config_aux_path = ('.', '..', '../..'); + # Whether AC_PROG_MAKE_SET has been seen in configure.in. $seen_make_set = 0; @@ -290,7 +294,7 @@ sub generate_makefile # AC_CANONICAL_HOST and AC_CANONICAL_SYSTEM need config.guess and # config.sub. - &require_file ($NORMAL, 'config.guess', 'config.sub') + &require_config_file ($NORMAL, 'config.guess', 'config.sub') if $relative_dir eq '.' && $seen_canonical; # FIXME with new 'dist' target, don't need Makefile.in. Probably @@ -406,8 +410,9 @@ sub get_object_extension { ($xform = &dirname ($contents{'CONFIG_HEADER'})) =~ s/(\W)/\\$1/g; - $xform = 's/\@CONFIG_INCLUDE_SPEC\@/-I' . $xform . '/go'; + $xform = '-I' . $xform; } + $xform = 's/\@CONFIG_INCLUDE_SPEC\@/' . $xform . '/go'; $output_vars .= &file_contents_with_transform ($xform, 'compile-vars'); $output_rules .= &file_contents ('compile'); @@ -1507,6 +1512,11 @@ sub handle_merge_targets . join (' ', @all) . "\n\n"); push (@phony, 'all'); + + # Generate the new 'install-strip' target. + $output_rules .= ("install-strip:\n\t" + . '$(MAKE) INSTALL_PROGRAM=\'$(INSTALL_PROGRAM) -s\' install' + . "\n"); } # Helper for handle_merge_targets. @@ -1730,6 +1740,12 @@ sub scan_configure } } + # FIXME can this actually be a list of paths? + if (/AC_CONFIG_AUX_DIR\(([^)]+)\)/) + { + @config_aux_path = $1; + } + # Check for ansi2knr. $fp_c_prototypes = 1 if /fp_C_PROTOTYPES/; @@ -2450,6 +2466,65 @@ sub require_file } } +# Require a file that is also required by Autoconf. Looks in +# configuration path, as specified by AC_CONFIG_AUX_DIR. +sub require_config_file +{ + local ($mystrict, @files) = @_; + local ($file, $dir); + local ($found_it); + + foreach $file (@files) + { + $found_it = 0; + foreach $dir (@config_aux_path) + { + $fullfile = $dir . "/" . $file; + + if (-f $fullfile) + { + $found_it = 1; + &push_dist_common ($file) if $dir eq $relative_dir; + last; + } + } + if (! $found_it) + { + if ($strictness >= $mystrict) + { + # Only install missing files according to our desired + # strictness level. + if ($install_missing && -f ($am_dir . '/' . $file)) + { + # Install the missing file. Symlink if we can, copy + # if we must. + if ($symlink_exists) + { + symlink ($am_dir . '/' . $file, $fullfile); + } + else + { + system ('cp', $am_dir . '/' . $file, $fullfile); + } + + # FIXME this is a hack. Should have am_warn. + local ($save) = $exit_status; + &am_error + ("required file \"$fullfile\" not found; installing"); + $exit_status = $save; + } + else + { + # Only an error if strictness constraint violated. + &am_error ("required file \"$fullfile\" not found"); + } + } + } + } +} + +################################################################ + # Push a list of files onto dist_common. sub push_dist_common { diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am index cafd9dfb..2db7f77a 100644 --- a/lib/am/texinfos.am +++ b/lib/am/texinfos.am @@ -37,7 +37,7 @@ install-info: $(INFO_DEPS) ## standards prohibit us from using 'true'. ## FIXME no one has install-info, so for now we just comment it out. ## if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ -## install-info --infodir=$(infodir) $$d/$$file; \ +## install-info --dir-file=$(infodir)/dir $$d/$$file; \ ## else :; fi; \ done diff --git a/tests/ChangeLog b/tests/ChangeLog index 171fc0a3..9be64689 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +Thu Feb 29 20:23:42 1996 Tom Tromey + + * confincl.test: New file. + Wed Feb 28 11:57:02 1996 Tom Tromey * acoutqnl.test: New file. diff --git a/tests/Makefile.am b/tests/Makefile.am index ed05521f..63bb4e26 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -5,6 +5,7 @@ AUTOMAKE_OPTIONS = gnits ## FIXME Ulrich has suggested implementing this in Automake. ## Perhaps he is right. TESTS = mdate.test vtexi.test acoutput.test instexec.test checkall.test \ -acoutnoq.test acouttbs.test libobj.test proginst.test acoutqnl.test +acoutnoq.test acouttbs.test libobj.test proginst.test acoutqnl.test \ +confincl.test DIST_OTHER = defs diff --git a/tests/Makefile.in b/tests/Makefile.in index b35fa90d..a739f44e 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -41,7 +41,8 @@ transform = @program_transform_name@ AUTOMAKE_OPTIONS = gnits TESTS = mdate.test vtexi.test acoutput.test instexec.test checkall.test \ -acoutnoq.test acouttbs.test libobj.test proginst.test acoutqnl.test +acoutnoq.test acouttbs.test libobj.test proginst.test acoutqnl.test \ +confincl.test DIST_OTHER = defs DIST_COMMON = ChangeLog Makefile.am Makefile.in @@ -114,6 +115,8 @@ uninstall: all: Makefile +install-strip: + $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install installdirs: diff --git a/texinfos.am b/texinfos.am index cafd9dfb..2db7f77a 100644 --- a/texinfos.am +++ b/texinfos.am @@ -37,7 +37,7 @@ install-info: $(INFO_DEPS) ## standards prohibit us from using 'true'. ## FIXME no one has install-info, so for now we just comment it out. ## if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ -## install-info --infodir=$(infodir) $$d/$$file; \ +## install-info --dir-file=$(infodir)/dir $$d/$$file; \ ## else :; fi; \ done -- 2.43.5