[Scons-users] Prefixing a command without messing up dependencies
TOM TANNER (BLOOMBERG/ LONDON)
ttanner2 at bloomberg.net
Wed Jul 18 03:27:20 EDT 2012
Firstly, pedantically, are you never going to change filterJavac?
I'd make the command line option an option to filterJavac and then surround that option in $( $) to suppress rebuilds.
----- Original Message -----
From: scons-users at scons.org
To: scons-users at scons.org
At: 7/17 18:58:02
Hi all --
our build normally runs a lot of
javac ... <sources>
commands, and SCons correctly determines that the targets depend on
javac as well as <sources>. However, javac emits lots of stupid
warnings that are impossible to disable. I wrote a script to handle
this, but it doesn't work like this:
javac ... <sources> 2>&1 | filterJavac
because I want to keep stdout and stderr distinct. So instead it works
like this:
filterJavac [options] -- javac ... <sources>
where filterJavac runs javac as a subprocess and filters its stdout
and stderr intelligently. Works great... except that now SCons thinks
my compiler output depends on filterJavac, not on javac. I'd like to
be able to toggle use of filterJavac with a command-line option, but
that triggers lots of unnecessary rebuilds: "javac is no longer a
dependency" and "filterJavac is a new dependency". Argh.
Suggestions? I think I could easily make those targets all depend on
javac, but there's still the problem of an unwanted dependency on
filterJavac. Is there a way to overrule the usual "depend on argv[0]"
trick?
Greg
_______________________________________________
Scons-users mailing list
Scons-users at scons.org
http://four.pairlist.net/mailman/listinfo/scons-users
More information about the Scons-users
mailing list