#! /bin/sh icc=/home/lrde/lrde/usr/bin/icc # ICC needs to be taught that *.ii is C++. # The wonderful news is that: # # % /home/lrde/lrde/usr/bin/icc I-dont-exist # ld: cannot open I-dont-exist: No such file or directory # % /home/lrde/lrde/usr/bin/icc -c I-dont-exist # # icc per se does not complain about missing files... That's # why understanding the problems takes so long.... case "$@" in *.cc*|*.cpp*) set -- -Kc++ "$@" ;; esac # ICC is not able to honor both -E and -M, but Automake wants -M, # and -E will be added by distcc. case "$@" in *-M*) # Push a token among the arguments that will be used to notice when we # ended options/arguments parsing. arg_sep="$$--$$" set -- "$@" "$arg_sep" # # Parse command line arguments. while test x"$1" != x"$arg_sep"; do case "$1" in -MF) shift minus_M_args="$minus_M_args -MF$1" ;; -M*) minus_M_args="$minus_M_args $1" ;; -E) minus_E=-E;; *) set -- "$@" "$1";; esac shift done # Pop the token shift ;; esac if test "x$minus_E" != x; then echo "$0: don't know what to do with -E" >&2 fi if test "x$minus_M_args" != x; then $icc $minus_M_args "$@" fi exec /usr/bin/distcc $icc "$@"