[Scons-users] FW: how to execute Clang static analyzer perl script instead of gcc.exe on Mingw/MSYS
Dennis Cote
DennisC at harding.ca
Fri Apr 12 11:16:26 EDT 2013
Hi Bill,
How about:
CC="bash.exe cc-analyzer'
Assuming your mingw has a bash that's in your path?
Thanks for the suggestion. Yes, bash is on my path. So I tried your
idea. It now runs the ccc-analyzer script. Hooray...
Alas it does not work. Bummer...
scons: Building targets ...
bash ccc-analyzer -o build\DXL\GoAheadWeb\asp.o -c -Wall -include
builtin.h -I. -DNU_MMU_MODE=0 -DNU_MODULE_SUPPORT=1
-DNU_SUPERV_USER_MODE=1 -DNU_DEBUG=1 -DXL_DEBUG_ENABLE=1
-DDXLIO_METHOD=DXLIO_TELNET -DENDIAN=0 -DNUDEBUG_MEMORY -D_SH4 -DUEMF
-DWEBS -DNUCLEUS_NET -Ibuild\DXL\GoAheadWeb -Ibuild\ATI
-Ibuild\DXL\Intercom\hdr -Ibuild\ATI\plus build\DXL\GoAheadWeb\asp.c
/mingw/bin/ccc-analyzer: line 15: use: command not found
/mingw/bin/ccc-analyzer: line 16: use: command not found
/mingw/bin/ccc-analyzer: line 17: use: command not found
/mingw/bin/ccc-analyzer: line 18: use: command not found
/mingw/bin/ccc-analyzer: line 19: use: command not found
/mingw/bin/ccc-analyzer: line 20: use: command not found
/mingw/bin/ccc-analyzer: line 21: use: command not found
/mingw/bin/ccc-analyzer: line 22: use: command not found
/mingw/bin/ccc-analyzer: line 28: my: command not found
/mingw/bin/ccc-analyzer: line 29: my: command not found
/mingw/bin/ccc-analyzer: line 30: my: command not found
/mingw/bin/ccc-analyzer: line 31: my: command not found
/mingw/bin/ccc-analyzer: ccc-analyzer: line 33: syntax error near
unexpected token `{'
/mingw/bin/ccc-analyzer: ccc-analyzer: line 33: `if (`uname -a` =~
m/Darwin/) { '
scons: *** [build\DXL\GoAheadWeb\asp.o] Error 258
scons: building terminated because of errors.
The file ccc-analyzer uses a #! line to start perl. But it looks like
that is not happeneing.
#!/usr/bin/env perl
It looks like bash is trying to execute the contents of ccc-analyzer as
a series of commands.
use strict;
use warnings;
use FindBin;
use Cwd qw/ getcwd abs_path /;
use File::Temp qw/ tempfile /;
use File::Path qw / mkpath /;
use File::Basename;
use Text::ParseWords;
##===-------------------------------------------------------------------
---===##
# Compiler command setup.
##===-------------------------------------------------------------------
---===##
my $Compiler;
my $Clang;
my $DefaultCCompiler;
my $DefaultCXXCompiler;
if (`uname -a` =~ m/Darwin/) {
MSYS does have env.exe and perl.exe available.
$ which env
/bin/env.exe
$ which perl
/bin/perl.exe
Any idea why the #! Line is being ignored?
Dennis Cote
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20130412/d6e7acb0/attachment.htm>
More information about the Scons-users
mailing list