From 37e78c3c8ff9164abe4ca737dd3c0d0b95e1fd26 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 3 Apr 1996 22:16:37 +0000 Subject: [PATCH] Bug fix with test --- ChangeLog | 9 +++++++++ TODO | 3 +++ automake.in | 16 +++++++++++----- lib/am/texinfos.am | 3 ++- tests/ChangeLog | 4 ++++ tests/Makefile.am | 2 +- tests/Makefile.in | 2 +- tests/insh.test | 14 ++++++++++++++ texinfos.am | 3 ++- 9 files changed, 47 insertions(+), 9 deletions(-) create mode 100755 tests/insh.test diff --git a/ChangeLog b/ChangeLog index 205682b..44c7ee2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,16 @@ +Wed Apr 3 15:16:06 1996 Tom Tromey + + * automake.in (require_file_internal): Use correct file for error + messages. Test insh.test. + Mon Apr 1 09:47:44 1996 Tom Tromey + * texinfos.am (.texi.info): Build output file in srcdir. + * automake.in (require_file_internal): If $dir is ".",then look in relative directory. + (handle_texinfo): Canonicalize name of texi file before looking + for dependency variable. Thu Mar 28 08:33:21 1996 Tom Tromey diff --git a/TODO b/TODO index 40f8303..4ebe1a7 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,9 @@ Priorities for release: * Fix all mkinstalldirs invocations * Add support for libtool +* look at guile-ref; not all .texi are distributed! + problem is canonical naming; add test for this. +* install-sh message can appear multiple times: bogus! Other priorities: * Must rewrite am_install_var. Should break into multiple functions. diff --git a/automake.in b/automake.in index 59bebfb..8bc4dd7 100755 --- a/automake.in +++ b/automake.in @@ -822,6 +822,7 @@ sub handle_texinfo local ($done) = 0; local ($vti); local ($tc_cursor, @texi_cleans); + local ($canonical); foreach $info_cursor (@texis) { @@ -866,10 +867,13 @@ sub handle_texinfo @texi_deps = (); push (@texi_deps, $info_cursor); push (@texi_deps, $vtexi) if $vtexi; - if (defined $contents{$infobase . "_TEXINFOS"}) + + # Canonicalize name first. + ($canonical = $infobase) =~ tr/A-Za-z0-9_/_/c; + if (defined $contents{$canonical . "_TEXINFOS"}) { - push (@texi_deps, "\$" . $infobase . '_TEXINFOS'); - &push_dist_common ("\$" . $infobase . '_TEXINFOS'); + push (@texi_deps, '$(' . $canonical . '_TEXINFOS)'); + &push_dist_common ('$(' . $canonical . '_TEXINFOS)'); } $output_rules .= ("\n" . $infobase . ".info: " @@ -2625,7 +2629,7 @@ sub require_file_internal { local ($is_configure, $line, $mystrict, @files) = @_; local ($file, $fullfile); - local ($found_it, $errfile); + local ($found_it, $errfile, $errdir); local ($save_dir); foreach $file (@files) @@ -2636,17 +2640,19 @@ sub require_file_internal if ($dir eq '.') { $fullfile = $relative_dir . "/" . $file; + $errdir = $relative_dir unless $errdir; } else { $fullfile = $dir . "/" . $file; + $errdir = $dir unless $errdir; } # Use different name for "error filename". Otherwise on # an error the bad file will be reported as eg # `../../install-sh' when using the default # config_aux_path. - $errfile = $fullfile unless $errfile; + $errfile = $errdir . '/' . $file; if (-f $fullfile) { diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am index 2db7f77..7b6f754 100644 --- a/lib/am/texinfos.am +++ b/lib/am/texinfos.am @@ -16,7 +16,8 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. .texi.info: - $(MAKEINFO) -I$(srcdir) $< +## FIXME is this right? We make sure the output file goes into srcdir. + $(MAKEINFO) -I$(srcdir) $< -o $(srcdir)/$@ .texi.dvi: TEXINPUTS=$(srcdir):$$TEXINPUTS $(TEXI2DVI) $< diff --git a/tests/ChangeLog b/tests/ChangeLog index cbac83f..819c024 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +Wed Apr 3 15:10:54 1996 Tom Tromey + + * insh.test: New file. + Wed Mar 27 23:31:51 1996 Tom Tromey * rulepat.test: New file. diff --git a/tests/Makefile.am b/tests/Makefile.am index 46dbe49..1dba1a9 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = gnits TESTS = mdate.test vtexi.test acoutput.test instexec.test checkall.test \ acoutnoq.test acouttbs.test libobj.test proginst.test acoutqnl.test \ confincl.test spelling.test prefix.test badprog.test depend.test exdir.test \ -canon.test installsh.test empty.test rulepat.test +canon.test installsh.test empty.test rulepat.test insh.test ## Maybe automake should distribute TESTS? You tell me. EXTRA_DIST = defs $(TESTS) diff --git a/tests/Makefile.in b/tests/Makefile.in index a5407b7..61701e3 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -43,7 +43,7 @@ AUTOMAKE_OPTIONS = gnits TESTS = mdate.test vtexi.test acoutput.test instexec.test checkall.test \ acoutnoq.test acouttbs.test libobj.test proginst.test acoutqnl.test \ confincl.test spelling.test prefix.test badprog.test depend.test exdir.test \ -canon.test installsh.test empty.test rulepat.test +canon.test installsh.test empty.test rulepat.test insh.test EXTRA_DIST = defs $(TESTS) DIST_COMMON = ChangeLog Makefile.am Makefile.in diff --git a/tests/insh.test b/tests/insh.test new file mode 100755 index 0000000..a0ef405 --- /dev/null +++ b/tests/insh.test @@ -0,0 +1,14 @@ +#! /bin/sh + +# Test for bug where missing mkinstalldirs give bogus error about +# missing install-sh. + +. $srcdir/defs || exit 1 + +rm mkinstalldirs + +: > Makefile.am + +$AUTOMAKE > out 2>&1 && exit 1 + +grep mkinstalldirs out diff --git a/texinfos.am b/texinfos.am index 2db7f77..7b6f754 100644 --- a/texinfos.am +++ b/texinfos.am @@ -16,7 +16,8 @@ ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. .texi.info: - $(MAKEINFO) -I$(srcdir) $< +## FIXME is this right? We make sure the output file goes into srcdir. + $(MAKEINFO) -I$(srcdir) $< -o $(srcdir)/$@ .texi.dvi: TEXINPUTS=$(srcdir):$$TEXINPUTS $(TEXI2DVI) $< -- 2.7.4