Boost logo

Boost-Build :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2003-03-01 14:17:27


"M. Evans" <datafeed_at_[hidden]> writes:

> How to write unmaintainable code, items 14, 15, 17 :-)
> http://www.mindprod.com/unmainmisc.html

Frankly I don't see how that's relevant. Nothing we've discussed is
as stupid as that ;-)

> I'd like to see is a comparison that includes automake. I don't like
> automake, Perl, or 'make' languages, but here is a typical unix geek
> response to Dave's comments about Boost.Build.
>
> Mark
>
> --------------------------------------------------
>
>> which, in Boost.Build would be:
>>
>> project-root ; # top of project hierarchy
>>
>> ROOT = main.c
>> version.c
>> work.c
>> util.c ;
>>
>> COMMON = $(BDIR)/$(ROOT) ;
>>
>> exe foo : $(COMMON) $(BDIR)/foo.c ;
>> exe bar : $(COMMON) $(BDIR)/bar.c ;
>
> which, in Automake would be:
>
>
> bin_PROGRAMS = foo bar
> COMMON = main.c version.c work.c util.c
>
> foo_SOURCES = $(COMMON) foo.c
> bar_SOURCES = $(COMMON) bar.c

> A few lines saved, again.

Actually IIUC that's equivalent to the following Jamfile:

project_root ;
COMMON = main.c version.c work.c util.c ;

exe foo : $(COMMON) foo.c ;
exe bar : $(COMMON) bar.c ;

...which is exactly the same number of lines. Autotools have the
advantage of being available on most UNIX systems, but lack many of
the advantages of Boost.Build.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com
 

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk