Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Best Build Tool for large C projects

72 views
Skip to first unread message

scholz...@gmail.com

unread,
Dec 9, 2008, 5:21:02 PM12/9/08
to
What is the best build tool for somebody who want to get rid of make.
I'm looking for something with the following features:

1) Must scan the files for dependencies.

2) Results from 1 must be safed so that not each invokation is doing a
complete scan because the files may be on a NFS with slow connections.

3) Should do a preprocessing run and check if there are real changes.
If i change code

4) Collects compile optinos in a database/central location so i don't
need to set them in a lot of
build files.

5) Works well with multiple CPU's/Core's and ideally detects the
number of available CPU's
automatically. Running it on a nightly build machine with 1 cpu or a
developer machine with 8.

6) As 5 suggests. I need a good split into independent dependency
targets. Aka "make -j"

7) Does not need huge requirements to work: No Java solution (and no
Perl). ANSI C with a few Posix/Plattform Hacks would be best. But ruby
or python based are also okay.

8) Helps me to avoid autoconfig/automake hell.

9) Available on WinXP/WinVista/FreeBSD/Linux/NetBSD/OpenBSD/Solaris/HP-
UX/MacOSX is required. All in 32 and 64 bit modes (BSD's and Linux
will hot have a 32 bit library installed)

10) Fast.

11) Little typing.

I heared about jam and will start reading the docs tomorrow. So please
comment. I only worked with make in the past.

scholz...@gmail.com

unread,
Dec 9, 2008, 5:21:08 PM12/9/08
to

user923005

unread,
Dec 9, 2008, 6:01:37 PM12/9/08
to

I guess a web search is your best bet.

jam is used for some projects I am familiar with (like the boost C++
components).

mkdep can be used to calculate dependencies on POSIX systems (there is
usually some code you can find to build one if your system does not
have it).

Maybe this can help you (I have never used kjam):
http://www.oroboro.com/kjam/docserv.php/page/doc_perf

In a case like this where there isn't really an C question as far as I
can see, I guess that google is better than a newsgroup, since you
know your particular requirements and they don't have anything to do
with C as far as I can see.

CBFalconer

unread,
Dec 9, 2008, 6:43:40 PM12/9/08
to
scholz...@gmail.com wrote:
>
> What is the best build tool for somebody who want to get rid of
> make. I'm looking for something with the following features:

Learn to use make.

--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.

scholz...@gmail.com

unread,
Dec 9, 2008, 7:02:25 PM12/9/08
to
> In a case like this where there isn't really an C question as far as I
> can see, I guess that google is better than a newsgroup, since you
> know your particular requirements and they don't have anything to do
> with C as far as I can see.

Since i want a tool that have intrinsic knowledge about C header files
and
C preprocessor it is a 100% perfect question for this newsgroups.

I know a few guys are still insane about the point what is off-topic
in this newsgroup.

scholz...@gmail.com

unread,
Dec 9, 2008, 7:04:18 PM12/9/08
to
> > What is the best build tool for somebody who want to get rid of
> > make. I'm looking for something with the following features:
>
> Learn to use make.

Retarded answer. What else could i expected from you.

Keith Thompson

unread,
Dec 9, 2008, 8:00:11 PM12/9/08
to
CBFalconer <cbfal...@yahoo.com> writes:
> scholz...@gmail.com wrote:
>>
>> What is the best build tool for somebody who want to get rid of
>> make. I'm looking for something with the following features:
>
> Learn to use make.

make provides very few of the features he's looking for. Why would
you suggest it?

--
Keith Thompson (The_Other_Keith) ks...@mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"

Erik de Castro Lopo

unread,
Dec 9, 2008, 9:04:13 PM12/9/08
to
scholz...@gmail.com wrote:

> What is the best build tool for somebody who want to get rid of make.

There are many build tools but none of them have ever managed
to provide a compelling enough set of features above and beyond
make to actually replace make for most people.

> I'm looking for something with the following features:
>
> 1) Must scan the files for dependencies.

This is more a feature of the compiler than the build tool.

For instance, GNU GCC has a bunch of -M command line options for
tracking dependancies. Other compilers for other languages have
similar features and tools.

> I heared about jam and will start reading the docs tomorrow. So please
> comment. I only worked with make in the past.

So Jam, scans source files for '#include'. Does it know how to
extract doxygen comments from C files and generate LaTeX docs?
Does it handle C code generators like lex and yacc? What does
it do for files written in the Ocaml programming language and
how does it handle mixed Ocaml/C code bases?

