[BACK]Return to cpp.sh CVS log [TXT][DIR] Up to [local] / src / usr.bin / cpp

Diff for /src/usr.bin/cpp/cpp.sh between version 1.6 and 1.7

version 1.6, 2003/06/03 02:56:07 version 1.7, 2004/02/10 02:02:22
Line 40 
Line 40 
 #       doesn't search gcc-include  #       doesn't search gcc-include
 #  #
 PATH=/usr/bin:/bin  PATH=/usr/bin:/bin
 ALST="-traditional -$ -D__GNUC__"  TRAD=-traditional
 NSI=no  DGNUC="-D__GNUC__"
   STDINC="-I/usr/include"
   DOLLAR="@dollaropt@"
 OPTS=""  OPTS=""
 INCS="-nostdinc"  INCS="-nostdinc"
 FOUNDFILES=no  FOUNDFILES=false
   
 CPP=/usr/libexec/cpp  CPP=/usr/libexec/cpp
 if [ ! -x $CPP ]; then  if [ ! -x $CPP ]; then
Line 62 
Line 64 
   
         case $A in          case $A in
         -nostdinc)          -nostdinc)
                 NSI=yes                  STDINC=
                 ;;                  ;;
         -traditional)          -traditional)
                   TRAD=-traditional
                 ;;                  ;;
           -notraditional)
                   TRAD=
                   ;;
         -I*)          -I*)
                 INCS="$INCS $A"                  INCS="$INCS $A"
                 ;;                  ;;
         -U__GNUC__)          -U__GNUC__)
                 ALST=`echo $ALST | sed -e s/-D__GNUC__//`                  DGNUC=
                 ;;                  ;;
         -imacros|-include|-idirafter|-iprefix|-iwithprefix)          -imacros|-include|-idirafter|-iprefix|-iwithprefix)
                 INCS="$INCS '$A' '$1'"                  INCS="$INCS '$A' '$1'"
Line 80 
Line 86 
                 OPTS="$OPTS '$A'"                  OPTS="$OPTS '$A'"
                 ;;                  ;;
         *)          *)
                 FOUNDFILES=yes                  FOUNDFILES=true
                 if [ $NSI = "no" ]                  eval $CPP $TRAD $DGNUC $DOLLAR $INCS $STDINC $OPTS $A || exit $?
                 then  
                         INCS="$INCS -I/usr/include"  
                         NSI=skip  
                 fi  
                 eval $CPP $ALST $INCS $OPTS $A || exit $?  
                 ;;                  ;;
         esac          esac
 done  done
   
 if [ $FOUNDFILES = "no" ]  if ! $FOUNDFILES
 then  then
         # read standard input          # read standard input
         if [ $NSI = "no" ]          eval exec $CPP $TRAD $DGNUC $DOLLAR $INCS $STDINC $OPTS
         then  
                 INCS="$INCS -I/usr/include"  
         fi  
         eval exec $CPP $ALST $INCS $OPTS  
 fi  fi
   
 exit 0  exit 0

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7