]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in: new -precious-files-regex link mode option
authorScott James Remnant <scott@netsplit.com>
Fri, 23 Jan 2004 06:01:56 +0000 (06:01 +0000)
committerScott James Remnant <scott@netsplit.com>
Fri, 23 Jan 2004 06:01:56 +0000 (06:01 +0000)
to prevent removal of matching files from the temporary
output directory.
(Debian Bug #221420)
* doc/libtool.texi: document the new option.
* NEWS: announce the new option.

ChangeLog
doc/libtool.texi
ltmain.in

index a665e1782cef0bdd990ee877e6f095bd9123d704..d404feb0252d3572851b9b1de6d4ee3f6355dfdb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-01-23  Scott James Remnant  <scott@netsplit.com>
+
+       * ltmain.in: new -precious-files-regex link mode option
+       to prevent removal of matching files from the temporary
+       output directory.
+       (Debian Bug #221420)
+       * doc/libtool.texi: document the new option.
+       * NEWS: announce the new option.
+
 2004-01-22  Jeff Squyres  <jsquyres@lam-mpi.org>
 
        * libtool.m4 (AC_LIBTOOL_PROG_CC_C_O): Some compilers (e.g. Intel
index 80745545b1a41df17a65ffe21298a5e53d7f6bd2..a63cfdf86a414ce9a9b3e21f9350be95108ce571 100644 (file)
@@ -1270,6 +1270,11 @@ libraries (@pxref{Inter-library dependencies}).
 @item -o @var{output-file}
 Create @var{output-file} from the specified objects and libraries.
 
+@item -precious-files-regex @var{regex}
+Prevents removal of files from the temporary output directory whose
+names match this regular expression.  You might specify @samp{\.bbg?$}
+to keep those files created with @code{gcc -ftest-coverage} for example.
+
 @item -release @var{release}
 Specify that the library was generated by release @var{release} of your
 package, so that users can easily tell which versions are newer than
index 5065415c3325430bb61083a81d09597182d97841..c28a4da1546844d410da8c786860f9d034a9854b 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -867,6 +867,7 @@ EOF
     no_install=no
     objs=
     non_pic_objects=
+    precious_files_regex=
     prefer_static_libs=no
     preload=no
     prev=
@@ -990,6 +991,11 @@ EOF
          prev=
          continue
          ;;
+       precious_regex)
+         precious_files_regex="$arg"
+         prev=
+         continue
+         ;;
        release)
          release="-$arg"
          prev=
@@ -1351,6 +1357,11 @@ EOF
 
       -o) prev=output ;;
 
+      -precious-files-regex)
+       prev=precious_regex
+       continue
+       ;;
+
       -release)
        prev=release
        continue
@@ -3048,6 +3059,10 @@ EOF
            *.$objext)
               ;;
            $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+              if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+              then
+                continue
+              fi
               removelist="$removelist $p"
               ;;
            *) ;;
@@ -6245,6 +6260,8 @@ The following components of LINK-COMMAND are treated specially:
   -no-undefined     declare that a library does not refer to external symbols
   -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
   -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
   -release RELEASE  specify package release information
   -rpath LIBDIR     the created library will eventually be installed in LIBDIR
   -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries