File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / MAKE / fcc.local
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:24:19 2019 UTC (6 years, 11 months ago) by root
Branches: bsd, MAIN
CVS tags: v12b, HEAD
Power 6/32 Unix version 1.2b

CPP=/lib/cpp
RELSRC= (source file area)
COMP=${RELSRC}/lib/ccom
OPT=${RELSRC}/lib/c2
LIST=/usr/bin/alist
ASM=/bin/as
LD=/bin/ld
LIB=/lib
CLIB=/lib/libc.a
START=$LIB/crt0.o
TMP=/tmp/cct$$
L=
P=
ecode=0
noasm=0
conly=0
names=0
ppopts=-I/usr/include

trap "rm -f $TMP.?; exit 2" 1 2 3

for i in $*
do
	case $i in
	*.c)	case $names in
		0) names=1 ;;
		1) names=2 ;;
		esac ;;
	esac
done
for i in $*
do
	case $i in
	-O)
		opt=$OPT
		;;
	-c)
		conly=1
		;;
	-L)
		L=l
		opt=
		cflag="$cflag -Xg"
		;;
	-P|-R|-d*)
		asflg="$asflg $i"
		;;
	-S)
		noasm=1
		conly=1
		;;
	-I*|-[DU]*|-C)
		ppopts=$ppopts\ $i
		;;
	-E)
		exflg=E
		noasm=1
		;;
	-g)
		cflag="$cflag -Xg"
		;;
	-w)
		cflag="$cflag $i"
		;;
	-p)
		cflag="$cflag -XP"
		START=$LIB/mcrt0.o
		CLIB=/usr/lib/libc_p.a
		;;
	*.c)
		f=$i
		i=`basename $i .c`
		case $names in
		1)	del=$i.o ;;
		*)	echo $f: 1>&2 ;;
		esac
		case $exflg in
		E)	$CPP $ppopts $f - ; exit 0;
		esac
		$CPP $ppopts $f | $COMP $cflag >$TMP.a
		case $? in
		0)
			case $L in
			l)	$LIST $f $TMP.a $TMP.b; mv $TMP.b $TMP.a;;
			esac
			case "$opt" in
			$OPT)
				$opt $TMP.a $TMP.b
				case $? in
				0)
					mv $TMP.b $TMP.a ;;
				*)
					rm -f $TMP.b ;;
				esac
				;;
			esac
			case $noasm in
			0)
				asflg="$asflg -o $i.o"
				$ASM $asflg $TMP.a
				case $? in
				0)
					ldarg="$ldarg $i.o" ;;
				*)
					rm -f $i.o
					ecode=3 ;;
				esac
				rm -f $TMP.a
				;;
			1)
				mv $TMP.a $i.s
				;;
			esac
			;;
		*)
			rm -f $TMP.a
			ecode=2
			;;
		esac
		;;
	*.s)
		case $noasm in
		0)
			f=$i
			i=`basename $i .s`
			asflg="$asflg -o $i.o"
			$ASM $asflg $f
			case $? in
			0)
				ldarg="$ldarg $i.o" ;;
			*)
				rm -f $i.o
				ecode=4 ;;
			esac
			rm -f $TMP.a
			;;
		esac
		;;
	-l*)	
		j=`echo $i | sed s/-l//`
		ldarg="$ldarg /usr/lib/lib$j.a"
		;;
	*)
		ldarg="$ldarg $i"
		;;
	esac
done
case $conly in
0)
	case $ecode in
	0)
		$LD -X $START $ldarg $CLIB
		case $? in
		0) ;;
		*)
			ecode=5 ;;
		esac
		rm -f $del
		;;
	esac
	;;
esac
exit $ecode

unix.superglobalmegacorp.com

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