]> sourceware.org Git - automake.git/commitdiff
Added --no-force. Bug fix
authorTom Tromey <tromey@redhat.com>
Sat, 22 Jun 1996 00:29:14 +0000 (00:29 +0000)
committerTom Tromey <tromey@redhat.com>
Sat, 22 Jun 1996 00:29:14 +0000 (00:29 +0000)
ChangeLog
Makefile.in
NEWS
TODO
automake.in
lib/am/texinfos.am
tests/Makefile.in
texinfos.am

index 48033a250144869b2efd078c3524d459e61c7866..5bd9ededa78a0f9d9e65d7d13488e541ab46e113 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 Fri Jun 21 10:42:06 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
+       * texinfos.am (install-info): Use "if", not "&&", to avoid
+       install problem when glob doesn't match.
+
+       * automake.in (initialize_global_constants): [USAGE] Added
+       --no-force.
+       (force_generation): New global.
+       (parse_arguments): Handle --no-force.
+       (generate_makefile): Handle --no-force.
+
        * Makefile.am (maintainer-check): Ensure all invocations of
        mkinstalldirs are correct.
 
index 34b02333be2d0378b8050483139a3a0bbbde5e48..7f65aa60283e6f6bf603b0556964ce51e2261389 100644 (file)
@@ -182,8 +182,9 @@ install-info: $(INFO_DEPS)
        $(mkinstalldirs) $(infodir)
        for file in $(INFO_DEPS); do \
          for ifile in `cd $(srcdir) && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
-           test -f $(srcdir)/$$ifile \
-             && $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
+           if test -f $(srcdir)/$$ifile; then \
+             $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
+           else : ; fi; \
          done; \
        done
 
diff --git a/NEWS b/NEWS
index dfa090f5d83528012c3f34b890778382117b6017..f7f0fab70c2b4f21d91550eecd108795485807e2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ New in 1.1:
 * Better DejaGNU support
 * Added no-installinfo option
 * Added Emacs Lisp support
+* Added --no-force option
 \f
 New in 1.0:
 * Bug fixes
diff --git a/TODO b/TODO
index e40153f742cbb2b0969c3ed8ae70d35579133128..9780c12aaf64d754c8a233b7a745201fd742fdba 100644 (file)
--- a/TODO
+++ b/TODO
@@ -4,6 +4,12 @@ Priorities for release:
 ** Consider using implicit .y.c and .l.c rules instead of current
    lex/yacc trickery
 
+add new flag to only remake Makefile.in's that are old.  use this in
+autoreconf.
+
+add support for Makefile.tmpl that is auto-included in every
+Makefile.am.  That makes it easier to do some non-std thing in every
+subdirectory.
 
 consider printing full file name of Makefile.am or configure.in when
 giving error.  This would help for very large trees with many
index c5b89651162eda4de27889dd492f40f9c40d0860..c320d15549424259a8d29573d2c7f1286a5fb3c8 100755 (executable)
@@ -50,6 +50,9 @@ $GNITS = 2;
 
 # Variables global to entire run.
 
+# TRUE if we should always generate Makefile.in.
+$force_generation = 1;
+
 # Strictness level as set on command line.
 $default_strictness = $GNU;
 
@@ -272,6 +275,10 @@ sub parse_arguments
        {
            $cmdline_use_dependencies = 0;
        }
+       elsif ($arglist[0] eq '--no-force')
+       {
+           $force_generation = 0;
+       }
        elsif ($arglist[0] =~ /^--output-dir=(.*)$/)
        {
            # Set output directory.
@@ -334,8 +341,6 @@ sub generate_makefile
     $in_file_name = $am_file_name . '.in';
     $am_file_name .= '.am';
 
-    print "automake: creating ", $makefile, ".in\n" if $verbose;
-
     &initialize_per_input;
     $relative_dir = &dirname ($makefile);
 
@@ -405,12 +410,27 @@ sub generate_makefile
     {
        &mkdir ($output_directory . '/' . $relative_dir);
     }
-    if (! open (GM_FILE, "> " . $output_directory . '/' . $makefile . ".in"))
+
+    local ($out_file) = $output_directory . '/' . $makefile . ".in";
+    if (! $force_generation && -e $out_file)
+    {
+       local ($am_time) = (stat ($makefile . '.am'))[9];
+       local ($in_time) = (stat ($out_file))[9];
+       # FIXME how to do unsigned comparison?
+       if ($am_time < $in_time)
+       {
+           # No need to update.
+           return;
+       }
+    }
+
+    if (! open (GM_FILE, "> " . $out_file))
     {
        warn "automake: ${am_file}.in: cannot open: $!\n";
        $exit_status = 1;
        return;
     }
+    print "automake: creating ", $makefile, ".in\n" if $verbose;
 
     print GM_FILE $output_vars;
     print GM_FILE $output_rules;
@@ -2597,6 +2617,7 @@ sub initialize_global_constants
   --help                print this help, then exit
   -i, --include-deps    include generated dependencies in Makefile.in
   -a, --add-missing     add missing standard files to package
+  --no-force            only update Makefile.in's that are out of date
   -o DIR, --output-dir=DIR
                         put generated Makefile.in's into DIR
   -s LEVEL, --strictness=LEVEL
index bcf2791c817c62a6559d40e22271211cd9698468..a4d60c95582f1120f91baee309ea9df724ecc6d4 100644 (file)
@@ -31,8 +31,9 @@ install-info: $(INFO_DEPS)
 ## We use these strange circumlocutions because we want the "ifile" to
 ## be relative, for the install.
          for ifile in `cd $(srcdir) && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
-           test -f $(srcdir)/$$ifile \
-             && $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
+           if test -f $(srcdir)/$$ifile; then \
+             $(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
index 289ec7625398e003e214caf252bdb80506a9131e..506e2a0dc5244f101e4524d8724a4d944383f964 100644 (file)
@@ -90,7 +90,7 @@ check-TESTS: $(TESTS)
          all=`expr $$all + 1`; \
          if test -f $$tst; then dir=.; \
          else dir="$(srcdir)"; fi; \
-         if $$dir/$$tst; then \
+         if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \
            echo "PASS: $$tst"; \
          else \
            failed=`expr $$failed + 1`; \
index bcf2791c817c62a6559d40e22271211cd9698468..a4d60c95582f1120f91baee309ea9df724ecc6d4 100644 (file)
@@ -31,8 +31,9 @@ install-info: $(INFO_DEPS)
 ## We use these strange circumlocutions because we want the "ifile" to
 ## be relative, for the install.
          for ifile in `cd $(srcdir) && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
-           test -f $(srcdir)/$$ifile \
-             && $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
+           if test -f $(srcdir)/$$ifile; then \
+             $(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
This page took 0.049054 seconds and 5 git commands to generate.