[Scons-dev] File-based build tools will never handle Java
Kenny, Jason L
jason.l.kenny at intel.com
Thu Sep 6 16:33:38 EDT 2012
No you are correct... in SCons we say the target depends on some sources, and we have scanner that add "depends" of the sources to our target. Sorry for not being more exact.
So to be clear we have something like this:
a.class
|- a.java
We "scan" a.java with this "tool" to see it needs b.java, we scan B and see it needs A and C. however for this we want to ignore A. and add C.. scan C and add what it does , etc...( note that these files have to be added as Sources, not implicit or explict depends) Then we need to take all the .java files we added as sources to a.class, and add that building a.class has a sideffect() ? of building B.class and C.class
This part I believe is possible for SCons to get correct ( given we can have our scanner as nodes as sources instead of implicit depend). What I am not sure about is the random .class name file that can happen. As deleting this file after it was build should cause it to be built again, however we have no idea what it is called, until after it is built.
Jason
-----Original Message-----
From: scons-dev-bounces at scons.org [mailto:scons-dev-bounces at scons.org] On Behalf Of Gary Oberbrunner
Sent: Thursday, September 06, 2012 1:55 PM
To: SCons developer list
Subject: Re: [Scons-dev] File-based build tools will never handle Java
On Thu, Sep 6, 2012 at 1:42 PM, Kenny, Jason L <jason.l.kenny at intel.com> wrote:
> To get what a file Java depends on ...
I get what you mean, but it's important to say it correctly. A java file is a source. It doesn't depend on anything. Only build targets have dependencies. A class file and a jar file are targets; they have dependencies. You never have to rebuild a java file (well, unless it's auto-generated which is another story), but you do rebuild jars and classes when their dependencies (.java files) change.
You may need to scan java files to find other java files, the way we scan C files to find headers. What happens then is the object file (or class or jar) gets a dependency on the files found as the result of the scan. The C file does not depend on the header. The C file's object file depends on the header.
Sorry if I'm being pedantic but I think it's important.
--
Gary
_______________________________________________
Scons-dev mailing list
Scons-dev at scons.org
http://two.pairlist.net/mailman/listinfo/scons-dev
More information about the Scons-dev
mailing list