Make [was Re: SCons and gdc]

Russel Winder russel at winder.org.uk
Sat Oct 27 11:11:14 PDT 2012


On Sat, 2012-10-27 at 00:15 +0200, Rob T wrote:
> I'm trying to do a very simple build, but with scons I find 
> myself spending much more time with it (and getting nowhere) than 
> the actual coding, and that tells me that it's no better and may 
> be even worse than Make.

Or it says you know Make but not SCons.  All build frameworks have their
computational models, idiosyncrasies , and points of pain. Make and
SCons both have these.

The problem most people have when moving from Make to SCons is that they
think Make computational models and idioms. It takes a while to get over
these and appreciate that SCons is very different from Make even though
it is fundamentally the same.

The short form is probably:  Make is about a set of relationship rules
and actions to achieve a target from a source. SCons is about specifying
a toolchain and then construction a graph of the dependencies.

> As an example of the sort of nonsense scons dishes out, I cannot 
> in a reasonable way, specify a build folder above my root source 
> folder, such a thing should be extremely easy to specify, but no 
> it isn't.

Hummm... Whilst I am a fan of "out of source tree builds" I have always
build within the project tree, so I have never noticed that trying to
build in a directory that can only be reached from .. of the SConstruct
appears to be impossible – without use of symbolic links. Will you put
in the bug report or should I?

> I also found that scons is lacking basic features that any build 
> tool should have. For example, when I tried to generate a list of 
> my source files, I discovered that scons it has no built in 
> ability to recursively scan a folder to include all subfolders. 
> WTF!?

Does Make? CMake, Autotools, Waf?

> I know I can write custom code in python to get around these 
> problems, but that will depeat the entire purpose of having a 
> build tool in the first place.

Yes and no. Clearly there is a core of idiomatic things that every build
framework should have. Then there is stuff that is unique.

> scons also comes with a ton of dependency baggage that I simply 
> do not need, therefore I am giving up on it entirely.

SCons depends only on Python. What are these other dependencies that you
speak of?

Giving up on SCons is fine, if it doesn't work for you.

> At this point I'm considering looking at those old build tools 
> written in D, perhaps I can patch one of them up to get it to do 
> what I want.

Or fix SCons?

> If anyone has a suggestion as to which of the (I think) 2 or 3 
> build tools coded in D looked the best, that would be appreciated.

As far as I am aware there are no D coded build frameworks that can
handle C, C++, Fortran, D, LaTeX, Vala, Haskell, OCaml, Java, Scala.

Well SCons isn't very good at Java and Scala, but that is a whole
different argument. Probably a full half hour and not 5 mins. (*)


(*) Think SCons → Python → Monty Python.

-- 
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/20121027/d77fbb74/attachment.pgp>


More information about the Digitalmars-d mailing list