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.
This commit is contained in:
parent
633b829d39
commit
bfecc5b0c7
3 changed files with 19 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue