Make replacement for Erlang - suggestions?

Matthias Lang <>
Wed Sep 18 16:29:33 CEST 2002


Luke Gorrie writes:

 > I read that paper (Recursive Make Considered Harmful) a ways back and
 > it didn't make much of an impression. 
[...]
 > I did find it a bugger to code. There appear to be some tricks, 
 > but they don't seem very widely known.

I hadn't seen the paper until now. It raised some interesting points,
though I'm suspicious because

  - 'make' systems are a very soft target. Lots of strange rules to
    make them work around all sorts of local problems makes them
    inherently ugly.
 
  - the author comes from Canberra, which is basically chock-full of
    people peddling "simple" solutions to complex problems
	
  - I can't find any advice on the WWW for "how do I actually make
    this work"

An example: in the source tree for one of our products, there are at
least three different ways to turn a .c file into a .o file, depending
on whether the object code is meant to run on the target board's CPU,
the DSP or on the build system.

I currently deal with this by keeping code intended for different
compilers in different directories. In one Makefile I might have

  %.o: %.c
       $(CC)  $(CFLAGS) -c $<

while in another I might have

  %.o: %.c
       $(PPC_CC) $(PPC_CFLAGS) -c $<

I can't think of a sensible way to do this in a combined makefile,
with or without include files. Maybe I've missed something obvious.

Matt



More information about the erlang-questions mailing list