From: Tom Tromey Date: Sun, 27 Sep 1998 22:43:21 +0000 (+0000) Subject: * automake.in (handle_ltlibraries): Wrote better comment about X-Git-Tag: Release-1-3d~72 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=cd425c2feeb2e39bfaba9dd47d238e28306bf820;p=automake.git * automake.in (handle_ltlibraries): Wrote better comment about EXTRA_LTLIBRARIES. * automake.texi (Invoking Automake): Document --copy. * automake.in (copy_missing): New global. (parse_arguments): Recognize --copy/-c. (require_file_internal): Handle $copy_missing. Fixed error message. (initialize_global_constants): Document -c/--copy. --- diff --git a/ChangeLog b/ChangeLog index acc55ddd..b61ee38a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ Sun Sep 27 20:02:21 1998 Tom Tromey + * automake.in (handle_ltlibraries): Wrote better comment about + EXTRA_LTLIBRARIES. + + * automake.texi (Invoking Automake): Document --copy. + * automake.in (copy_missing): New global. + (parse_arguments): Recognize --copy/-c. + (require_file_internal): Handle $copy_missing. Fixed error + message. + (initialize_global_constants): Document -c/--copy. + * automake.texi: Document LIBOBJS trick. * automake.in (handle_dist_worker): If DIST_SUBDIRS defined, use diff --git a/automake.in b/automake.in index 5858450d..af719567 100755 --- a/automake.in +++ b/automake.in @@ -100,6 +100,9 @@ $symlink_exists = (eval 'symlink ("", "");', $@ eq ''); # TRUE if missing standard files should be installed. $add_missing = 0; +# TRUE if we should copy missing files; otherwise symlink if possible. +$copy_missing = 0; + # Files found by scanning configure.in for LIBOBJS. %libsources = (); @@ -429,6 +432,10 @@ sub parse_arguments { $add_missing = 1; } + elsif ($arglist[0] eq '--copy' || $arglist[0] eq 'c') + { + $copy_missing = 1; + } elsif ($arglist[0] eq '--verbose' || $arglist[0] eq '-v') { $verbose = 1; @@ -1892,8 +1899,11 @@ sub handle_ltlibraries local ($rpath); if ($instdirs{$onelib} eq 'EXTRA') { - # It's an EXTRA_ library, so we can't specify -rpath. - # Yuck. + # It's an EXTRA_ library, so we can't specify -rpath, + # because we don't know where the library will end up. + # The user probably knows, but generally speaking automake + # doesn't -- and in fact configure could decide + # dynamically between two different locations. $rpath = 's/\@RPATH\@//go;'; } else @@ -5584,6 +5594,7 @@ sub initialize_global_constants -a, --add-missing add missing standard files to package --amdir=DIR directory storing config files --build-dir=DIR directory where build being done (for dependencies) + -c, --copy with -a, copy missing files (default is symlink) --cygnus assume program is part of Cygnus-style tree --foreign set strictness to foreign --gnits set strictness to gnits @@ -6255,7 +6266,7 @@ sub require_file_internal # first, in case it is a dangling symlink. $message = "installing \`$errfile'"; unlink ($errfile); - if ($symlink_exists) + if ($symlink_exists && ! $copy_missing) { if (! symlink ($am_dir . '/' . $file, $errfile)) { @@ -6266,7 +6277,7 @@ sub require_file_internal elsif (! system ('cp', $am_dir . '/' . $file, $errfile)) { $suppress = 0; - $trailer = "\n error while making link\n"; + $trailer = "\n error while copying\n"; } } } diff --git a/automake.texi b/automake.texi index cf8b6f10..1f809aa4 100644 --- a/automake.texi +++ b/automake.texi @@ -705,7 +705,9 @@ for instance @file{config.guess} is required if @file{configure.in} runs @code{AC_CANONICAL_HOST}. Automake is distributed with several of these files; this option will cause the missing ones to be automatically added to the package, whenever possible. In general if Automake tells you a -file is missing, try using this option. +file is missing, try using this option. By default Automake tries to +make a symbolic link pointing to its own copy of the missing file; this +can be changed with @code{--copy}. @item --amdir=@var{dir} Look for Automake data files in directory @var{dir} instead of in the @@ -716,6 +718,11 @@ Tell Automake where the build directory is. This option is used when including dependencies into a @file{Makefile.in} generated by @code{make dist}; it should not be used otherwise. +@item -c +@item --copy +When used with @code{--add-missing}, causes installed files to be +copied. The default is to make a symbolic link. + @item --cygnus Causes the generated @file{Makefile.in}s to follow Cygnus rules, instead of GNU or Gnits rules. @xref{Cygnus} for more information.