diff options
author | rillig <rillig@pkgsrc.org> | 2006-11-26 09:55:52 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2006-11-26 09:55:52 +0000 |
commit | 414d0506c061e925487d979b076c094b69f2591f (patch) | |
tree | 7d3cff3c61e44f5ed6c15bd95c9ac3d37a2d431e /mk/wrapper | |
parent | 627712c574033f020e015d8eade8abd75f97b142 (diff) | |
download | pkgsrc-414d0506c061e925487d979b076c094b69f2591f.tar.gz |
Renamed transform_pass_unknown to transform_pass_with_warning and added
transform_discard_with_warning.
Diffstat (limited to 'mk/wrapper')
-rw-r--r-- | mk/wrapper/transform-sunpro-cc | 4 | ||||
-rw-r--r-- | mk/wrapper/wrapper-subr.sh | 17 |
2 files changed, 15 insertions, 6 deletions
diff --git a/mk/wrapper/transform-sunpro-cc b/mk/wrapper/transform-sunpro-cc index 8e3cc5169a1..ff8f4609ec9 100644 --- a/mk/wrapper/transform-sunpro-cc +++ b/mk/wrapper/transform-sunpro-cc @@ -1,4 +1,4 @@ -# $NetBSD: transform-sunpro-cc,v 1.15 2006/11/11 07:50:28 rillig Exp $ +# $NetBSD: transform-sunpro-cc,v 1.16 2006/11/26 09:55:52 rillig Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -151,6 +151,6 @@ case $arg in transform_pass ;; -*) - transform_pass_unknown + transform_pass_with_warning ;; esac diff --git a/mk/wrapper/wrapper-subr.sh b/mk/wrapper/wrapper-subr.sh index 4bcfbe0379a..adf1c21439a 100644 --- a/mk/wrapper/wrapper-subr.sh +++ b/mk/wrapper/wrapper-subr.sh @@ -1,4 +1,4 @@ -# $NetBSD: wrapper-subr.sh,v 1.3 2006/11/26 09:13:44 rillig Exp $ +# $NetBSD: wrapper-subr.sh,v 1.4 2006/11/26 09:55:52 rillig Exp $ # # This file contains shell functions that are useful to the wrapper # scripts. @@ -28,13 +28,22 @@ transform_discard() { transform_to "" } +# usage: transform_discard_with_warning [warning] +transform_discard_with_warning() { + _warning=${1-"discarding option $arg"} + msg_log "$wrapperlog" "WARNING: [$wrapsubr_name] $_warning" + transform_to "" + addtocache=no +} + # usage: transform_pass transform_pass() { addtocache=yes } -# usage: transform_pass_unknown -transform_pass_unknown() { - msg_log "$wrapperlog" "[$wrapsubr_name] warning: unknown option $arg" +# usage: transform_pass_with_warning [warning] +transform_pass_with_warning() { + _warning=${1-"passing option $arg"} + msg_log "$wrapperlog" "WARNING: [$wrapsubr_name] $_warning" addtocache=no } |