cc-and-mkdep.all 390 B

1234567891011121314151617181920
  1. : '$Id$'
  2. : Compile and make dependencies. First argument is the file on which the
  3. : dependencies must be produced. This version is a generic one that should
  4. : work for all Unix systems.
  5. n=$1
  6. shift
  7. cpp_args=
  8. for i in $*
  9. do
  10. case $i in
  11. -I*|-D*|-U*) cpp_args="$cpp_args $i"
  12. ;;
  13. -*) ;;
  14. *) cpp_args="$cpp_args $i"
  15. ;;
  16. esac
  17. done
  18. $UTIL_HOME/lib.bin/cpp -d -m $cpp_args > $n
  19. exec $CC $*