]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
More bug fixes
authorTom Tromey <tromey@redhat.com>
Fri, 26 Apr 1996 04:43:26 +0000 (04:43 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 26 Apr 1996 04:43:26 +0000 (04:43 +0000)
ChangeLog
TODO
automake.in
automake.texi
dist-vars.am
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/exdir.test
tests/noinst.test [new file with mode: 0755]
version.texi

index c91e02d8e43f449357f5b61bc094a3f868c4c882..05d4121daed23412e435032b18b9c94db85d2f72 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+Thu Apr 25 18:40:06 1996  Tom Tromey  <tromey@creche.cygnus.com>
+
+       * automake.in (handle_dist_worker): Use $(TAR), not tar.
+       (handle_merge_targets): Make sure config header is built before
+       recursing into subdirs.
+       (handle_libraries): Generate LIBFILES for check_LIBRARIES.
+       (handle_merge_targets): Handle case where nothing is installed but
+       something must be built -- "make install" must still work.
+
+       * dist-vars.am (TAR): New macro.
+
+       * automake.in (scan_configure): Support AC_REPLACE_GNU_GETOPT.
+       (handle_configure): Require stamp-h.in when config header used.
+
 Tue Apr 23 17:57:13 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
 
        * doc/mdate-sh: Extract the last field from the date output, not
diff --git a/TODO b/TODO
index eb663a4a2986e7f189c55b0aa58b15c804d760e9..c7e808d3bfda66aa7e52c8ee53ec9252ddf15b4c 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,19 +1,18 @@
 Priorities for release:
-??? targets for EXTRA_ should not be generated!!!
 * Fix all mkinstalldirs invocations
 * separate dist and distdir targets, so recursive uses of Automake work ok
+* make the auto-dep code crash if GNU make not in use?
 
 * Add no-remake option
 * scripts are installed in $exec_prefix/bin, not $prefix/bin
   Bug or feature?
 
-* Add support for libtool
-* At top level, config.h is not depended on...
-* Must look for/enforce existence of stamp-h.in in srcdir?
-   ... there is something broken here...
 * Should be a way to have "nobuild_PROGRAMS" which aren't even built,
   but which could be by running the magic make command.
 
+* Should have tool like "autoreconf" that only remakes Makefiles that
+  need it.  Probably autoreconf should be modified to handle automake
+
 Other priorities:
 * Must rewrite am_install_var.  Should break into multiple functions.
   This will allow the callers to be a little smarter.
@@ -27,8 +26,6 @@ Things to finish libtool support:
 * Handle clean changes
 * New definition for LINK
 
-* search for gnu tar and substitute in dist targets?
-
 Scan source directories and warn about missing files, eg .c/.h files
 that aren't mentioned?
 
@@ -41,7 +38,8 @@ Currently gettext requires @INTLSUB@ and @POSUB@ in SUBDIRS.  In the
 future this will be just intl and po.  When that happens, re-enable
 warnings in handle_subdirs.
 
-Need way to say there are no suffixes in a Makefile
+Need way to say there are no suffixes in a Makefile (Franc,ois'
+"override" idea suffices here)
 
 Check to make sure various scripts are executable (IE when looking for
 them in a directory)
@@ -59,6 +57,9 @@ MAINT_CHARSET and DIST_CHARSET are not identical.  NOTE: gettext must
 arrange for all .po files not to be recoded.  In the long term this
 might be a problem (consider when some systems use Unicode but the
 rest do not)
+  MAINT_CHARSET *must* be local to each Makefile.am, to enable
+       merged distributions.
+  DIST_CHARSET must be passed down to subdir makes during a "make dist"
 
 Handle dist-zoo and dist-zip.  Generally add more DOS support.  Maybe
 run "doschk" (why isn't this merged with "pathchk"?) when doing a
@@ -222,6 +223,9 @@ Make a definition of the term "source"
 
 need xref to libtool in docs
 
+document how to use Automake with CVS.  Idea from Mark Galassi.  Also
+include Greg Woods' more sophisticated "cvs-dist" target.
+
 ================================================================
 
 Libraries:
index 1499d72b4000f2d6ac3f9c0e9ff9b6208f4b2f9d..ef6aed42005e3debae9d57181421b34e7d2029ef 100755 (executable)
@@ -722,7 +722,7 @@ sub handle_libraries
     # am_install_var.
     local ($onedir, $onelib);
     local (@outlist);
-    foreach $onedir ('lib', 'pkglib', 'noinst')
+    foreach $onedir ('lib', 'pkglib', 'noinst', 'check')
     {
        if (&variable_defined ($onedir . '_LIBRARIES'))
        {
@@ -1171,7 +1171,7 @@ sub handle_dist_worker
        }
        else
        {
-           $output_rules .= 'tar chozf $(distdir).tar.gz $(distdir)';
+           $output_rules .= '$(TAR) chozf $(distdir).tar.gz $(distdir)';
        }
        $output_rules .= "\n\t" . 'rm -rf $(distdir)' . "\n";
     }
@@ -1399,7 +1399,8 @@ sub handle_configure
                &push_dist_common ($config_name . '.bot');
            }
 
-           &push_dist_common ('stamp-h.in');
+           &require_file_with_conf_line ($config_header_line, $FOREIGN,
+                                         'stamp-h.in');
 
            $output_rules .= &file_contents ('remake-hdr');
            $output_vars .= "CONFIG_HEADER_IN = ${config_header}\n";
@@ -1613,10 +1614,33 @@ sub handle_merge_targets
 
        if (@all)
        {
+           local (@hackall) = ();
+           if ($config_name && &dirname ($config_name) eq $relative_dir)
+           {
+
+               # This is kind of a hack, but I couldn't see a better
+               # way to handle it.  In this particular case, we need
+               # to make sure config.h is built before we recurse.
+               # We can't do this by changing the order of
+               # dependencies to the "all" because that breaks when
+               # using parallel makes.  Instead we handle things
+               # explicitly.
+               $output_rules .= ('all-recursive-hack: $(CONFIG_HEADER)'
+                                 . "\n\t" . '$(MAKE) all-recursive'
+                                 . "\n\n");
+               push (@hackall, 'all-recursive-hack');
+               push (@phony, 'all-recursive-hack');
+           }
+           else
+           {
+               push (@hackall, 'all-recursive');
+           }
+
            $output_rules .= ('all-am: '
                              . join (' ', @all)
                              . "\n\n");
-           @all = ('all-recursive', 'all-am');
+           @all = @hackall;
+           push (@all, 'all-am');
            push (@phony, 'all-am');
        }
        else
@@ -1663,7 +1687,8 @@ sub handle_merge_targets
        }
     }
 
