Annotation of 43BSD/contrib/icon/Icon-setup, revision 1.1.1.1

1.1       root        1: modfiles="tran/Makefile iconx/Makefile bin/Makefile h/config.h \
                      2:        samples/Test test/Test port/Runtest port/Trantest port/Linktest \
                      3:        libtest/Proctest src/cmd/Makefile \
                      4:        src/lib/Makefile samples/Test test/Test \
                      5:        icon-pi Pimakefile"
                      6: editor="ed - "
                      7: iroot=`pwd`
                      8: echo Icon root directory is $iroot .
                      9: echo Getting generic copies of all files ...
                     10: for i in $modfiles
                     11: do
                     12:        cp $i.gen $i
                     13: done
                     14: rm -f functions/ranlib operators/ranlib lib/ranlib rt/ranlib pilib/ranlib
                     15: wholist=
                     16: ldlist=
                     17: hoststr=
                     18: somehost=
                     19: hzrate=60
                     20: nofp=
                     21: sys=
                     22: fork=fork
                     23: interpex=
                     24: ibin="$iroot/bin"
                     25: echo "#define OPTIONS \"$*\"" >>h/config.h
                     26: echo Scanning arguments ...
                     27: while test $1
                     28: do
                     29:        case $1 in
                     30:                -pdp11)
                     31:                        if test -n "$sys"
                     32:                        then
                     33:                                echo "Only one of -vax, -pdp11, or -port is allowed."
                     34:                                echo "Try again."
                     35:                        exit
                     36:                        fi
                     37:                        sys=pdp11
                     38:                        wholist="$wholist PDP11"
                     39:                        ldlist="$ldlist -i";;
                     40:                -vax)
                     41:                        if test -n "$sys"
                     42:                        then
                     43:                                echo "Only one of -vax, -pdp11, or -port is allowed."
                     44:                                echo "Try again."
                     45:                        exit
                     46:                        fi
                     47:                        sys=vax
                     48:                        wholist="$wholist VAX";;
                     49:                -port)
                     50:                        if test -n "$sys"
                     51:                        then
                     52:                                echo "Only one of -vax, -pdp11, or -port is allowed."
                     53:                                echo "Try again."
                     54:                        exit
                     55:                        fi
                     56:                        sys=port
                     57:                        wholist="$wholist PORT";;
                     58:                -xpx)
                     59:                        xpx=yes
                     60:                        wholist="$wholist XPX";;
                     61:                -nofp)
                     62:                        wholist="$wholist NOFP"
                     63:                        nofp=yes;;
                     64:                -interpex)
                     65:                        interpex=yes
                     66:                        wholist="$wholist DIREX";;
                     67:                -host)
                     68:                        somehost=x
                     69:                        shift
                     70:                        case $1 in
                     71:                                gethost*)
                     72:                                        wholist="$wholist GETHOST";;
                     73:                                uname)
                     74:                                        wholist="$wholist UNAME";;
                     75:                                whoami)
                     76:                                        wholist="$wholist WHOHOST";;
                     77:                                *)
                     78:                                        hoststr=$1;;
                     79:                        esac;;
                     80:                -hz)
                     81:                        shift
                     82:                        hzrate=$1;;
                     83:                -vfork)
                     84:                        fork=vfork;;
                     85:                -usg)
                     86:                        UsG=yes;;
                     87:                -az)
                     88:                        ArizonA=yes;;
                     89:                -ibin)
                     90:                        shift
                     91:                        ibin=$1;;
                     92:                -iconx)
                     93:                        shift
                     94:                        IconX=$1;;
                     95:                -sets)
                     96:                        wholist="$wholist SETS";;
                     97:                -debug)
                     98:                        wholist="$wholist DEBUG";;
                     99:                        
                    100:                *)
                    101:                        echo Bad option \"$1\"
                    102:                        exit;;
                    103:        esac
                    104:        shift
                    105: done
                    106: if test -z "$sys"
                    107: then
                    108:        echo You must specify -vax, -pdp11, or -port.  Try again.
                    109:        exit
                    110: fi
                    111: if test -z "$somehost"
                    112: then
                    113:        echo You must specify a value for -host.  Try again.
                    114:        exit
                    115: fi
                    116: IconX=${IconX-"$ibin/iconx"}
                    117: if test -n "$interpex"
                    118: then
                    119:        echo -n $IconX >/tmp/$$
                    120:        set xx `/bin/ls -l /tmp/$$`
                    121:        rm -f /tmp/$$
                    122:        if test $5 -gt 29
                    123:        then
                    124:                echo "The pathname for iconx, \"$IconX\", is too long."
                    125:                echo " It must not exceed 29 characters (it is currently $5)"
                    126:                echo " or execution of the interpretable files will mysteriously"
                    127:                echo " fail.  See Section 3.1 in the installation document and"
                    128:                echo " the -iconx option of icon-setup, and try again."
                    129:                exit
                    130:        fi
                    131: fi
                    132: if test -r /usr/include/sys/time.h
                    133: then
                    134:        echo '#define SYSTIME' >>h/config.h
                    135: fi
                    136: echo Editing files ...
                    137: for i in h/config.h
                    138: do
                    139:        for def in $wholist
                    140:        do
                    141:                echo "#define $def" >>$i
                    142:        done
                    143:        echo "#define IntBin \"$ibin\"" >>$i
                    144:        echo "#define Iconx \"$IconX\"" >> $i
                    145:        echo "#define IconxHdr \"$ibin/iconx.hdr\"" >>$i
                    146:        echo "#define FORK $fork" >>$i
                    147:        if test -n "$UsG"
                    148:        then
                    149:                echo "#define index strchr" >>$i
                    150:                echo "#define rindex strrchr" >>$i
                    151:        fi
                    152:        if test -n "$ArizonA"
                    153:        then
                    154:                echo "#define AZ" >> $i
                    155:        fi
                    156: done
                    157: for i in h/config.h
                    158: do
                    159:        echo "#define HZ $hzrate" >>$i
                    160:        if test -n "$hoststr"
                    161:        then
                    162:                echo "#define HOSTSTR \"$hoststr\"" >>$i
                    163:        fi
                    164: done
                    165: for i in iconx/Makefile tran/Makefile Pimakefile
                    166: do
                    167:        $editor $i <<EOF >/dev/null
                    168:        /LDFLAGS/s/LDFLAGS=/LDFLAGS=$ldlist/
                    169:        w
                    170:        q
                    171: EOF
                    172: done
                    173: $editor Pimakefile <<EOF >/dev/null
                    174: /QFORK/
                    175: .s:QFORK:$fork:p
                    176: w
                    177: q
                    178: EOF
                    179: if test -n "$nofp"
                    180: then
                    181:        $editor iconx/Makefile <<EOF >/dev/null
                    182:        /-lc$/s/$/ -lfpsim/
                    183:        w
                    184:        q
                    185: EOF
                    186: fi
                    187: if test $sys = "pdp11"
                    188: then
                    189:        $editor bin/Makefile <<EOF >/dev/null
                    190:        /cc -O -N/s/-N//
                    191:        w
                    192:        q
                    193: EOF
                    194: fi
                    195: for i in port/Runtest port/Trantest port/Linktest libtest/Proctest \
                    196:        src/cmd/Makefile src/lib/Makefile \
                    197:        samples/Test test/Test
                    198: do
                    199:        $editor $iroot/$i <<EOF >/dev/null
                    200:        /PATH/
                    201:        .s:PATH:$ibin:p
                    202:        w
                    203:        q
                    204: EOF
                    205: done
                    206: if test -n "$UsG"
                    207: then
                    208:        echo Making dummy ranlib programs for System III/V compatibility ...
                    209:        for i in functions operators lib rt pilib
                    210:        do
                    211:                echo ...$i/ranlib
                    212:                cat >$i/ranlib <<EOF
                    213: EOF
                    214:                chmod 755 $i/ranlib
                    215:        done
                    216: fi
                    217: for i in icon-pi Pimakefile
                    218: do
                    219:        $editor $iroot/$i <<EOF >/dev/null
                    220:        /PATH/
                    221:        .s:PATH:$iroot:p
                    222:        w
                    223:        q
                    224: EOF
                    225: done
                    226: echo Setup is complete.

unix.superglobalmegacorp.com

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