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
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