[Scons-users] Dealing with headers appearing from Command builders

mg at ncp-e.com mg at ncp-e.com
Tue Apr 7 11:07:50 EDT 2015


Hello,

I'm a SCons user for about three years now. First of all I wanted to
thank the people that take care of it. It's the best build system I've
worked with so far. It is robust, extensible and just is fun to work
with.

We require a lot of third party packages for building our own
software. To support this I've integrated a small package manager into
SCons that is able to fetch and build the various third party packages
and report the resulting libraries and include directories etc. back to
SCons. I basically realized this using a Command builder that calls into
a separate python package that provides all of this.

That approach is working great so far. There is one glitch, however,
when doing a clean build:

- The first time SCons builds a target it scans the local sources and
  finds includes for the third-party packages. The third-party packages
  aren't there yet, however. In the process of building the target my
  Command builder is called that builds the third party package. So when
  the local sources get built the necessary includes and libraries are
  available and the build succeeds
- The second time I build the same target SCons now finds all the
  headers from the third-party packages, because they're already built
  and in place. The fact that the previously "missing" headers are now
  available causes SCons to rebuild parts of the local sources, although
  nothing really changed
- The third time I build the target nothing is rebuilt, because SCons
  now registered the existence of the third party headers and nothing
  changed in that respect any more

I know I can declare SideEffects in SCons which is what I do for all the
libraries that are resulting from third party packages. I can't do that
well for all the header files, however, because they're so many and can
change at any time in new versions.

It's not that big a problem, because it only occurs when doing clean
builds and doesn't break anything. But maybe somebody has got an advice
how to get around this elegantly.

Best regards,

Matthias

-- 
Matthias Gerstner, Dipl.-Wirtsch.-Inf. (FH)
Entwicklung
 
NCP engineering GmbH
Dombühler Straße 2, D-90449, Nürnberg
Geschäftsführer Peter Söll, HRB-Nr: 77 86 Nürnberg
 
Telefon: +49 911 9968-153, Fax: +49 911 9968-229
E-Mail: Matthias.Gerstner at ncp-e.com
Internet: http://www.ncp-e.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20150407/12e01996/attachment.pgp>


More information about the Scons-users mailing list