* automake.in (handle_ltlibraries): Wrote better comment about
authorTom Tromey <tromey@redhat.com>
Sun, 27 Sep 1998 22:43:23 +0000 (22:43 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 27 Sep 1998 22:43:23 +0000 (22:43 +0000)
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.

ChangeLog
automake.in
automake.texi

index acc55dd..b61ee38 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 Sun Sep 27 20:02:21 1998  Tom Tromey  <tromey@cygnus.com>
 
+       * 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
index 5858450..af71956 100755 (executable)
@@ -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";
                        }
                    }
                }
index cf8b6f1..1f809aa 100644 (file)
@@ -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.