82 lines · 1.7 KB · Text
RawDownload
#!/bin/rc rfork enLIB=/sys/lib/mosml linkalso=trueincludes=()compopt=(-conservative)linkopt=()custom=()linkfiles=(). /$cputype/mkfilecc=$CCccfiles=()cclib=()ccopt=()linkout=a.outcontext=-structure while(! ~ $#* 0) {	switch($1) {	case *.sml		aux/camlrunm $LIB/mosmlcmp -stdlib $LIB $includes $compopt $context $1 || exit $status		context=($context `{echo $i | sed 's/\.sml$/.ui/'})		linkfiles=($linkfiles $1)	case *.sig		aux/camlrunm $LIB/mosmlcmp -stdlib $LIB $includes $compopt $context $1 || exit $status		context=($context `{echo $i | sed 's/\.sml$/.ui/'})	case *.ui		context=($context $1)	case *.uo		linkfiles=($linkfiles $1)	case -structure -toplevel		context=($context $1)	case -c		linkalso=false	case -I -include		includes=($includes -I $2)		shift	case -P -perv		compopt=($compopt -P $2)		linkopt=($linkopt -P $2)		shift	case -q -quotation -imptype -valuepoly -orthodox -conservative -liberal		compopt=($compopt $1)	case -i -g -debug		compopt=($compopt $1)		linkopt=($linkopt $1)	case -m -msgstyle		compopt=($compopt -msgstyle $2)		shift	case -noheader -noautolink -standalone		linkopt=($linkopt $1)	case -o -exec		linkout=$2		shift	case -stdlib		LIB=$2		shift	case -v -version		echo 'The Moscow ML system, version 2.00 (June 2000)'			echo '   (standard library from '$LIB')'		aux/camlrunm -V		aux/camlrunm $LIB/mosmlcmp -version		aux/camlrunm $LIB/mosmllnk -version	case -files		linkfiles=($linkfiles $1 $2)		shift	case -*		echo 'unknown option '^$1^' ignored' >[1=2]	case *		echo 'cannot handle file '^$1^'; ignored' >[1=2]	}	shift} if(~ $linkalso true && ! ~ $#linkfiles 0){	aux/camlrunm $LIB/mosmllnk -stdlib $LIB $includes $custom $linkopt \		-exec $linkout $linkfiles	exit $status}exit ''