home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR24 / BASHOS2.ZIP / CPPMAGIC.EXE < prev    next >
Text File  |  1992-10-28  |  467b  |  28 lines

  1. # Make a list of flags to pass to /lib/cpp.
  2. #
  3.  
  4. if [ "$2" ]; then
  5.   Cpp=$2
  6. else
  7.   if [ -f /lib/cpp ]; then
  8.     Cpp=/lib/cpp
  9.   else
  10.     Cpp=cpp
  11.   fi
  12. fi
  13.  
  14. TRADITIONAL=
  15. FLAGS=
  16.  
  17. # First flag might be `-traditional' if this is Gnu Cpp.
  18. unknown_flag=`$Cpp -traditional /dev/null 2>&1 |
  19.           egrep 'known|recognized|valid|bad'`
  20. if [ ! "$unknown_flag" ]; then
  21.   TRADITIONAL=-traditional
  22. fi
  23.  
  24. if [ "$1" ]; then
  25.    FLAGS=`$1`
  26. fi
  27. echo $TRADITIONAL $FLAGS
  28.