diff options
author | jlam <jlam@pkgsrc.org> | 2002-09-23 22:32:07 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2002-09-23 22:32:07 +0000 |
commit | 3a13ebd730fe23bfc7b1150fd0ae2b7583a6a17a (patch) | |
tree | 356fec7bb1ea3b473dab31c26ece47bd92d16cbd /mk/buildlink2 | |
parent | e9e26df1fc161cd494bbd28081a6280400ecfcc2 (diff) | |
download | pkgsrc-3a13ebd730fe23bfc7b1150fd0ae2b7583a6a17a.tar.gz |
The previous commit of libtool-fix-la let a lot of references to the build
directory escape into the installed *.la files. Fix this by only adding
-L*/.libs if the *.la file is uninstalled, and by filtering out references
to ${WRKSRC}.
Diffstat (limited to 'mk/buildlink2')
-rw-r--r-- | mk/buildlink2/bsd.buildlink2.mk | 3 | ||||
-rw-r--r-- | mk/buildlink2/libtool-fix-la | 40 |
2 files changed, 29 insertions, 14 deletions
diff --git a/mk/buildlink2/bsd.buildlink2.mk b/mk/buildlink2/bsd.buildlink2.mk index 51a1b62461b..af73bd6b4e7 100644 --- a/mk/buildlink2/bsd.buildlink2.mk +++ b/mk/buildlink2/bsd.buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink2.mk,v 1.28 2002/09/23 01:11:39 jlam Exp $ +# $NetBSD: bsd.buildlink2.mk,v 1.29 2002/09/23 22:32:07 jlam Exp $ # # An example package buildlink2.mk file: # @@ -813,6 +813,7 @@ ${_BLNK_WRAP_SPECIFIC_LOGIC.LD}: ${.CURDIR}/../../mk/buildlink2/ld-logic ${_BLNK_LIBTOOL_FIX_LA}: ${.CURDIR}/../../mk/buildlink2/libtool-fix-la ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG}${SED} \ + -e "s|@WRKSRC@|${WRKSRC}|g" \ -e "s|@BASENAME@|${BASENAME:Q}|g" \ -e "s|@CAT@|${CAT:Q}|g" \ -e "s|@CP@|${CP:Q}|g" \ diff --git a/mk/buildlink2/libtool-fix-la b/mk/buildlink2/libtool-fix-la index 5cc5605fbae..8661df85ea9 100644 --- a/mk/buildlink2/libtool-fix-la +++ b/mk/buildlink2/libtool-fix-la @@ -1,4 +1,4 @@ -# $NetBSD: libtool-fix-la,v 1.5 2002/09/20 00:59:48 jlam Exp $ +# $NetBSD: libtool-fix-la,v 1.6 2002/09/23 22:32:08 jlam Exp $ # # For *.la files, in the "relink_command" line, we make the following # replacements: @@ -31,10 +31,14 @@ if [ -f $lafile ]; then ;; *.la) ltlibsdir=`@DIRNAME@ $i`/.libs - case "$deps" in - *"-L$ltlibsdir "*) ;; - *"-L$ltlibsdir") ;; - *) deps="$deps -L$ltlibsdir" ;; + case "$ltlibsdir" in + @WRKSRC@/*) + case "$deps" in + *"-L$ltlibsdir "*) ;; + *"-L$ltlibsdir") ;; + *) deps="$deps -L$ltlibsdir" ;; + esac + ;; esac deps="${deps} $i" ;; @@ -61,10 +65,14 @@ if [ -f $lafile ]; then ;; *.la) ltlibsdir=`@DIRNAME@ $i`/.libs - case "$relink" in - *"-L$ltlibsdir "*) ;; - *"-L$ltlibsdir") ;; - *) relink="$relink -L$ltlibsdir" ;; + case "$ltlibsdir" in + @WRKSRC@/*) + case "$relink" in + *"-L$ltlibsdir "*) ;; + *"-L$ltlibsdir") ;; + *) relink="$relink -L$ltlibsdir" ;; + esac + ;; esac relink="${relink} $i" ;; @@ -113,10 +121,16 @@ if [ -f $lafile ]; then $prev) ;; -L*) - case "$L" in - *"$i "*) ;; - *"$i") ;; - *) L="$L $i" ;; + case "$i" in + -L@WRKSRC@/*) + ;; + *) + case "$L" in + *"$i "*) ;; + *"$i") ;; + *) L="$L $i" ;; + esac + ;; esac ;; -l*) |