cc-and-mkdep.all 412 B

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