|
|
1.1 ! root 1: trap "" 1 ! 2: DESTDIR=${DESTDIR-/4bsd} ! 3: CC=cc ! 4: ! 5: : make sure directory hierarchy exists ! 6: ( cd $DESTDIR ! 7: for i in bin etc lib sys usr ! 8: do if [ ! -d $i ] ! 9: then rm -f $i; mkdir $i ! 10: fi ! 11: done ! 12: cd $DESTDIR/usr ! 13: for i in bin dict games lib net spool ucb vpd ! 14: do if [ ! -d $i ] ! 15: then rm -f $i; mkdir $i ! 16: fi ! 17: done ! 18: cd $DESTDIR/usr/lib ! 19: for i in learn lex lisp lint refer struct term tmac uucp ! 20: do if [ ! -d $i ] ! 21: then rm -f $i; mkdir $i ! 22: fi ! 23: done ! 24: cd $DESTDIR/usr/net ! 25: for i in bin network ! 26: do if [ ! -d $i ] ! 27: then rm -f $i; mkdir $i ! 28: fi ! 29: done ! 30: cd $DESTDIR/usr/spool ! 31: for i in lpd mail secretmail uucp uucppublic vpd ! 32: do if [ ! -d $i ] ! 33: then rm -f $i; mkdir $i ! 34: fi ! 35: done ! 36: ) ! 37: ! 38: for i in $* ! 39: do echo " ======== $i" ! 40: ! 41: CFLAGS='-O -d2' ! 42: case $i in ! 43: 512restor.c|analyze.c|colcrt.c|dump.c|dumpdir.c|egrep.y|fgrep.c|\ ! 44: ld.c|ndump.c|ncheck.c|ps.c|quot.c|ranlib.c|restor.c|sa.c|sort.c|\ ! 45: tar.c|w.c|wc.c)\ ! 46: CFLAGS='-O';; ! 47: esac ! 48: ! 49: case $i in ! 50: ! 51: clean) rm -f *.o core y.tab.c lex.yy.c ;: Clean unwanted files. ! 52: ;; ! 53: ! 54: *.y) B=`basename $i .y` ! 55: eval D=`grep " $B\$" DESTINATIONS` ! 56: yacc $B.y \ ! 57: && $CC $CFLAGS -o $B y.tab.c -lln \ ! 58: && install -s $B $DESTDIR$D/$B ! 59: rm -f y.tab.[co] $B ! 60: ;; ! 61: ! 62: *.l) B=`basename $i .l` ! 63: eval D=`grep " $B\$" DESTINATIONS` ! 64: lex $B.l \ ! 65: && $CC $CFLAGS -o $B lex.yy.c -lln \ ! 66: && install -s $B $DESTDIR$D/$B ! 67: rm -f lex.yy.[co] $B ! 68: ;; ! 69: ! 70: clear.c|more.c|ul.c) ! 71: B=`basename $i .c` ! 72: eval D=`grep " $B\$" DESTINATIONS` ! 73: $CC $CFLAGS -o $B $B.c -ltermlib \ ! 74: && install -s $B $DESTDIR$D/$B ! 75: rm -f $B.o $B ! 76: ;; ! 77: ! 78: comsat.c) ! 79: B=`basename $i .c` ! 80: eval D=`grep " $B\$" DESTINATIONS` ! 81: $CC $CFLAGS -o $B $B.c -ljobs \ ! 82: && install -s $B $DESTDIR$D/$B ! 83: rm -f $B.o $B ! 84: ;; ! 85: ! 86: *.c) B=`basename $i .c` ! 87: eval D=`grep " $B\$" DESTINATIONS` ! 88: $CC $CFLAGS -o $B $B.c -lm \ ! 89: && install -s $B $DESTDIR$D/$B ! 90: rm -f $B.o $B ! 91: ;; ! 92: ! 93: mklost+found.s|*.sh) B=`basename $i .sh` ! 94: eval D=`grep " $B\$" DESTINATIONS` ! 95: install -c $B.sh $DESTDIR$D/$B ! 96: ;; ! 97: ! 98: *.s) B=`basename $i .s` ! 99: eval D=`grep " $B\$" DESTINATIONS` ! 100: as -o $B.o $B.s \ ! 101: && $CC -o $B $B.o \ ! 102: && install -s $B $DESTDIR$D/$B ! 103: rm -f $B.o $B ! 104: ;; ! 105: ! 106: MAKE|DESTINATIONS|SCCS) ! 107: echo Do nothing. ! 108: ;; ! 109: ! 110: MODES) ! 111: BINF=" df login mail mkdir mv passwd rmdir su" ! 112: UBINF=" at newgrp" ! 113: UCBF=" chfn chsh netrm netq net" ! 114: LIBF=" atrun ex3.5preserve ex3.5recover rvcat" ! 115: UULIBF="uucp/uuxqt uucp/uucico uucp/uuclean uucp/uusub" ! 116: UUBINF="uucp uux uulog uuname" ! 117: TMPF=" /tmp /usr/tmp /usr/lib/uucp/.XQTDIR /usr/msgs" ! 118: TSPOOL="lpd mail secretmail uucp uucppublic" ! 119: ATDIR="at at/past" ! 120: BNETBF="net v6mail" ! 121: cd $DESTDIR/bin; chown root $BINF; chmod 4755 $BINF ! 122: cd $DESTDIR/usr/bin; chown root $UBINF; chmod 4755 $UBINF ! 123: cd $DESTDIR/usr/ucb; chown root $UCBF; chmod 4755 $UCBF ! 124: cd $DESTDIR/usr/lib; chown root $LIBF; chmod 4755 $LIBF ! 125: cd $DESTDIR/usr/lib; chown uucp $UULIBF; chmod 4755 $UULIBF ! 126: cd $DESTDIR/usr/bin; chown uucp $UUBINF; chmod 4755 $UUBINF ! 127: cd $DESTDIR/usr/net/bin; chown root $BNETBF; chmod 4755 $BNETBF ! 128: chmod 777 $DESTDIR/$TMPF ! 129: cd $DESTDIR/usr/spool; chmod 777 $TSPOOL; chmod 755 $ATDIR;\ ! 130: chown root $ATDIR ! 131: ! 132: ;; ! 133: ! 134: ALIASES) echo Establish alias names. ! 135: rm -f $DESTDIR/bin/[ ! 136: ln $DESTDIR/bin/test $DESTDIR/bin/[ ! 137: rm -f $DESTDIR/usr/ucb/l $DESTDIR/usr/ucb/f $DESTDIR/usr/ucb/u ! 138: rm -f $DESTDIR/usr/ucb/page ! 139: ln $DESTDIR/usr/ucb/ls $DESTDIR/usr/ucb/l ! 140: ln $DESTDIR/usr/ucb/finger $DESTDIR/usr/ucb/f ! 141: ln $DESTDIR/usr/ucb/users $DESTDIR/usr/ucb/u ! 142: ln $DESTDIR/usr/ucb/more $DESTDIR/usr/ucb/page ! 143: cp $DESTDIR/usr/ucb/ls $DESTDIR/bin/ucbls ! 144: rm $DESTDIR/usr/bin/uuclean ! 145: ln $DESTDIR/usr/lib/uucp/uuclean $DESTDIR/usr/bin/uuclean ! 146: rm -f $DESTDIR/usr/ucb/uptime ! 147: ln $DESTDIR/usr/ucb/w $DESTDIR/usr/ucb/uptime ! 148: (cd $DESTDIR/usr/ucb ; rm vi view edit e ../bin/ex) ! 149: (cd $DESTDIR/usr/ucb ; ln ex vi ; ln ex view ; ln ex edit ) ! 150: (cd $DESTDIR/usr/ucb ; ln ex e ; ln ex ../bin/ex) ! 151: (cd $DESTDIR/usr/ucb ; rm -f mail ; ln Mail mail) ! 152: (cd $DESTDIR/usr/ucb ; rm -f net ; ln $DESTDIR/usr/net/bin/net) ! 153: (cd $DESTDIR/usr/ucb ; rm -f netcp ; ln $DESTDIR/usr/net/bin/netcp) ! 154: ;; ! 155: ! 156: *) if [ ! -d $i ] ! 157: then echo "Don't know what to do with $i." ! 158: else ! 159: date ! 160: cd $i ! 161: make CC=$CC DESTDIR=$DESTDIR \ ! 162: && make install DESTDIR=$DESTDIR \ ! 163: && make clean ! 164: date ! 165: cd .. ! 166: fi ! 167: ! 168: esac ! 169: done
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.