[comp.unix.questions] Imakefile - what is it?

crouch@toadflax.axion.bt.co.uk (the man whose head expanded) (01/09/89)

Some of the sources posted recently have included an Imakefile. What is
this, and how do you use it to generate a Makefile?

		Chris Rouch

--------------------------------------------------------------------------
crouch@axion.bt.co.uk                RT3124, BTRL, Martlesham Heath, Ipswich
				     +44 473 646093

A woman drove me to drink, and I never even had the courtesy to thank her

jim@expo.lcs.mit.edu (Jim Fulton) (01/11/89)

> Some of the sources posted recently have included an Imakefile. What is
> this, and how do you use it to generate a Makefile?

Imakefiles are machine-independent (for the most part) descriptions of build
sources and targets using macro functions instead of hardcoded sequences of
commands.  The "imake" program written by Todd Brunhoff uses a template and set
of macro rules describing the appropriate commands for this machine to generate
Makefiles from Imakefiles. 

The advantage is that it gives you portability (Makefiles aren't portable
unless you go to some pretty extreme lengths) and configurability (you can
change all of your Makefiles from a single file).  Once you get used to it
(which, admittedly, takes some doing), it is much easier to deal with than
Makefiles. 

You can get sources for imake and a sample template and set of macro rules from
MIT releases of the X Window System.  Without it, X wouldn't be nearly as easy
to configure and port to new platforms (including operating system revs). 

					Jim Fulton
					X Consortium
					MIT Laboratory for Computer Science
					jim@expo.lcs.mit.edu