]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Allow all variables to be overridden
authorTom Tromey <tromey@redhat.com>
Fri, 4 Oct 1996 02:58:19 +0000 (02:58 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 4 Oct 1996 02:58:19 +0000 (02:58 +0000)
ChangeLog
Makefile.in
THANKS
TODO
automake.in
lib/am/texinfos.am
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/vpath.test [new file with mode: 0755]
texinfos.am

index 3d8bd9e3fe8f8250da9a66ab6fc866c7b3bf3a73..93d33cfd4798763b2e03732c2dae2eebbb4438ff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
+Thu Oct  3 20:11:16 1996  Tom Tromey  <tromey@cygnus.com>
+
+       * automake.in (read_am_file): Define all variables after reading
+       .am file.  Test vpath.test.  Reported by Anthony Green.
+
 Mon Sep 30 08:31:51 1996  Tom Tromey  <tromey@cygnus.com>
 
+       * texinfos.am: Run install-info.
+
        * automake.in (variable_value_as_list): Just return if comment
        seen.  Report from Mark Galassi.
        (handle_options): Don't bother with explicit comment checking.
index 3e6bd043d2179c400c2974923b134190873aedeb..210296b5a13bdcaf120ba21ddbef8baa468e5e8d 100644 (file)
@@ -199,6 +199,12 @@ install-info: $(INFO_DEPS)
            else : ; fi; \
          done; \
        done
+       $(POST_INSTALL)
+       if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
+         for file in $(INFO_DEPS); do \
+           install-info --info-dir=$(infodir) $$file; \
+         done; \
+       else : ; fi
 
 uninstall-info:
        cd $(srcdir) && for file in *.info*; do \
diff --git a/THANKS b/THANKS
index 3d2477d7fe402579f272888e65a1efdfa18d2e81..5f0d3eb52641711f4b6742ed40686cce09f304ac 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -3,6 +3,7 @@ It would not be what it is today without the invaluable help of these
 people:
 
 Andreas Schwab <schwab@lamothe.informatik.uni-dortmund.de>
+Anthony Green <green@cygnus.com>
 David A. Swierczek <swiercze@mr.med.ge.com>
 Dieter Baron <dillo@stieltjes.smc.univie.ac.at>
 François Pinard <pinard@iro.umontreal.ca>
diff --git a/TODO b/TODO
index a751e633029848d9304938b9d2df4449e7b160a8..29697365af86b249e7537f2084d718c70bec7ab2 100644 (file)
--- a/TODO
+++ b/TODO
@@ -3,11 +3,23 @@ Priorities for release:
 - yacc -vs- .h
 - documentation
 
+* test install-info
+  add install-info --remove
+
 Further:
 - texinfo/info changes
 - Per's suggestion
 - man page fixes
 
+Avoid loops when installing; instead unroll them in automake
+
+allow `EXTRA_DIST = foo/bar'; too many requests to ignore
+
+Franc,ois> * ansi2knr was uselessly compiled, and it might be an
+Franc,ois> Automake problem:
+
+MUST look @ Franc,ois' run-time-replacement code
+
 From David A Swierczek: automake should notice (eg) AC_CHECK_PROG and
 auto-generate Makefile substitution:
        AC_CHECK_PROG(AR, ...)
index 72d903f5d6cd6ef3c3a6214f86ce07f41af0316e..f415151a8768575a24eae93d1941ba428b3c692e 100755 (executable)
@@ -3071,55 +3071,11 @@ sub read_am_file
 {
     local ($amfile) = @_;
 
-    # Compute relative location of the top object directory.
-    local (@topdir) = ();
-    foreach (split (/\//, $relative_dir))
-    {
-       next if $_ eq '.' || $_ eq '';
-       if ($_ eq '..')
-       {
-           pop @topdir;
-       }
-       else
-       {
-           push (@topdir, '..');
-       }
-    }
-    @topdir = ('.') if ! @topdir;
-
-    $top_builddir = join ('/', @topdir);
-    local ($build_rx);
-    ($build_rx = $top_builddir) =~ s/(\W)/\\$1/g;
-    local ($header_vars) =
-       &file_contents_with_transform
-           ('s/\@top_builddir\@/' . $build_rx . '/g',
-            'header-vars');
-
-    # Generate some useful variables when AC_CANONICAL_* used.
-    if ($seen_canonical)
-    {
-       local ($curs, %vars);
-       $vars{'host_alias'} = 'host_alias';
-       $vars{'host_triplet'} = 'host';
-       if ($seen_canonical == $AC_CANONICAL_SYSTEM)
-       {
-           $vars{'build_alias'} = 'build_alias';
-           $vars{'build_triplet'} = 'build';
-           $vars{'target_alias'} = 'target_alias';
-           $vars{'target_triplet'} = 'target';
-       }
-       foreach $curs (keys %vars)
-       {
-           $header_vars .= "$curs = \@$vars{$curs}\@\n";
-           $contents{$curs} = "\@$vars{$curs}\@";
-       }
-    }
-
     open (AM_FILE, $amfile) || die "automake: couldn't open \`$amfile': $!\n";
     print "automake: reading $amfile\n" if $verbose;
 
-    $output_vars .= ("# $in_file_name generated automatically by automake "
-                    . $VERSION . " from $am_file_name\n");
+    $output_vars = ("# $in_file_name generated automatically by automake "
+                   . $VERSION . " from $am_file_name\n");
 
     # Generate copyright for generated Makefile.in.
     $output_vars .= $gen_copyright;
@@ -3158,9 +3114,10 @@ sub read_am_file
        }
     }
 
-    $output_vars .= $comment . "\n" . $header_vars;
+    $output_vars .= $comment . "\n";
     $comment = '';
     $spacing = "\n";
+    local ($am_vars) = '';
 
     local ($is_ok_macro);
     while ($_)
@@ -3195,7 +3152,7 @@ sub read_am_file
            }
            else
            {
-               $output_vars .= $_;
+               $am_vars .= $_;
                $saw_bk = /\\$/;
                # Chop newline and backslash if this line is
                # continued.  FIXME: maybe ensure trailing whitespace
@@ -3234,7 +3191,7 @@ sub read_am_file
                $contents{$1} = $2;
            }
            $content_lines{$1} = $.;
-           $output_vars .= $comment . $spacing . $_;
+           $am_vars .= $comment . $spacing . $_;
            $comment = $spacing = '';
            $saw_bk = /\\$/;
 
@@ -3256,6 +3213,51 @@ sub read_am_file
     }
 
     $output_trailer .= $comment;
+
+    # Compute relative location of the top object directory.
+    local (@topdir) = ();
+    foreach (split (/\//, $relative_dir))
+    {
+       next if $_ eq '.' || $_ eq '';
+       if ($_ eq '..')
+       {
+           pop @topdir;
+       }
+       else
+       {
+           push (@topdir, '..');
+       }
+    }
+    @topdir = ('.') if ! @topdir;
+
+    $top_builddir = join ('/', @topdir);
+    local ($build_rx);
+    ($build_rx = $top_builddir) =~ s/(\W)/\\$1/g;
+    $output_vars .= &file_contents_with_transform
+                        ('s/\@top_builddir\@/' . $build_rx . '/g',
+                        'header-vars');
+
+    # Generate some useful variables when AC_CANONICAL_* used.
+    if ($seen_canonical)
+    {
+       local ($curs, %vars);
+       $vars{'host_alias'} = 'host_alias';
+       $vars{'host_triplet'} = 'host';
+       if ($seen_canonical == $AC_CANONICAL_SYSTEM)
+       {
+           $vars{'build_alias'} = 'build_alias';
+           $vars{'build_triplet'} = 'build';
+           $vars{'target_alias'} = 'target_alias';
+           $vars{'target_triplet'} = 'target';
+       }
+       foreach $curs (keys %vars)
+       {
+           $output_vars .= "$curs = \@$vars{$curs}\@\n";
+           $contents{$curs} = "\@$vars{$curs}\@";
+       }
+    }
+
+    $output_vars .= $am_vars;
 }
 
 ################################################################
index 4a6e5c75f3b3a743828045e9e796d0e63acd3309..964779c5bfdd34ea43ae96406044d8f351a0692f 100644 (file)
@@ -47,17 +47,14 @@ install-info: $(INFO_DEPS)
              $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
            else : ; fi; \
          done; \
-## We need the 'else' because in some broken versions of sh 'if' will
-## return false if the test fails.  We use ':' because the GNU
-## standards prohibit us from using 'true'.
-## FIXME: no one has install-info, so for now we just comment it out.
-## FIXME: when we do have install-info, this will have to be split
-## into a separate loop.  See libraries.am for reasons.
-##       $(POST_INSTALL); \
-##       if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
-##         install-info --dir-file=$(infodir)/dir $$d/$$file; \
-##       else :; fi; \
        done
+       $(POST_INSTALL)
+## Only run this code if install-info actually exists.
+       if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
+         for file in $(INFO_DEPS); do \
+           install-info --info-dir=$(infodir) $$file; \
+         done; \
+       else : ; fi
 
 uninstall-info:
        cd $(srcdir) && for file in *.info*; do \
index fac8d548052aecfcfa6eca9b3cdd1ae00516b9b3..d172e7ad7b1e0eac67abdcbda4526b353b99d7db 100644 (file)
@@ -1,3 +1,7 @@
+Thu Oct  3 19:55:23 1996  Tom Tromey  <tromey@cygnus.com>
+
+       * vpath.test: New file.
+
 Mon Sep 30 08:34:07 1996  Tom Tromey  <tromey@cygnus.com>
 
        * comment2.test: New file.
index 1e3aa7f2c930fbd2b0851d0661f3d18b221e77f7..37433d577a8914274501c745f3b13376f5ac0d9b 100644 (file)
@@ -15,6 +15,7 @@ man.test info.test obsolete.test lex.test scripts.test subdir2.test \
 exsource.test canon4.test dup.test defun.test cxxlink.test cxxnoc.test \
 order.test libobj2.test interp.test alllib.test block.test libobj3.test \
 gnits.test interp2.test colneq.test implicit.test spell.test spell2.test \
-confsub.test primary.test primary2.test depend2.test spell3.test comment2.test
+confsub.test primary.test primary2.test depend2.test spell3.test \
+comment2.test vpath.test
 
 EXTRA_DIST = defs $(TESTS)
index 6f5ac85b28fd39e705fd5e5e70041141caa7ebf2..a1a58da3adac7fd1e624112b7b98bc1438841459 100644 (file)
@@ -53,7 +53,8 @@ man.test info.test obsolete.test lex.test scripts.test subdir2.test \
 exsource.test canon4.test dup.test defun.test cxxlink.test cxxnoc.test \
 order.test libobj2.test interp.test alllib.test block.test libobj3.test \
 gnits.test interp2.test colneq.test implicit.test spell.test spell2.test \
-confsub.test primary.test primary2.test depend2.test spell3.test comment2.test
+confsub.test primary.test primary2.test depend2.test spell3.test \
+comment2.test vpath.test
 
 EXTRA_DIST = defs $(TESTS)
 mkinstalldirs = $(top_srcdir)/mkinstalldirs
diff --git a/tests/vpath.test b/tests/vpath.test
new file mode 100755 (executable)
index 0000000..03bbc09
--- /dev/null
@@ -0,0 +1,15 @@
+#! /bin/sh
+
+# Test to make sure VPATH can be overridden.
+# Report from Anthony Green.
+
+. $srcdir/defs || exit 1
+
+cat > Makefile.am << 'END'
+VPATH = zardoz
+END
+
+$AUTOMAKE || exit 1
+
+grep 'VPATH.*@srcdir@' Makefile.in && exit 1
+exit 0
index 4a6e5c75f3b3a743828045e9e796d0e63acd3309..964779c5bfdd34ea43ae96406044d8f351a0692f 100644 (file)
@@ -47,17 +47,14 @@ install-info: $(INFO_DEPS)
              $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
            else : ; fi; \
          done; \
-## We need the 'else' because in some broken versions of sh 'if' will
-## return false if the test fails.  We use ':' because the GNU
-## standards prohibit us from using 'true'.
-## FIXME: no one has install-info, so for now we just comment it out.
-## FIXME: when we do have install-info, this will have to be split
-## into a separate loop.  See libraries.am for reasons.
-##       $(POST_INSTALL); \
-##       if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
-##         install-info --dir-file=$(infodir)/dir $$d/$$file; \
-##       else :; fi; \
        done
+       $(POST_INSTALL)
+## Only run this code if install-info actually exists.
+       if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
+         for file in $(INFO_DEPS); do \
+           install-info --info-dir=$(infodir) $$file; \
+         done; \
+       else : ; fi
 
 uninstall-info:
        cd $(srcdir) && for file in *.info*; do \