[Scons-users] integrating scons with other (non-scons) projects
Gary Granger
granger at ucar.edu
Fri Jun 8 12:10:58 EDT 2018
Fwiw, I have tried two approaches for this. The first approach sounds
like what you describe. I created tools for external dependencies, and
each tool had the capability to download the source package and build
it, and the tool created scons builders whose targets were the libraries
and headers in the scons filesystem that the package build would
create. Then our scons build system was configured (ie, with CPPPATH
and LIBS) to find the dependencies where the package build would put
them. This approach worked to a point, but we don't use it anymore,
because as you noted it is difficult to maintain. We only have several
simple cases, like where scons calls out to kmake to build a kernel
module whose source is in our source tree.
The more recent approach has been to create a script which just
downloads, builds, and installs each source package. It is much easier
to encode the custom build settings (like cross-compilation in your
case) in a simple script. In our case, we might need to bootstrap the
build environment by running the script once, and after that all the
development and building happens in our scons source tree. We don't
need scons to trigger rebuilds of the external packages, because we're
not changing them. If an external package needs to be upgraded, then I
just manually rerun the script to download, build, and install the new
version. Typically, the script has a parameter which is the directory
to which all the packages should be installed. I suppose I could add an
option to our scons tree to call the external script and make sure
everything is downloaded and built, so that things like clean bootstraps
and upgrades could still be run via scons, but I just don't think it's
worth it to go further than that, to enumerate all the external
package's build products and dependencies in scons.
Now that I've thought about it, this sounds similar to source package
tools like Homebrew or Macports, right? Or Portage or Sorcery? There
are tools which will download source packages and build them, and manage
dependencies too, but I haven't tried them. Perhaps I should...
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180608/3899f81b/attachment.html>
More information about the Scons-users
mailing list