-    # Step three: print definitions users can use.
+    # Step three: print definitions users can use.  Code below knows
+    # that install-exec is done before install-data, beware.
     $output_rules .= ("install-exec: "
                      . join (' ', @install_exec)
                      . "\n");
@@ -1689,7 +1714,12 @@ sub handle_merge_targets
     # If no dependencies for 'install', add 'all'.  Why?  That way
     # "make install" at top level of distclean'd distribution won't
     # fail because stuff in 'lib' fails to build.
-    push (@install, 'all') if ! @install;
+    if (! @install || ($#install == 1
+                      && $install[0] eq 'install-exec'
+                      && $install[1] eq 'install-data'))
+    {
+       push (@install, 'all');
+    }
     $output_rules .= ('install: '
                      . join (' ', @install)
                      # Use "@:" as empty command so nothing prints.
@@ -1896,6 +1926,11 @@ sub scan_configure
                $libsources{$_ . '.c'} = 1;
            }
        }
+       elsif (/AC_REPLACE_GNU_GETOPT/)
+       {
+           $libsources{'getopt.c'} = 1;
+           $libsources{'getopt1.c'} = 1;
+       }
        elsif (/LIBOBJS="(.*)\s+\$LIBOBJS"/
               || /LIBOBJS="\$LIBOBJS\s+(.*)"/)
        {
index 1ecc3aa51297bfedc680b87c46ec9578350bb4af..74ac7d147c8a7b39d64fbe9acf3452c1a894c981 100644 (file)
@@ -432,7 +432,12 @@ and their effects are:
 @table @code
 @item AC_CONFIG_HEADER
 Automake will generate rules to automatically regenerate the config
-header.
+header.  If you do use this macro, you must create the file
+@file{stamp-h.in}.  It can be empty.  Also, the @code{AC_OUTPUT} command
+in @file{configure.in} must create @file{stamp-h}, eg:
+@example
+AC_OUTPUT(Makefile, [test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
+@end example
 @cvindex AC_CONFIG_HEADER
 
 @item AC_CONFIG_AUX_DIR
@@ -470,6 +475,7 @@ exist.
 @item fp_FUNC_FNMATCH
 @item AC_FUNC_FNMATCH
 @item AC_REPLACE_FUNCS
+@item AC_REPLACE_GNU_GETOPT
 Automake will ensure that the appropriate source files are part of the
 distribution, and will ensure that the appropriate dependencies are
 generated for these objects.  @xref{A Library} for more
@@ -481,6 +487,7 @@ information.
 @cvindex fp_FUNC_FNMATCH
 @cvindex AC_FUNC_FNMATCH
 @cvindex AC_REPLACE_FUNCS
+@cvindex AC_REPLACE_GNU_GETOPT
 
 Automake will also detect statements which put @samp{.o} files into
 @code{LIBOBJS}, and will treat these additional files in a similar way.
index 69013afd7dd0038f4c8b73406871c014635e920c..13db7569b6d5e8b5c282722ef11c36c0df097e27 100644 (file)
@@ -24,3 +24,5 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
 ## Like DISTFILES, but look at INFO_DEPS, not INFOS.
 DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
        $(TEXINFOS) $(INFO_DEPS) $(MANS) $(EXTRA_DIST) $(DATA)
+
+TAR = tar
index f468b1fef0595dc969823e8812f462ba32a18911..ec956900eb8b5db5761183f837df84bbdcfeec09 100644 (file)
@@ -1,5 +1,9 @@
 Thu Apr 25 17:12:30 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
+       * noinst.test: New file
+
+       * exdir.test: Quoting change from Gord Matzigkeit.
+
        * extra.test (EXTRA_PROGRAMS): New file.
 
 Tue Apr  9 22:55:07 1996  Tom Tromey  <tromey@creche.cygnus.com>
index 43caf55fad42100725f6c007c18810cd6d9d92b5..d705ae933b990adf9ea6b544f3bef17b18c589b5 100644 (file)
@@ -6,6 +6,6 @@ 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 insh.test canon2.test \
-target.test extra.test
+target.test extra.test noinst.test
 
 EXTRA_DIST = defs $(TESTS)
index c812e0b1585e9c6e5d880649c3887b2292b23a3d..5e7f1b4e07791b2fbc665bdcac43b32e3381a364 100644 (file)
@@ -44,7 +44,7 @@ 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 insh.test canon2.test \
-target.test extra.test
+target.test extra.test noinst.test
 
 EXTRA_DIST = defs $(TESTS)
 DIST_COMMON = ChangeLog Makefile.am Makefile.in
@@ -57,6 +57,8 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
        $(TEXINFOS) $(INFOS) $(MANS) $(EXTRA_DIST) $(DATA)
 DEP_DISTFILES = $(DIST_COMMON) $(SOURCES) $(BUILT_SOURCES) $(HEADERS) \
        $(TEXINFOS) $(INFO_DEPS) $(MANS) $(EXTRA_DIST) $(DATA)
+
+TAR = tar
 default: all
 
 
index dd438e560e63a9b3864905ff3fd4d213eb083706..0ef3cbe5a7236f2e7caf17fb1b312ee9a5dd019d 100755 (executable)
@@ -12,4 +12,4 @@ EOF
 
 $AUTOMAKE || exit 1
 
-grep ^DATA Makefile.in | grep html
+grep '^DATA' Makefile.in | grep html
diff --git a/tests/noinst.test b/tests/noinst.test
new file mode 100755 (executable)
index 0000000..342e886
--- /dev/null
@@ -0,0 +1,18 @@
+#! /bin/sh
+
+# Check to make sure "make install" will build all in directory with
+# nothing to install.
+
+. $srcdir/defs || exit 1
+
+cat > Makefile.am << 'END'
+all-local:
+       exit 1
+END
+
+$AUTOMAKE || exit 1
+
+# "make install" should fail here if there is a bug.
+make -f Makefile.in install && exit 1
+
+exit 0
index ba00109659e9a7c27d3b9dd78895e11328a7ec12..7a7e0e1e2ccc031b0ece40ba3ec4783ef9576f6f 100644 (file)
@@ -1,3 +1,3 @@
-@set UPDATED 5 April 1996
+@set UPDATED 25 April 1996
 @set EDITION 0.32
 @set VERSION 0.32