From 0c507981fe0365c3243e46ec9b9c1fe71ab2fff5 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 19 Mar 2000 22:34:19 +0000 Subject: [PATCH] More for PR automake/38: * automake.texi (Invoking Automake): Document --force-missing. * automake.in (force_missing): New global. (parse_arguments): Recognize --force-missing. (initialize_global_constants): Document --force-missing. (require_file_internal): Handle --force-missing. --- ChangeLog | 7 +++++++ automake.in | 12 ++++++++++-- automake.texi | 7 +++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 403b70d6..a0b25476 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2000-03-19 Tom Tromey + More for PR automake/38: + * automake.texi (Invoking Automake): Document --force-missing. + * automake.in (force_missing): New global. + (parse_arguments): Recognize --force-missing. + (initialize_global_constants): Document --force-missing. + (require_file_internal): Handle --force-missing. + Fix for PR automake/38: * automake.in (require_file_internal): Check for and handle dangling symlinks. Fixes symlink2.test. diff --git a/automake.in b/automake.in index 87c26934..b754d83f 100755 --- a/automake.in +++ b/automake.in @@ -109,6 +109,9 @@ $add_missing = 0; # TRUE if we should copy missing files; otherwise symlink if possible. $copy_missing = 0; +# TRUE if we should always update files that we know about. +$force_missing = 0; + # Files found by scanning configure.in for LIBOBJS. %libsources = (); @@ -468,6 +471,10 @@ sub parse_arguments { $force_generation = 0; } + elsif ($arglist[0] eq '--force-missing') + { + $force_missing = 1; + } elsif ($arglist[0] =~ /^--output-dir=(.*)$/) { # Set output directory. @@ -6654,6 +6661,7 @@ sub initialize_global_constants --amdir=DIR directory storing config files -c, --copy with -a, copy missing files (default is symlink) --cygnus assume program is part of Cygnus-style tree + --force-missing force update of standard files --foreign set strictness to foreign --gnits set strictness to gnits --gnu set strictness to gnu @@ -7476,7 +7484,7 @@ sub require_file_internal } } - if ($found_it) + if ($found_it && ! $force_missing) { # Prune the path list. @require_file_paths = $save_dir; @@ -7485,7 +7493,7 @@ sub require_file_internal { if ($strictness >= $mystrict) { - if ($dangling_sym) + if ($dangling_sym || $force_missing) { unlink ($fullfile); } diff --git a/automake.texi b/automake.texi index 6b743f15..4f1b3c26 100644 --- a/automake.texi +++ b/automake.texi @@ -815,6 +815,13 @@ copied. The default is to make a symbolic link. Causes the generated @file{Makefile.in}s to follow Cygnus rules, instead of GNU or Gnits rules. For more information, see @ref{Cygnus}. +@item --force-missing +@opindex --force-missing +When used with @code{--add-missing}, causes standard files to be rebuilt +even if they already exist in the source tree. This involves removing +the file from the source tree before creating the new symlink (or, with +@code{--copy}, copying the new file). + @item --foreign @opindex --foreign Set the global strictness to @samp{foreign}. For more information, see -- 2.43.5