Without adequate answers to questions like these Jam may be useful
to a small number of people but will never be compelling solution
for everybody else.

Erik
--
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
Being really good at C++ is like being really good at using rocks to
sharpen sticks." -- Thant Tessman

scholz...@gmail.com

unread,
Dec 9, 2008, 9:20:35 PM12/9/08
to
> > 1) Must scan the files for dependencies.
>
> This is more a feature of the compiler than the build tool.
>
> For instance, GNU GCC has a bunch of -M command line options for
> tracking dependancies. Other compilers for other languages have
> similar features and tools.

I know but jam is doing it and wmake the make that comes with the
watcom compiler
(at least the version i bought back in 1994) was also doing this.

So i believe it is at least a common wish.

And by the way i write C code not GCC C code, so i can't assume gcc is
available.

sylar

unread,
Dec 10, 2008, 1:52:32 AM12/10/08
to
"It was long past time for autotools to be replaced, and SCons has won
the race to become my build system of choice. Unified builds and
extensibility with Python — how can you beat that?"
— Eric S. Raymond

William Pursell

unread,
Dec 10, 2008, 2:35:18 AM12/10/08
to
On 9 Dec, 22:21, scholz.lot...@gmail.com wrote:
> What is the best build tool for somebody who want to get rid of make.

Automake


> 8) Helps me to avoid autoconfig/automake hell.

To avoid the "autoconfig/automake hell", you will
probably have to learn to use those tools properly.
To quote from the autoconf manual: "Those who do not
understand Autoconf are condemned to reinvent it, poorly."

Border

unread,
Dec 10, 2008, 3:32:08 AM12/10/08
to
You can try scons. http://www.scons.org/
Scons is an Open Source software construction tool—that is, a next-
generation build tool. Think of SCons as an improved, cross-platform
substitute for the classic Make utility with integrated functionality
similar to autoconf/automake and compiler caches such as ccache. In
short, SCons is an easier, more reliable and faster way to build
software.

- Bian Jiang

Antoninus Twink

unread,
Dec 10, 2008, 5:22:40 AM12/10/08
to
On 10 Dec 2008 at 1:00, Keith Thompson wrote:
> CBFalconer <cbfal...@yahoo.com> writes:
>> scholz...@gmail.com wrote:
>>> What is the best build tool for somebody who want to get rid of
>>> make. I'm looking for something with the following features:
>>
>> Learn to use make.
>
> make provides very few of the features he's looking for. Why would
> you suggest it?

Because he's completely clueless and doesn't actually know a damn thing
about half the stuff he pontificates about with such authority?

jacob navia

unread,
Dec 10, 2008, 5:39:56 AM12/10/08
to
scholz...@gmail.com wrote:
> What is the best build tool for somebody who want to get rid of make.

I have written an automatic make file generator for the IDE of lcc-win
under windows. The generator's code is highly portable since it doesn't
use any GUI.

> I'm looking for something with the following features:
>
> 1) Must scan the files for dependencies.
>

The makefile generator does this, scanning all files for include
statements. Will only follow includes to local files, i.e. it will
NOT mark as a dependency stdio.h for instance.

> 2) Results from 1 must be safed so that not each invokation is doing a
> complete scan because the files may be on a NFS with slow connections.
>

They are saved in a text file with a special format that includes the
date.

> 3) Should do a preprocessing run and check if there are real changes.
> If i change code
>

That is possible but it would slow down considerably the tool. Keep in
mind that we are speaking about LARGE projects here.

> 4) Collects compile optinos in a database/central location so i don't
> need to set them in a lot of
> build files.
>

I collect the compile options from lcc-win IDE. This could be
configured.

> 5) Works well with multiple CPU's/Core's and ideally detects the
> number of available CPU's
> automatically. Running it on a nightly build machine with 1 cpu or a
> developer machine with 8.
>

This could be added if you wish.


> 6) As 5 suggests. I need a good split into independent dependency
> targets. Aka "make -j"
>

No problems with that

> 7) Does not need huge requirements to work: No Java solution (and no
> Perl). ANSI C with a few Posix/Plattform Hacks would be best. But ruby
> or python based are also okay.
>

The tools is written in ANSI C.

> 8) Helps me to avoid autoconfig/automake hell.
>

This depends from your specs.


> 9) Available on WinXP/WinVista/FreeBSD/Linux/NetBSD/OpenBSD/Solaris/HP-
> UX/MacOSX is required. All in 32 and 64 bit modes (BSD's and Linux
> will hot have a 32 bit library installed)
>

As I told you above all is written in portable C and is available under
Unix, windows, and AIX.


