pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/wrapper Remove unnecessary argument checks.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8aa017bf9253
branches:  trunk
changeset: 483183:8aa017bf9253
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Mon Nov 08 22:24:22 2004 +0000

description:
Remove unnecessary argument checks.

diffstat:

 mk/wrapper/gen-transform.sh |  57 +--------------------------------------------
 1 files changed, 1 insertions(+), 56 deletions(-)

diffs (224 lines):

diff -r 8db6b178f08f -r 8aa017bf9253 mk/wrapper/gen-transform.sh
--- a/mk/wrapper/gen-transform.sh       Mon Nov 08 22:11:15 2004 +0000
+++ b/mk/wrapper/gen-transform.sh       Mon Nov 08 22:24:22 2004 +0000
@@ -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 @@
        #       -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 @@
        #       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 @@
                                shift
                        done
                        gen $_action "opt:$fromlib:$tolibs"
-                       ;;
-               esac
                ;;
        ##############################################################
        # libpath:src:dst
@@ -170,48 +162,36 @@
        #       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 @@
        #       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 @@
        #       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 @@
        #       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 @@
                                gen $_action "opt:$_R$1:"
                                gen $_action "rm-optarg:$_R$1/"
                        done
-                       ;;
-               esac
                ;;
        ##############################################################
        # rpath:src:dst
@@ -365,27 +330,19 @@
        #       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 @@
        #       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 @@
                        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 @@
        #       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.



Home | Main Index | Thread Index | Old Index