Bug fix with test
authorTom Tromey <tromey@redhat.com>
Wed, 3 Apr 1996 22:16:37 +0000 (22:16 +0000)
committerTom Tromey <tromey@redhat.com>
Wed, 3 Apr 1996 22:16:37 +0000 (22:16 +0000)
ChangeLog
TODO
automake.in
lib/am/texinfos.am
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/insh.test [new file with mode: 0755]
texinfos.am

index 205682b..44c7ee2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,16 @@
+Wed Apr  3 15:16:06 1996  Tom Tromey  <tromey@creche.cygnus.com>
+
+       * automake.in (require_file_internal): Use correct file for error
+       messages.  Test insh.test.
+
 Mon Apr  1 09:47:44 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
+       * 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  <tromey@creche.cygnus.com>
 
diff --git a/TODO b/TODO
index 40f8303..4ebe1a7 100644 (file)
--- 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.
index 59bebfb..8bc4dd7 100755 (executable)
@@ -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)
            {
index 2db7f77..7b6f754 100644 (file)
@@ -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) $<
index cbac83f..819c024 100644 (file)
@@ -1,3 +1,7 @@
+Wed Apr  3 15:10:54 1996  Tom Tromey  <tromey@creche.cygnus.com>
+
+       * insh.test: New file.
+
 Wed Mar 27 23:31:51 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
        * rulepat.test: New file.
index 46dbe49..1dba1a9 100644 (file)
@@ -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)
index a5407b7..61701e3 100644 (file)
@@ -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 (executable)
index 0000000..a0ef405
--- /dev/null
@@ -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
index 2db7f77..7b6f754 100644 (file)
@@ -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) $<