6d86081997-12-22Fredrik Hübinette (Hubbe) #!/bin/sh
e3fa691997-12-28Fredrik Hübinette (Hubbe) . $NTTOOLS set -e OPTIONS=$1
6d86081997-12-22Fredrik Hübinette (Hubbe) shift OUTPUT=$1 shift
4469f31999-06-19Fredrik Hübinette (Hubbe) case "$CC" in *rntcl) case "E$OPTIONS" in
b4dca31999-07-08Fredrik Hübinette (Hubbe)  *x*) ofixed="`fixpath $OUTPUT`" if [ $# = 0 ]; then to_extract=`do_cmd lib -list -nologo "$ofixed"` else to_extract=$@ fi for a in $to_extract do do_cmd lib -nologo "-extract:$a" "$ofixed" done exit $? ;;
4469f31999-06-19Fredrik Hübinette (Hubbe)  *d*) exit 1 ;; *x*) exit 1 ;; *q*|*r*) do_cmd lib "-OUT:`fixpath $OUTPUT`" `fixpath $@` exit $? ;; esac ;; *rntcc)
09ca251998-01-16Fredrik Hübinette (Hubbe) XOPTS="-b -c" case "E$OPTIONS" in *x*) OPCHAR='*' if [ $# = 0 ]; then TMPDIR=TMP$$.d rm -rf $TMPDIR >/dev/null 2>/dev/null || : mkdir $TMPDIR do_cmd wlib -x -d=$TMPDIR `fixpath $OUTPUT` ( cd $TMPDIR for a in * do BASE=`echo $a | sed -e 's/\.[^.]$//'` mv $a ../$BASE.o done ) rm -rf $TMPDIR >/dev/null 2>/dev/null || : exit 0 fi ;; *d*) OPTCHAR='-' ;; *r*) OPCHAR='-+' ;; *q*) OPCHAR='+' ;; esac
e3fa691997-12-28Fredrik Hübinette (Hubbe) XFILE=TMP$$.l rm $XFILE 2>/dev/null 1>/dev/null || : OPTS=
3f93431998-01-14Fredrik Hübinette (Hubbe) for a in "$@"
6d86081997-12-22Fredrik Hübinette (Hubbe) do
09ca251998-01-16Fredrik Hübinette (Hubbe)  OPTS="$OPTS $OPCHAR$a"
6d86081997-12-22Fredrik Hübinette (Hubbe) done
09ca251998-01-16Fredrik Hübinette (Hubbe) echo >$XFILE "$OPTS"
e3fa691997-12-28Fredrik Hübinette (Hubbe) 
09ca251998-01-16Fredrik Hübinette (Hubbe) do_cmd wlib $XOPTS `fixpath $OUTPUT` @$XFILE
e3fa691997-12-28Fredrik Hübinette (Hubbe)  if [ $CLEANUP = yes ]; then if [ -f $XFILE ]; then rm $XFILE fi fi
4469f31999-06-19Fredrik Hübinette (Hubbe)  ;; *) echo Unknown C compiler: $CC ;; esac