> 10) Fast.
>

It is fast, but if you want preprocessing for detection of actual code
changes and not just comment change or white space modifications it will
be slow. No miracles, unles you have an infinite budget.

> 11) Little typing.
>

Yes. No typing at all.

> I heared about jam and will start reading the docs tomorrow. So please
> comment. I only worked with make in the past.

Contact me for prices and delivery dates. Note that this is no free
tool. You will get the source code and the finished tool under windows
and linux.


--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32

Laurent Deniau

unread,
Dec 10, 2008, 8:59:30 AM12/10/08
to
On 9 déc, 23:21, scholz.lot...@gmail.com wrote:
> What is the best build tool for somebody who want to get rid of make.
> I'm looking for something with the following features:

I should say that a couple of months ago I had exactly the same
question for my COS project except that I had one more strong
constraint that none of the existing tools could fulfill (AFAIK)
except make itself...

I wanted to provide not only makefiles to configure, build and install
COS but also for the future COS' users projects (to simplify, COS
needs a two-steps linking phase). The goal was to help them to write
their own project makefiles on top of the COS makefiles very easily.
The result is that COS does not come only with headers and libs (COS
is a C library), but also with makefiles that you can find in

http://cos.cvs.sourceforge.net/viewvc/cos/CosBase/include/cos/

prologue
epilogue
mak/*
cfg/*

It requires gmake which is very efficient and portable. It focus on
COS but the structure is very flexible and it could even be simplified
for "normal" C projects. A user makefile looks like

include cos/prologue

program = myprog

include cos/epilogue

Almost all the rules and variables are configurable either by setting
lowercase variables equivalent to their uppercase version used
internally or by defining pre and post rules rule.pre and rule.post
for rules that you want to customize. As I said, COS itself uses these
makefiles despite of its particular needs. Actually I only have access
to various Linux and MacOsX but the cfg/* files are very similar to
the POCO (C++ POrtable COmponents) config makefiles which is available
on many platforms. It is able to build debug, profile and release
version (all by default), archive and shared libraries (all by default
if available on the platform), manage testsuites and is multi-
platform.

From 1st Paul's rules about GNU make:
"Don't hassle with writing portable makefiles, use a portable make
instead!"

What is nice with gmake, is that you can extend the rules easily, no
black magic. If you need more functionalities, you can use the gmsl
(GNU make standard library) which basically provides the functions
found in perl/python/etc alternatives.

Hence hereafter I consider gmake

> 1) Must scan the files for dependencies.

this is more related to compilers options for automation, and a simple
rule does the job for including properly automatic dependencies
computation.

I haven't seen any problem with gmake there.

> 2) Results from 1 must be safed so that not each invokation is doing a
> complete scan because the files may be on a NFS with slow connections.

no idea if gmake is slow on that point but locally, its pretty fast.

> 3) Should do a preprocessing run and check if there are real changes.
> If i change code

a simple rule using md5 or equivalent does the job on top of
dependencies

> 4) Collects compile optinos in a database/central location so i don't
> need to set them in a lot of
> build files.

in my case, installed with COS in include/cos/cfg/*

easily customizable either for global use or on a per project basis.

> 5) Works well with multiple CPU's/Core's and ideally detects the
> number of available CPU's
> automatically. Running it on a nightly build machine with 1 cpu or a
> developer machine with 8.

gmake ?

> 6) As 5 suggests. I need a good split into independent dependency
> targets. Aka "make -j"

gmake ?

> 7) Does not need huge requirements to work: No Java solution (and no
> Perl). ANSI C with a few Posix/Plattform Hacks would be best. But ruby
> or python based are also okay.

idem for me ;-)

> 8) Helps me to avoid autoconfig/automake hell.

I don't like the autoconf approach.

> 9) Available on WinXP/WinVista/FreeBSD/Linux/NetBSD/OpenBSD/Solaris/HP-
> UX/MacOSX is required. All in 32 and 64 bit modes (BSD's and Linux
> will hot have a 32 bit library installed)

my makefiles assume a moderately compliant posix environment (since
make relies on sh).

> 10) Fast.

gmake ?

> 11) Little typing.

3 lines for common C project

> I heared about jam and will start reading the docs tomorrow. So please
> comment. I only worked with make in the past.

Well, if you find some tools which are as simple and powerful as
gmake, widely available and widely known by C programmers and which
allows to provide customizable templates for users project (very
important), I will also be interested. I am not sure that the result
would be more flexible, simpler or shorter than my makefiles but I
would gave it a try.

a+, ld.

0 new messages