Annotation of 43BSDReno/contrib/isode-beta/util/make-lib.sh, revision 1.1.1.1

1.1       root        1: : run this script through /bin/sh
                      2: 
                      3: M=BSD42 L= O= S= Q= SHD= MAJ= MIN=
                      4: 
                      5: while [ $# -gt 0 ]
                      6: do
                      7:     A="$1"
                      8:     case $A in
                      9:        -bsd42|-mips)
                     10:                M=BSD42
                     11:                ;;
                     12:        -shared)SHD=T
                     13:                ;;
                     14: 
                     15:        -sys5)  M=SYS5
                     16:                ;;
                     17: 
                     18:        -aix)   M=AIX
                     19:                ;;
                     20: 
                     21:        -ros)   M=ROS
                     22:                ;;
                     23: 
                     24:        -ranlib)
                     25:                case $M in
                     26:                    BSD42|ROS)
                     27:                            echo ranlib "$L"
                     28:                            case "$L" in
                     29:                                /*)     (cd /usr/tmp; ranlib "$L")
                     30:                                        ;;
                     31: 
                     32:                                *)      ranlib "$L"
                     33:                                        ;;
                     34:                            esac
                     35:                            ;;
                     36: 
                     37:                    SYS5|AIX|old)
                     38:                            ;;
                     39: 
                     40:                    *)      echo "make-lib: mode botch" 1>&2
                     41:                            exit 1
                     42:                            ;;
                     43:                esac
                     44:                exit 0
                     45:                ;;
                     46: 
                     47:        -quick) Q=T
                     48:                ;;
                     49: 
                     50:        -major) MAJ="$2"
                     51:                shift
                     52:                ;;
                     53:        -minor) MIN="$2"
                     54:                shift
                     55:                ;;
                     56:        -*)     S="$S`echo $A | sed -e s%-%%`"
                     57:                ;;
                     58: 
                     59:        *)      if [ "x$L" = x ]; then
                     60:                    L="$A"
                     61:                else
                     62:                    O="$O $A"
                     63:                fi
                     64:                ;;
                     65:     esac
                     66:     shift
                     67: done
                     68: 
                     69: case $M in
                     70:     BSD42|ROS)
                     71:            if [ "x$SHD" = xT ]; then
                     72:                if [ "$M" = ROS ]; then
                     73:                    echo "Can't build shared libraries for ROS" 1>&2
                     74:                    exit 1
                     75:                fi
                     76:                if [ "x$MAJ" = x -o "x$MIN" = x ]; then
                     77:                        echo "Missing major or minor number for library" 1>&2
                     78:                        exit 1
                     79:                fi
                     80:                rm -rf tmp-shared
                     81:                mkdir tmp-shared
                     82:                case "$L" in
                     83:                        /*) LP="$L";;
                     84:                        *) LP="../$L";;
                     85:                esac
                     86:                (cd tmp-shared; ar x "$LP"
                     87:                LSO="`echo $LP | sed 's%.a$%%'`".so.$MAJ.$MIN
                     88:                echo ld -o "$LSO" -assert pure-text *.o
                     89:                ld -o "$LSO" -assert pure-text *.o
                     90:                )
                     91:                rm -rf tmp-shared
                     92:            else
                     93:                echo ar q"$S" "$L" $O
                     94:                ar q"$S" "$L" $O
                     95:                if [ "x$Q" != xT ]; then
                     96:                    echo ranlib "$L"
                     97:                    ranlib "$L"
                     98:                fi
                     99:            fi
                    100:            ;;
                    101: 
                    102:     SYS5)   if [ "x$SHD" = xT ]; then
                    103:                echo "Can't build shared libraries for Sys 5 (yet)" 1>&2
                    104:                exit 1
                    105:            fi
                    106:            echo ar ql"$S" "$L" $O
                    107:            ar ql"$S" "$L" $O
                    108:            ;;
                    109: 
                    110:     AIX)    if [ "x$SHD" = xT ]; then
                    111:                echo "Can't build shared libraries for AIX (yet)" 1>&2
                    112:                exit 1
                    113:            fi
                    114:            echo ar rlv"$S" "$L" \`lorder $O \| tsort\`
                    115:            ar rlv"$S" "$L" `lorder $O | tsort`
                    116:            ;;
                    117: 
                    118:     old)    if [ "x$SHD" = xT ]; then
                    119:                echo "Can't build shared libraries for old style" 1>&2
                    120:                exit 1
                    121:            fi
                    122:            echo ar r"$S" "$L" \`lorder $O \| tsort\`
                    123:            ar r"$S" "$L" `lorder $O | tsort`
                    124:            ;;
                    125: 
                    126:     *)     echo "make-lib: mode botch" 1>&2
                    127:            exit 1
                    128:            ;;
                    129: esac
                    130: 
                    131: exit 0

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.