From: john@physiol.su.OZ.AU (John Mackin)
Subject: Re: Shake -- A Makefile Generator
Followup-To: aus.followup
Organization: Department of Physiology, University of Sydney, NSW, Australia
Date: Sat, 19 Dec 1992 05:01:07 GMT

In article <mwp.724647291@iconix.oz.au>,
	mwp@iconix.oz.au (Michael Paddon) writes:

> Shake is a macro processor that builds makefiles. Unlike imake,
> the macros are defined as arbitrary shell scripts, allowing much
> smarter and more flexible directives.

I wouldn't want anyone to misunderstand this article.  I don't intend
to slag off at Michael's tool (which I haven't looked at).  (Although
I am _delighted_ to slag off at imake...)  The problem with this approach
is that the bottom level is still "make".  That means you get all of
make's `features' as a free extra bonus, and some of those are just
the features you don't want.  Especially since make is a hot favourite
for hacking by vendors, who almost always break it in interestingly
obscure ways.

So I thought this would be a good opportunity to remind people of
Zoltan Somogyi's wonderful tool "cake".  It replaces make.  It isn't
backward compatible.  I suppose that might be the reason it hasn't
aroused more interest since its posting in, what was it, well some
years ago anyway: see your local comp.sources.unix archive, Volume
12, Issues 7 through 15.  It's a wonderful program; I can't recommend
it highly enough.  You'll never go back to make-based tools.  One
dream I have had for a while is to automate X Imakefile to Cakefile
conversion...

And yes, it does use the dreaded cpp, but it's so wonderfully flexible
that when you need real macro processing (i.e., m4) it's very easy
to get that automatically in the loop as well.

You _can_ have your cake and eat it too.

Here is the description of cake from the first part of the posting:

Cake is a rewrite of make from the ground up. The main difference is one
of attitude: cake is considerably more general and flexible, and can be
extended and customized by the user to a much greater extent. It is applicable
to a wide range of domains, not just program development: for example, standard
cakefiles exist to handle documents and VLSI designs.

The main differences between make and cake:

-	Cake dependencies may be dynamic, and their applicability may be
	conditional upon a test.

-	Cake rules have the same syntax and semantics as ordinary dependencies,
	and may more than one target.

-	There are no restrictions on the forms of either the targets or the
	sources. This enables cake to handle files in more than one directory
	and to interface with SCCS, RCS and archivers, among others, without
	any special arrangements.

-	Cake has a more general search algorithm than make. When seeking a
	target it considers all rules which could update it even if the
	corresponding intermediate files do not exist; it recreates them
	if (and only if) it is necessary to do so.

-	Cakefiles are passed through the C preprocessor. They may therefore
	#include other cakefiles (including standard ones) and use #if and
	#ifdef to customize themselves.

-	Cake allows the user to choose his own shell, and to include shell
	scripts in actions.

-	Cake can check to see if a newly 'updated' file has actually been
	changed via a byte-by-byte comparison, which works even if the modify
	date has been touched. If there is no change, cake avoids recomputing
	the file's dependents.

-	Cake has a lot more options (whether one considers these an improvement
	of course depends on whether one needs them).

Cake is not backwards-compatible with make.


-- 
John Mackin <john@civil.su.oz.au>
Knox's box is a 286.                 Fox in Socks does hacks and tricks
Knox's box is hard to fix.           To fix poor Knox's box for kicks.
Newsgroups: aus.archives