pike.git / NT / tools / rntcc

version» Context lines:

pike.git/NT/tools/rntcc:1:   #!/bin/sh    - CLEANUP=yes - DEBUG=no + . $NTTOOLS    - if [ $DEBUG = yes ]; then -  set -x - fi -  +    set -e    - fixpath() { -  echo "$*" | sed -e 's@/@\\@g' - } -  - fixabspath() { -  echo "$*" | sed -e 's@/@\\@g' - } -  +    OPTS=""   CFLAGS=""   SOURCES=""   OBJECTS=""   OUTPUT=   OPERATION=linking   INCLUDE_PATH=   LDOPTS=""      while test "$#" != 0; do    case $1 in -  +  -shared) ;;    -E) OPERATION=preprocessing ;;    -c) OPERATION=compiling ;; -  -g*) CFLAGS="$CFLAGS -d2" ;; +  -g*) CFLAGS="$CFLAGS -d2 " ; LDOPTS="$LDOPTS DEBUG WATCOM ALL" ;;    -O) CFLAGS="$CFLAGS -ox" ;;    -O2) CFLAGS="$CFLAGS -otexan" ;;    *.c) SOURCES="$SOURCES $1" ;; -  *.o) OBJECTS="$OBJECTS $1" ;; -  *.a) OBJECTS="$OBJECTS `cat $a`" ;; +  *.o | *.a) OBJECTS="$OBJECTS $1" ;;    -o) OUTPUT="$2" ; shift ;;       -I*)    if test x$1 = x-I ; then    tmp="$2"    shift    else    tmp=`echo $1 | sed -e 's/^-I//g'`    fi   
pike.git/NT/tools/rntcc:90:   do    case $IPATHS in    *:$a:*) ;;    *)    IPATH="$IPATH;`fixpath $a`"    IPATHS="$IPATHS:$a:"    ;;    esac   done    - do_cmd() { -  echo DOING $* -  BATFILE=TMP$$.bat -  PWD=`pwd` -  RPWD=`fixabspath $PWD` -  if [ $DEBUG != yes ]; then -  echo >$BATFILE "@echo off" -  else -  echo >$BATFILE -  fi -  echo >>$BATFILE "$NTDRIVE" -  echo >>$BATFILE "cd $RPWD" -  echo >>$BATFILE "$*" -  rsh $NTHOST $NTDRIVE$RPWD\\$BATFILE -  if [ $CLEANUP = yes ]; then -  rm $BATFILE || : -  fi - } +       ERRORFILE=TMP$$.err   rm $ERRORFILE 2>/dev/null 1>/dev/null || :      CFLAGS="$CFLAGS -zq -i$IPATH -fr$ERRORFILE"   if [ "x$OUTPUT" != x ]; then    CFLAGS="$CFLAGS -fo$OUTPUT"   fi      case $OPERATION in
pike.git/NT/tools/rntcc:165:      if [ "x$TARGET" != x ]; then    if [ ! -f "$TARGET" ]; then    echo "RNTCC: output file not generated"    exit 1    fi   fi      if [ $OPERATION = linking ]; then    echo >$OUTPUT "#!/bin/sh" -  echo >>$OUTPUT "BATFILE=TMP\$\$.bat" -  echo >>$OUTPUT "echo >\$BATFILE @echo off" -  echo >>$OUTPUT "echo >>\$BATFILE $NTDRIVE" -  PWD=`pwd` -  RPWD=`fixabspath $PWD` -  echo >>$OUTPUT "echo >>\$BATFILE cd '$RPWD'" -  echo >>$OUTPUT "echo >>\$BATFILE $TARGET \"\$@\"" -  echo >>$OUTPUT "rsh $NTHOST '$NTDRIVE$RPWD\\'\$BATFILE" -  echo >>$OUTPUT "rm \$BATFILE" +  echo >>$OUTPUT ". \$NTTOOLS" +  echo >>$OUTPUT "set -e" +  echo >>$OUTPUT "silent_do_cmd $TARGET \"\$@\""    chmod +x $OUTPUT   fi