From: Scott James Remnant Date: Mon, 12 Jan 2004 02:32:50 +0000 (+0000) Subject: * ltmain.in: new -precious-files-regex link mode option X-Git-Tag: release-1-9b~203 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08e80547baa53f5a6caee01b648a590163f2c7eb;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 a26b7034f..ded50254f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-01-11 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-08 Gary V. Vaughan * libtoolize.in (func_copy_all_files): s/xfunc_copy/Xfunc_copy. diff --git a/NEWS b/NEWS index ef1d86056..2127ba0f9 100644 --- a/NEWS +++ b/NEWS @@ -33,6 +33,9 @@ New in 1.5b: 2004-??-??; CVS version 1.5a, Libtool team: * Extracting symbols from an import library on cygwin and win32 now works. * Recognises the 'R' symbol type on Solaris so read-only symbols can be exported. +* New link mode option `-precious-files-regex' to prevent accidental removal + of files you want to keep, such as test coverage data, from the temporary + output directory. * Initial support for amigaos-ppc. * Bug fixes. diff --git a/doc/libtool.texi b/doc/libtool.texi index fbc585ce9..bacdf4f8e 100644 --- a/doc/libtool.texi +++ b/doc/libtool.texi @@ -1280,6 +1280,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 18bc95e4f..ba5d4bfce 100644 --- a/ltmain.in +++ b/ltmain.in @@ -888,6 +888,7 @@ EOF no_install=no objs= non_pic_objects= + precious_files_regex= prefer_static_libs=no preload=no prev= @@ -1063,6 +1064,11 @@ EOF prev= continue ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; release) release="-$arg" prev= @@ -1439,6 +1445,11 @@ EOF -o) prev=output ;; + -precious-files-regex) + prev=precious_regex + continue + ;; + -release) prev=release continue @@ -3151,6 +3162,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" ;; *) ;; @@ -6507,6 +6522,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