[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Build System links/ recommendations

From: Robin Green
Subject: Re: [Gnu-arch-users] Build System links/ recommendations
Date: Sun, 29 Aug 2004 02:23:53 +0100
User-agent: Mutt/1.4.1i

On Sun, Aug 29, 2004 at 06:41:39AM +1000, Zenaan Harkness wrote:
> I actually came across fastdep because I spent some time trying to
> create a build system for C++ (while I was learning a little last
> year between jobs), that was comparable to Java - essentially,
> namespaces corresponding to Java "packages", which also correspond
> to directories. In Java, it is nicely scalable, and the Java compiler
> makes it all Just Work (TM).

Actually, it doesn't always (unless it's been fixed). If A depends on B
and B inherits from C, and you change C and then recompile A, javac won't
notice that you changed C. This can cause bugs - occassionally some *very*
strange bugs. (Specifically, these days the Sun VM tends to react sanely
to incompatible class changes by throwing an exception, but some
third-party tools do weird stuff.)

The javac -depend flag was supposed to fix that, but it was dropped in the
"modern" compiler. I think it didn't work properly.

Anyway, I have a rather home-made idiosyncratic build system, "autobob",
which works by rebuilding entire components (usually Java components) one at a
time, and erring on the side of rebuilding if there is any doubt at all
about the need to rebuild. So you avoid that javac issue completely, at the
cost of some efficiency.

Quick list of some of my system's differences with ant and make:

1. Faster than ant in some scenarios

2. Made of shell scripts so not much new syntax to learn

3. Made of shell scripts so you can do more powerful stuff, more easily,
than with ant - and it's easy to customise, both by editing scripts and
by setting environment variables (at any of three scopes: user-wide
environment, project-wide environment, or just one process tree).
The overriding mechanism needs work though.

4. Doesn't have the "tab problem" of Makefiles which annoys some people.

5. There is no "make clean". Cleaning is done by default before every
build. You type "build" to force a build (the default) and "build --if-needed"
to only build if something has changed. The default run scripts for Java 
apps call "build --if-needed" so you don't even have to type build after
you change something.

6. If you neglect to run configure, a default _hardwired_ configuration is
written out automatically (educated guessing like in autoconf is not
supported yet).

7. Build-time dependencies, in Java at least, only have to be specified
once (not twice like in ant).

But it was just hacked up to scratch an itch and is only a few lines of
shell code, so it doesn't really do much at all really. It works for my
simple needs though.


Attachment: pgpicylwv_ZyO.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]