* Peter Rosin wrote on Tue, Jun 22, 2010 at 01:53:49PM CEST: > Den 2010-06-22 05:38 skrev Charles Wilson: > >What if $CC is specified as 'cl.exe'? IIUC, this means that the compile > >script will be invoked as "compile cl.exe ...." but then this case: > > > >+ cl | *[/\\]cl) > >+ func_cl_wrapper "$@" # Doesn't return... > >+ ;; > > > >won't fire. > > (also folding in the "cl\ * | */cl\ *" cases suggested by Ralf in > another threadlet) > > Since the following is way over the top IMHO: > > [cC][lL] | *[/\\][cC][lL] | [cC][lL]\ * | *[/\\][cC][lL]\ * \ > | [cC][lL].[eE][xX][eE] | *[/\\][cC][lL].[eE][xX][eE] \ > | [cC][lL].[eE][xX][eE]\ * | *[/\\][cC][lL].[eE][xX][eE]\ * ) > func_cl_wrapper "$@" # Doesn't return... > ;;
Wait a minute. You're comparing against $1. Why does that ever contain more than one word? If it contained "cl -MD", then the script will later try to execute the program named "cl -MD", not cl with -MD as first argument. IOW, CC="cl -MD" still gets you only "cl" here. > I'm going with this instead: > > cl | *[/\\]cl | cl\ * | *[/\\]cl\ * \ > | cl.exe | *[/\\]cl.exe | cl.exe\ * | *[/\\]cl.exe\ * ) > func_cl_wrapper "$@" # Doesn't return... > ;; This calls more and more for CC="path/to/compile --compiler=msvc .../cl ... but again, let's leave that as next step. Cheers, Ralf