[Scons-users] Extracting "-I" paths in a complex tree
    andreas.ames at de.transport.bombardier.com 
    andreas.ames at de.transport.bombardier.com
       
    Fri Jan 17 13:06:59 EST 2014
    
    
  
> I think what you're hoping for is to somehow do the scanning as part
> of the build process -- but of course it's too late then.  If foo.c
> depends on foo.h which is a generated header, by the time you compile
> foo.c and discover it needs foo.h it's too late to go back and
> generate it.  Scanning for deps has to be done before building.  If
> you're going to run the compiler (or at least preprocessor) you'll
> have to do it an extra time in the scanner.
You are right regarding of what I'm hoping for.  I should have explained 
the general idea before asking questions about it, sorry.  I'll try to 
make good for my omission, sticking with gcc as an example.
I would like to 'smuggle' an additional '-H' command line option into the 
command line associated with StaticObject (and SharedObject etc.) and 
filter the stderr for indications of include files being used by the 
preprocessor.  IIRC, gcc prints the absolute path of the include files, so 
these could be used without further ado.  Calling the 
compiler/preprocessor onece more time StaticObject seems wasteful to me 
(performance-wise).  Besides the performance gain the suggested approach 
would also ensure that the compiler configuration is implicitly the same 
for both target creation and computation of dependencies.
To be honest I can't see a principal problem with such an approach.  On 
the first scons run (let's say after VCS checkout or so) the target is not 
there yet, so a build is necessary anyway.  As part of this build the 
implicit dependencies are computed, which are used as inputs for the 
out-of-date analysis of the next run.  But it's well possible that I'm 
just missing something important here.
cheers,
 
aa
  
Please consider the environment before you print / Merci de penser à 
l'environnement avant d'imprimer / Bitte denken Sie an die Umwelt bevor 
Sie drucken 
Bombardier Transportation GmbH 
Vorsitzender des Aufsichtsrats / Chairman of Supervisory Board: Prof. Dr. 
Wilhelm Bender 
Geschäftsführung / Executive Board: Michael Clausecker 
(Vorsitzender/Chairman), Dr. Susanne Kortendick, David Barry, Matthias 
Keller 
Sitz der Gesellschaft / Principal Office: Berlin 
Registergericht / Registration Court: Amtsgericht Charlottenburg, HRB 
64838 
_______________________________________________________________________________________________________________ 
This e-mail communication (and any attachment/s) may contain confidential 
or privileged information and is intended only for the individual(s) or 
entity named above and to others who have been specifically authorized to 
receive it. If you are not the intended recipient, please do not read, 
copy, use or disclose the contents of this communication to others. Please 
notify the sender that you have received this e-mail in error by reply 
e-mail, and delete the e-mail subsequently. Please note that in order to 
protect the security of our information systems an AntiSPAM solution is in 
use and will browse through incoming emails. 
Thank you. 
_________________________________________________________________________________________________________________ 
Ce message (ainsi que le(s) fichier(s)), transmis par courriel, peut 
contenir des renseignements confidentiels ou protégés et est destiné à 
l?usage exclusif du destinataire ci-dessus. Toute autre personne est, par 
les présentes, avisée qu?il est strictement interdit de le diffuser, le 
distribuer ou le reproduire. Si vous l?avez reçu par inadvertance, 
veuillez nous en aviser et détruire ce message. Veuillez prendre note 
qu'une solution antipollupostage (AntiSPAM) est utilisée afin d'assurer la 
sécurité de nos systèmes d'information et qu'elle furètera les courriels 
entrants.
Merci. 
_________________________________________________________________________________________________________________ 
    
    
More information about the Scons-users
mailing list