diff options
author | jlam <jlam@pkgsrc.org> | 2002-09-16 19:55:56 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2002-09-16 19:55:56 +0000 |
commit | db716be0c359722255a4dad9c524fb37986a7d87 (patch) | |
tree | 0d9ec69375436b74e2bed852a213149bca7dd96b | |
parent | 9307af5faa9080ba33ab56e5b2c461df92801bdf (diff) | |
download | pkgsrc-db716be0c359722255a4dad9c524fb37986a7d87.tar.gz |
Change the way that we note when a libtool file has been fixed by
buildlink2. We used to create a timestamp file in the .libs directory.
Now, we add a line to the *.la and *.lai file that directly notes that it
has been "modified by buildlink2". This makes it easier to debug problems
caused by using the wrong libtool during either a build or install by
checking if the *.la or *.lai files have the "modified by buildlink2" line.
-rw-r--r-- | mk/buildlink2/bsd.buildlink2.mk | 3 | ||||
-rw-r--r-- | mk/buildlink2/libtool-fix-la | 15 |
2 files changed, 12 insertions, 6 deletions
diff --git a/mk/buildlink2/bsd.buildlink2.mk b/mk/buildlink2/bsd.buildlink2.mk index 9afc4bbfbb2..43ba505b4b9 100644 --- a/mk/buildlink2/bsd.buildlink2.mk +++ b/mk/buildlink2/bsd.buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink2.mk,v 1.18 2002/09/07 07:33:14 jlam Exp $ +# $NetBSD: bsd.buildlink2.mk,v 1.19 2002/09/16 19:55:56 jlam Exp $ # # An example package buildlink2.mk file: # @@ -667,6 +667,7 @@ ${_BLNK_LIBTOOL_FIX_LA}: ${.CURDIR}/../../mk/buildlink2/libtool-fix-la -e "s|@CP@|${CP:Q}|g" \ -e "s|@DIRNAME@|${DIRNAME:Q}|g" \ -e "s|@ECHO@|${ECHO:Q}|g" \ + -e "s|@EGREP@|${EGREP:Q}|g" \ -e "s|@MV@|${MV:Q}|g" \ -e "s|@RM@|${RM:Q}|g" \ -e "s|@SED@|${SED:Q}|g" \ diff --git a/mk/buildlink2/libtool-fix-la b/mk/buildlink2/libtool-fix-la index e662f4b2827..a05eceaa318 100644 --- a/mk/buildlink2/libtool-fix-la +++ b/mk/buildlink2/libtool-fix-la @@ -1,4 +1,4 @@ -# $NetBSD: libtool-fix-la,v 1.2 2002/08/22 08:21:29 jlam Exp $ +# $NetBSD: libtool-fix-la,v 1.3 2002/09/16 19:55:57 jlam Exp $ # # For *.la files, in the "relink_command" line, we make the following # replacements: @@ -16,7 +16,7 @@ labase=`@BASENAME@ $lafile .la` ladir=`@DIRNAME@ $lafile` latimestamp=${ladir}/.${labase}.la.timestamp laifile=${ladir}/.libs/${labase}.lai -if [ ! -f $latimestamp ]; then +if [ -f $lafile ]; then . ${ladir}/${labase}.la relink= @@ -48,16 +48,20 @@ if [ ! -f $latimestamp ]; then ;; esac done - if [ -n "$relink" ]; then + if [ -n "$relink" ] && \ + ! @EGREP@ "^#.*modified by buildlink2" $lafile >/dev/null 2>&1; then @MV@ -f $lafile ${lafile}.blsav ( @CAT@ ${lafile}.blsav | @SED@ -e '/^relink_command=/,$d' @ECHO@ "relink_command='$relink'" @CAT@ ${lafile}.blsav | @SED@ -e '1,/^relink_command=/d' + @ECHO@ + @ECHO@ "# This file has been modified by buildlink2." ) > $lafile @ECHO@ "==> Fixed $lafile" >> $wrapperlog fi - if [ -n "$laifile" ] && [ -f "$laifile" ]; then + if [ -n "$laifile" ] && [ -f "$laifile" ] && \ + ! @EGREP@ "^#.*modified by buildlink2" $laifile >/dev/null 2>&1; then @SED@ @_BLNK_WRAP_LT_UNTRANSFORM_SED@ \ $laifile > ${laifile}.tmp . ${laifile}.tmp @@ -92,9 +96,10 @@ if [ ! -f $latimestamp ]; then @CAT@ ${laifile}.tmp | @SED@ -e '/^dependency_libs=/,$d' @ECHO@ "dependency_libs='$deps'" @CAT@ ${laifile}.tmp | @SED@ -e '1,/^dependency_libs=/d' + @ECHO@ + @ECHO@ "# This file has been modified by buildlink2." ) > ${laifile} @RM@ -f ${laifile}.tmp @ECHO@ "==> Fixed $laifile" >> $wrapperlog fi - @TOUCH@ $latimestamp fi |