Make [was Re: SCons and gdc]

Russel Winder russel at winder.org.uk
Tue Oct 30 02:41:25 PDT 2012


On Tue, 2012-10-30 at 00:19 +0100, Rob T wrote:
[…]
> I definitely do not like Make. The scripts are made out of 
> garbage, and maintaining garbage just produces more waste. 
> Unfortunately for me, my attempts to make use of scons is not 
> encouraging. It may be better than Make, but not enough for me to 
> settle down with it.

I would suggest you haven't given SCons long enough to get into the
SCons idioms, but you have to go with the route that is most comfortable
for you.

> The two problems I mentioned were encountered almost immediately. 
> These are inability to scan subfolders recursively, and inability 
> to build to a level above the source folder. I don't think that 
> neither requirement has anything to do with thinking in terms of 
> Make. It could be that solving these two deficiencies may be 
> enough to keep me going with scons, I don't know.

I do not see why you need to scan subfolders recursively. This is a
traditional Make approach. SCons does things differently even for highly
hierarchical systems. In particular use of SConscript files handles
everything. So I do not think this is a SCons problem.

Of course if you have to do things recursively then os.walk is the
function you need.

[…]

> I don't think it's a bug, because it's actually documented as a 
> feature. It may however be a "bug" in terms of the assumptions 
> about how applications should be built.

As noted in the exchanges to which I cc you in everything I sent, SCons
does insist on having all directories in use under the directory with
the SConstruct – unless you have with Default. On reflection I am now
much less worried about this that I was at first.  Out of source tree I
find essential in any build, SCons does this well, Make less so. Out of
project tree builds I am now not really worried about.

[…]
> I have only used Make, and as bad as it is, at least I can scan 
> subfolders with one built-in command.

But why do you want to do this?  Why doesn't os.walk achieve what you
need with SCons?

[…]
> Scons is far too rigid with the assumptions it makes, and IMO 
> some of the assumptions are plain wrong.

I disagree. I find Make totally rigid and unyielding. Not to mention
rooted in 1977 assumptions of code.

> For example, building to a location out of the source tree has 
> the obvious advantage that your source tree remains a source 
> tree. I don't understand how anyone can consider this unusual or 
> not necessary. If a source tree is to be a tree containing source 
> code, then recursive scanning and building out of the tree is an 
> essential requirement.

I always build out of source tree using SCons, to do otherwise is
insanity, yes Autotools I am looking at you. However I have a source
directory in my project directory and can then have many build
directories in the project directory. Building a project for multiple
platforms makes this essential. SCons supports this very well with the
Variant system.

[…]
> You are correct, only Python, which on a Linux system is normally 
> installed by default. I was refering to the need to manually 
> build scons from from a source repository in order to get latest 
> D support. I know I'm in the bleeding edge zone when it comes to 
> D, so a certain amount of hacking is needed, but I'd like to 
> minimize it as much as possible.

You don't need to install SCons to use it, you can use it from a clone
directly using the bootstrap system.  I have an alias 

        alias scons='python /home/users/russel/Repositories/Mercurial/Masters/SCons_D_Tooling/bootstrap.py'

[…]
> > Or fix SCons?
> 
> I thought of that, however in order to fix scons, I would have to 
> learn a lot about scons, and also learn Python. The flaws that I 
> see with scons are so basic, I probably would not fit in with the 
> scons culture, so I see nothing but pain in trying to fix scons. 
> I'm also learning D, and would rather spend more of my time 
> learning D than something else. My only interest with scons is 
> for using it, not fixing it, and I have no interest in learning 
> Python.

Please stick with the "I don't want to learn Python" as your reason for
not working with SCons. That is fine. I have no problem with that.

I do have a problem with you saying "the flaws with SCons are so basic".
This is just FUD from a person who hasn't really learnt the SCons way of
doing things.

So the resolution here is to stop mud-slinging at SCons and say "I am
not going to use SCons because it involve working with Python and I
don't want to do that." Then people can respect your position.

[…]
> > (*) Think SCons → Python → Monty Python.
> 
> That's how I view most of what is going on in programming land.

:-)

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20121030/6844a687/attachment.pgp>


More information about the Digitalmars-d mailing list