From: Scott James Remnant Date: Fri, 23 Jan 2004 06:01:56 +0000 (+0000) Subject: * ltmain.in: new -precious-files-regex link mode option X-Git-Tag: release-1-5-2~23 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ed9783b2bed43df75eab0b680f0cba88009647b5;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index a665e1782..d404feb02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-01-23 Scott James Remnant + + * 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 * libtool.m4 (AC_LIBTOOL_PROG_CC_C_O): Some compilers (e.g. Intel diff --git a/doc/libtool.texi b/doc/libtool.texi index 80745545b..a63cfdf86 100644 --- a/doc/libtool.texi +++ b/doc/libtool.texi @@ -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 diff --git a/ltmain.in b/ltmain.in index 5065415c3..c28a4da15 100644 --- 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