summaryrefslogtreecommitdiff
path: root/mk/buildlink2/libtool-fix-la
diff options
context:
space:
mode:
authorjlam <jlam>2002-12-22 19:02:43 +0000
committerjlam <jlam>2002-12-22 19:02:43 +0000
commit88a1ddb43dc52c91cb2ee63bdbcc1212a68f52ff (patch)
treed810fff0b2bba973326f3623cd87f02062726744 /mk/buildlink2/libtool-fix-la
parent688d9b547b16e088e0c000a9467a2977e366f993 (diff)
downloadpkgsrc-88a1ddb43dc52c91cb2ee63bdbcc1212a68f52ff.tar.gz
The buildlink2 problems on non-NetBSD platform seem to be related to
correct manipulation of variables containing values with escaped metacharacters by the shell. The new code only does partial caching, which doesn't cache "special" arguments that contain escaped metacharacters or other oddly quoted values. On certain platforms listed in _BLNK_CACHE_ALL in bsd.buildlink2.mk, we do full caching, which has enormous speed benefits since it avoids an extra sed invocation per "special" argument. Known working platforms: MacOS X 10.1.5 (schmonz) MacOS X 10.2 (grant) NetBSD 1.6 [full caching] (jlam) OpenBSD (cjep) Solaris 8 (grant) Solaris 9 (salo)
Diffstat (limited to 'mk/buildlink2/libtool-fix-la')
-rw-r--r--mk/buildlink2/libtool-fix-la18
1 files changed, 9 insertions, 9 deletions
diff --git a/mk/buildlink2/libtool-fix-la b/mk/buildlink2/libtool-fix-la
index 0fe9d8cb69d..1ddbabf4ade 100644
--- a/mk/buildlink2/libtool-fix-la
+++ b/mk/buildlink2/libtool-fix-la
@@ -1,4 +1,4 @@
-# $NetBSD: libtool-fix-la,v 1.12 2002/10/30 00:23:00 jlam Exp $
+# $NetBSD: libtool-fix-la,v 1.13 2002/12/22 19:02:44 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 $lafile ]; then
+if @TEST@ -f $lafile; then
. ${ladir}/${labase}.la
deps=
@@ -44,7 +44,7 @@ if [ -f $lafile ]; then
fixla=1
;;
esac
- if [ $fixla -gt 0 ]; then
+ if @TEST@ $fixla -gt 0; then
case "$deps" in
*"-L$ltlibsdir "*) ;;
*"-L$ltlibsdir") ;;
@@ -89,7 +89,7 @@ if [ -f $lafile ]; then
fixla=1
;;
esac
- if [ $fixla -gt 0 ]; then
+ if @TEST@ $fixla -gt 0; then
case "$relink" in
*"-L$ltlibsdir "*) ;;
*"-L$ltlibsdir") ;;
@@ -103,10 +103,10 @@ if [ -f $lafile ]; then
;;
esac
done
- if [ -n "$deps" -o -n "$relink" ] && \
+ if @TEST@ -n "$deps" || @TEST@ -n "$relink" && \
! @EGREP@ "^#.*modified by buildlink2" $lafile >/dev/null 2>&1; then
@MV@ -f $lafile ${lafile}.blsav
- if [ -n "$deps" ]; then
+ if @TEST@ -n "$deps"; then
(
@CAT@ ${lafile}.blsav | @SED@ -e '/^dependency_libs=/,$d'
@ECHO@ "dependency_libs='$deps'"
@@ -115,7 +115,7 @@ if [ -f $lafile ]; then
else
@CAT@ ${lafile}.blsav > ${lafile}.tmp
fi
- if [ -n "$relink" ]; then
+ if @TEST@ -n "$relink"; then
(
@CAT@ ${lafile}.tmp | @SED@ -e '/^relink_command=/,$d'
@ECHO@ "relink_command='$relink'"
@@ -129,7 +129,7 @@ if [ -f $lafile ]; then
@RM@ ${lafile}.tmp
@ECHO@ "==> Fixed $lafile" >> $wrapperlog
fi
- if [ -n "$laifile" ] && [ -f "$laifile" ] && \
+ if @TEST@ -n "$laifile" && @TEST@ -f "$laifile" && \
! @EGREP@ "^#.*modified by buildlink2" $laifile >/dev/null 2>&1; then
@SED@ @_BLNK_WRAP_LT_UNTRANSFORM_SED@ \
@_BLNK_UNTRANSFORM_SED@ \
@@ -163,7 +163,7 @@ if [ -f $lafile ]; then
esac
prev="$i"
done
- if [ -z "$lexist" ]; then
+ if @TEST@ -z "$lexist"; then
L=
fi
deps="$L$l"