diff options
author | jlam <jlam> | 2004-09-22 17:56:31 +0000 |
---|---|---|
committer | jlam <jlam> | 2004-09-22 17:56:31 +0000 |
commit | e7dad31103d76ebda8ae153ebd994e5dfd6c4cd5 (patch) | |
tree | 8bccb3e8838c59c040d58ce7bfff77067d4a56e3 /mk | |
parent | 1454c072e14dec738705ae5b0f12630780881173 (diff) | |
download | pkgsrc-e7dad31103d76ebda8ae153ebd994e5dfd6c4cd5.tar.gz |
Add a toggle that determines whether we pass extra arguments or not. This
is intended to be toggled by a $scan file. Simplify buildlink3 by removing
_BLNK_LIBTOOL_LDFLAGS and just setting _WRAP_EXTRA_ARGS.* like all of the
other wrappers.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/buildlink3/bsd.buildlink3.mk | 6 | ||||
-rw-r--r-- | mk/buildlink3/scan-libtool | 7 | ||||
-rw-r--r-- | mk/wrapper/wrapper.sh | 13 |
3 files changed, 19 insertions, 7 deletions
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk index 5960f16d7f9..c46a80c04fa 100644 --- a/mk/buildlink3/bsd.buildlink3.mk +++ b/mk/buildlink3/bsd.buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink3.mk,v 1.154 2004/09/21 15:01:40 jlam Exp $ +# $NetBSD: bsd.buildlink3.mk,v 1.155 2004/09/22 17:56:31 jlam Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -1056,7 +1056,8 @@ _WRAP_EXTRA_ARGS.CXX+= ${_BLNK_CPPFLAGS} ${_BLNK_LDFLAGS} _WRAP_EXTRA_ARGS.CPP+= ${_BLNK_CPPFLAGS} _WRAP_EXTRA_ARGS.FC+= ${_BLNK_CPPFLAGS} ${_BLNK_LDFLAGS} _WRAP_EXTRA_ARGS.LD+= ${_BLNK_LDFLAGS} -_BLNK_LIBTOOL_LDFLAGS= ${_BLNK_LDFLAGS} +_WRAP_EXTRA_ARGS.LIBTOOL+= ${_BLNK_LDFLAGS} +_WRAP_EXTRA_ARGS.SHLIBTOOL+= ${_BLNK_LDFLAGS} ${WRAPPER_TMPDIR}/libtool-fix-la: ${BUILDLINK_SRCDIR}/libtool-fix-la ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} @@ -1095,7 +1096,6 @@ ${WRAPPER_TMPDIR}/cmd-sink-libtool: ${BUILDLINK_SRCDIR}/cmd-sink-libtool ${WRAPPER_TMPDIR}/scan-libtool: ${BUILDLINK_SRCDIR}/scan-libtool ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H} ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC} \ - | ${SED} -e "s|@_BLNK_LIBTOOL_LDFLAGS@|${_BLNK_LIBTOOL_LDFLAGS:Q}|g" \ | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET} ${WRAPPER_TMPDIR}/transform-libtool: ${BUILDLINK_SRCDIR}/transform-libtool diff --git a/mk/buildlink3/scan-libtool b/mk/buildlink3/scan-libtool index ae6bd258940..7525de498c9 100644 --- a/mk/buildlink3/scan-libtool +++ b/mk/buildlink3/scan-libtool @@ -1,4 +1,4 @@ -# $NetBSD: scan-libtool,v 1.1 2004/09/21 15:01:41 jlam Exp $ +# $NetBSD: scan-libtool,v 1.2 2004/09/22 17:56:31 jlam Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -112,7 +112,7 @@ unwrap) # archives. ###################################################################### link) - set -- "$@" @_BLNK_LIBTOOL_LDFLAGS@ + append_extra_args=yes ;; ###################################################################### # We're doing libtool execution or installation, so just invoke the @@ -122,4 +122,7 @@ execute|install) msg_log $wrapperlog "<.> $cmd $@" exec $cmd "$@" ;; +*) + append_extra_args=no + ;; esac diff --git a/mk/wrapper/wrapper.sh b/mk/wrapper/wrapper.sh index d6d029d26f2..32c8a5a31ba 100644 --- a/mk/wrapper/wrapper.sh +++ b/mk/wrapper/wrapper.sh @@ -1,6 +1,6 @@ #! @WRAPPER_SHELL@ # -# $NetBSD: wrapper.sh,v 1.1 2004/09/21 15:01:41 jlam Exp $ +# $NetBSD: wrapper.sh,v 1.2 2004/09/22 17:56:31 jlam Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -52,6 +52,7 @@ transform="@_WRAP_TRANSFORM@" wrapperlog="${WRAPPER_LOG-@_WRAP_LOG@}" skip_transform="${WRAPPER_SKIP_TRANSFORM-@_WRAP_SKIP_TRANSFORM@}" debug="${WRAPPER_DEBUG-no}" +append_extra_args=yes cat="@CAT@" echo="@ECHO@" @@ -80,7 +81,15 @@ init_queue cmdbuf . $scan -set -- "$@" @_WRAP_EXTRA_ARGS@ +case $append_extra_args in +yes) + $debug_log $wrapperlog " (wrapper.sh) append args: @_WRAP_EXTRA_ARGS@" + set -- "$@" @_WRAP_EXTRA_ARGS@ + ;; +*) + ;; +esac + . $arg_source . $logic . $cmd_sink |