|
|
1.1 root 1: set -p
2: install(){
3: strip $1 &&
4: cp $1 $2
5: # (cp $1 $2 || mv $1 $2) &&
6: # /etc/chown bin,bin $2 &&
7: # chmod o-w,g+w $2
8: }
9: PATH=/bin:/usr/bin:/etc:
10: export PATH
11: cd /usr/src/cmd
12: for i in $*
13: do echo " ======== $i"
14:
15: if Admin/lookline "$i" Admin/large
16: then CFLAGS=-O
17: else CFLAGS='-Od2'
18: fi
19:
20: case $i in
21:
22: clean) rm -f *.o core y.tab.c lex.yy.c # Clean unwanted files.
23: ;;
24:
25: *.y) B=`basename $i .y`
26: eval D=`Admin/dest $B`
27: yacc $B.y &&
28: cc $CFLAGS -o $B y.tab.c -ly &&
29: install $B $D/$B &&
30: rm -f y.tab.[co] $B
31: ;;
32:
33: *.l) B=`basename $i .l`
34: eval D=`Admin/dest $B`
35: lex $B.l &&
36: cc $CFLAGS -o $B lex.yy.c -ll &&
37: install $B $D/$B &&
38: rm -f lex.yy.[co] $B
39: ;;
40:
41: *.c) B=`basename $i .c`
42: eval D=`Admin/dest $B`
43: cc $CFLAGS -o $B $B.c &&
44: install $B $D/$B &&
45: rm -f $B.o $B
46: ;;
47:
48: *.s) B=`basename $i .s`
49: eval D=`Admin/dest $B`
50: as -o $B.o $B.s &&
51: cc -o $B $B.o &&
52: install $B $D/$B &&
53: rm -f $B.o $B
54: ;;
55:
56: *.sh) B=`basename $i .sh`
57: eval D=`Admin/dest $B`
58: cp $B.sh $DESTDIR$D/$B
59: # chmod +x $DESTDIR$D/$B
60: # /etc/chown bin,bin $DESTDIR$D/$B
61: # chmod o-w,g+w $DESTDIR$D/$B
62: ;;
63:
64: Admin) echo Do nothing.
65: ;;
66:
67: *) if [ ! -d $i ]
68: then echo "Don't know what to do with $i."
69: else
70: cd $i
71: /bin/make clean &&
72: /bin/make &&
73: /bin/make install &&
74: /bin/make clean
75: cd ..
76: fi
77:
78: esac
79: done
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.