[libblockdev 0/4] Would like to use scons instead of make

Anne Mulhern amulhern at redhat.com
Wed Jul 9 20:56:58 UTC 2014





----- Original Message -----
> From: "David Shea" <dshea at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Wednesday, July 9, 2014 1:37:20 PM
> Subject: Re: [libblockdev 0/4] Would like to use scons instead of make
> 
> On 07/09/2014 12:16 PM, mulhern wrote:
> > The primary motivation is that it may make the configuration part, which
> > would otherwise be handle by autotools, easier. Also, it may actually be
> > the case that scons is better. I've never written an SConstruct file before
> > and the whole thing was surprisingly easy. The fact that the file is
> > actually
> > python is nice, and the automatic, and hopefully correct, handling of C
> > dependencies is nice too.
> >
> > One thing that confused me is scons -c (for clean). It cleans for the
> > default target, only. I don't yet know how to clean for all targets,
> > without specifying them all, or temporarily removing the default target.
> >
> > The first patch is just a tiny fix I happened to notice.
> >
> > Removing the Makefile may seem harsh, but we don't want two build systems
> > going at once. If we need it back, because this does not work out,
> > it's not hard to find.
> >
> >
> 
> I am apprehensive. I won't argue that autotools is particularly great
> but using things that aren't autotools always seems to involve a lot of
> time and frustration working around things that are missing in the other
> tools. Off the top of my head: is there a DESTDIR equivalent? Does scons
> handle soname/soversion/other shared object stuff correctly? How can you
> tell what targets a particular scons file has? Is there a way to
> override CFLAGS/LDFLAGS/&c from the environment or the command line?
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 

I'm apprehensive, too. But I'ld be just as apprehensive using autotools;)

I can't answer any of these questions off the top of my head, because this is my first
stab at any serious use of scons.

I thought about them, though, and this is what I got:

* Is there a way to override CFLAGS/LDFLAGS/&c from the environment or the command line?

You can set key/value pairs on the command line and that info is available when the
SConstruct file is being processed. You have to write the code to use that info
appropriately. This is kind of good, as you might not want to override the CFLAGS
variable for every target, but more work. The usual tradeoff. You can do similar things
with the environment, because it's Python and so you have easy access to the environment.

* How can you tell what targets a particular scons file has?

I don't think this is any different from autotools + make, where the targets
can be a function of the environment + Makefile, not the Makefile alone.
You can't really in either. I may not be understanding your question here.

* Does scons handle soname/soversion/other shared object stuff correctly?

All the rumours are bad, but also old. It definitely has some version stuff
for shared objects.

* Is there a DESTDIR equivalent?

This will require more looking around, it's not obvious. I'm guessing that
sprung to mind because it's very handy for packaging?

My thought is that maybe we should come up with something that we know
is going to be difficult, and that we know is necessary, and see if it's
possible to pull it off with scons. If it is not...then we give up. What do
you think is a good candidate?

- mulhern





More information about the anaconda-patches mailing list