summaryrefslogtreecommitdiff
path: root/mk/wrapper
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-11-08 22:24:22 +0000
committerjlam <jlam@pkgsrc.org>2004-11-08 22:24:22 +0000
commit5deded3d4187bfac32af81401763b5a3dc80a77e (patch)
treee0e6ef726c81d358178ccb62d580b5e16f8a4e61 /mk/wrapper
parenta31ca1310320dafad6169514b91e17e218989ab6 (diff)
downloadpkgsrc-5deded3d4187bfac32af81401763b5a3dc80a77e.tar.gz
Remove unnecessary argument checks.
Diffstat (limited to 'mk/wrapper')
-rw-r--r--mk/wrapper/gen-transform.sh57
1 files changed, 1 insertions, 56 deletions
diff --git a/mk/wrapper/gen-transform.sh b/mk/wrapper/gen-transform.sh
index 8530e5cdbc8..1c6afd81965 100644
--- a/mk/wrapper/gen-transform.sh
+++ b/mk/wrapper/gen-transform.sh
@@ -1,6 +1,6 @@
#! @WRAPPER_SHELL@
#
-# $NetBSD: gen-transform.sh,v 1.3 2004/09/26 05:50:39 jlam Exp $
+# $NetBSD: gen-transform.sh,v 1.4 2004/11/08 22:24:22 jlam Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -74,13 +74,9 @@ gen()
# -L options.
###############################################################
depot)
- case $_action in
- transform|untransform)
gen $_action "opt-depot:$1:$2"
gen $_action "opt-depot:-I$1:-I$2"
gen $_action "opt-depot:-L$1:-L$2"
- ;;
- esac
;;
###############################################################
# I:src:dst
@@ -125,8 +121,6 @@ gen()
# Change "-lfoo" into "-lbar [-lbaz...]"
###############################################################
l)
- case $_action in
- transform|untransform)
$debug_log $wrapperlog " (gen-transform) $_cmd: $@"
tolibs=
fromlib="-l$1"; shift
@@ -142,8 +136,6 @@ gen()
shift
done
gen $_action "opt:$fromlib:$tolibs"
- ;;
- esac
;;
##############################################################
# libpath:src:dst
@@ -170,48 +162,36 @@ EOF
# libraries.
##############################################################
mangle)
- case $_action in
- transform|untransform)
$debug_log $wrapperlog " (gen-transform) $_cmd: $@"
#gen $_action "opt:$1:$2"
gen $_action "opt:-I$1:-I$2"
gen $_action "opt:-L$1:-L$2"
gen $_action "rpath-exact:$1:$2"
gen $_action "sub-mangle:$1:$2"
- ;;
- esac
;;
##############################################################
# no-abspath
# Remove all "dash" options that contain an absolute path.
##############################################################
no-abspath)
- case $_action in
- transform|untransform)
$debug_log $wrapperlog " (gen-transform) $_cmd"
gen $_action "rm-optarg:-I/"
gen $_action "rm-optarg:-L/"
for _R in $rpath_options; do
gen $_action "rm-optarg:$_R/"
done
- ;;
- esac
;;
##############################################################
# no-rpath
# Removes rpath options.
##############################################################
no-rpath)
- case "$_action" in
- transform|untransform)
$debug_log $wrapperlog " (gen-transform) $_cmd"
gen $_action rm-optarg:-Wl,--rpath,
gen $_action rm-optarg:-Wl,-rpath-link,
gen $_action rm-optarg:-Wl,-rpath,
gen $_action rm-optarg:-Wl,-R
gen $_action rm-optarg:-R
- ;;
- esac
;;
##############################################################
# opt:src:dst
@@ -255,12 +235,8 @@ EOF
# Change "src/*" into "dst/*".
##############################################################
opt-sub)
- case $_action in
- transform|untransform)
$debug_log $wrapperlog " (gen-transform) $_cmd: $@"
gen $_action "opt-sub-trailer:$1::$2:"
- ;;
- esac
;;
##############################################################
# opt-sub-trailer:src:src_trailer:dst:dst_trailer
@@ -303,23 +279,16 @@ EOF
# Synonym for "opt:src:dst".
##############################################################
rename)
- case $_action in
- transform|untransform)
$debug_log $wrapperlog " (gen-transform) $_cmd: $@"
gen $_action "opt:$1:$2"
- ;;
- esac
;;
##############################################################
# rm:opt
# Remove "opt", where "opt" matches the entire option.
##############################################################
rm)
- case $_action in
- transform|untransform)
$debug_log $wrapperlog " (gen-transform) $_cmd: $@"
gen $_action "opt:$1:"
- esac
;;
##############################################################
# rm-optarg:opt
@@ -345,8 +314,6 @@ EOF
# Remove all "dash" options that contain "dir" or "dir/*".
##############################################################
rmdir)
- case $_action in
- transform|untransform)
$debug_log $wrapperlog " (gen-transform) $_cmd: $@"
gen $_action "opt:-I$1:"
gen $_action "rm-optarg:-I$1/"
@@ -356,8 +323,6 @@ EOF
gen $_action "opt:$_R$1:"
gen $_action "rm-optarg:$_R$1/"
done
- ;;
- esac
;;
##############################################################
# rpath:src:dst
@@ -365,27 +330,19 @@ EOF
# options.
##############################################################
rpath)
- case $_action in
- transform|untransform)
$debug_log $wrapperlog " (gen-transform) $_cmd: $@"
gen $_action "rpath-exact:$1:$2"
gen $_action "sub-rpath:$1:$2"
- ;;
- esac
;;
##############################################################
# rpath-exact:src:dst
# Change "src" into "dst" in rpath options.
##############################################################
rpath-exact)
- case $_action in
- transform|untransform)
$debug_log $wrapperlog " (gen-transform) $_cmd: $@"
for _R in $rpath_options; do
gen $_action "opt:$_R$1:$_R$2"
done
- ;;
- esac
;;
##############################################################
# strip-slashdot:dir
@@ -393,8 +350,6 @@ EOF
# rpath options.
##############################################################
strip-slashdot)
- case $_action in
- transform|untransform)
$debug_log $wrapperlog " (gen-transform) $_cmd: $@"
gen $_action "opt-sub-trailer:$1:/\.:$1:"
gen $_action "opt-sub-trailer:-I$1:/\.:-I$1:"
@@ -402,8 +357,6 @@ EOF
for _R in $rpath_options; do
gen $_action "opt-sub-trailer:$_R$1:/\.:$_R$1:"
done
- ;;
- esac
;;
##############################################################
# sub-mangle:src:dst
@@ -411,30 +364,22 @@ EOF
# options, and also in full paths to libraries.
##############################################################
sub-mangle)
- case $_action in
- transform|untransform)
$debug_log $wrapperlog " (gen-transform) $_cmd: $@"
#gen $_action "opt-sub:$1:$2"
gen $_action "libpath:$1:$2"
gen $_action "opt-sub:-I$1:-I$2"
gen $_action "opt-sub:-L$1:-L$2"
gen $_action "sub-rpath:$1:$2"
- ;;
- esac
;;
##############################################################
# sub-rpath:src:dst
# Change "src/*" into "dst/*" in rpath options.
##############################################################
sub-rpath)
- case $_action in
- transform|untransform)
$debug_log $wrapperlog " (gen-transform) $_cmd: $@"
for _R in $rpath_options; do
gen $_action "opt-sub:$_R$1:$_R$2"
done
- ;;
- esac
;;
##############################################################
# Everything else is ignored.