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

Re: autoconf help?



Keith Lucas wrote:

>>Interesting indeed. But I wonder why this is the case - make itself
>>doesn't do that much compared to the compiler...
>
>http://www.pcug.org.au/~millerp/rmch/recu-make-cons-harm.html
>
>"Recursive Make Considered Harmful"
>
>I read it. It made sense.

It makes sense, but only if you accept his preconditions. In particular the
example project's directory layout:

Project/
  Makefile
  module1/
    Makefile
    main.c
  module2/
    Makefile
    parse.c
    parse.h

This in itself isn't bad, but the real point (on which also his entire
argumentation is based) is that parse.h is included by (obviously) parse.c
*and* by main.c
In this situation the above directory layout is complete crap. Something
like this would solve the problem:

Project/
  Makefile
  include/
    Makefile
    parse.h
  module1/
    Makefile
    main.c
  module2/
    Makefile
    parse.c

Although this layout is "bigger" than the first one, it imposes a good deal
less problems on the build system, simply because all headers that are
needed by more than 1 module are in a central place.

This also explains why I didn't see any speed problems (regarding "make"
that is) with the LibPenguinPlay build system, which has the following dir
layout (simplified):

include/
  Makefile
  header1.h
  ...
src/
  Makefile
  utility1.cpp
  ...
  PenguinFile/
    Makefile
    pfsource1.cpp
    ...
  PenguinSound/
    Makefile
    pssource1.cpp
    ...
  tests/
    Makefile
    testsrc1.cpp
    ...


	Christian
-- 
Christian Reiniger
Coordinator/Coder, PenguinPlay (http://sunsite.auc.dk/penguinplay/)
Coordinator,       LGDC        (http://sunsite.auc.dk/lgdc/)

Drive C: not found (A)bort (R)etry (P)arty because you have Linux installed

---------------------------------------------------------------------
To unsubscribe, e-mail: linuxgames-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: linuxgames-help@sunsite.auc.dk