Makefile: First try at rewriting the ccan Makefile.
This change contains a simpler Makefile replacement with only 62 lines
of directives, 10 rules, and a 13 line support script for dependencies. The
build dependencies have been minimised and in some cases, corrected.
FEATURES:
* All targets can be built from a clean tree in one invocation.
* Parallel builds (tested with -j32 on 8 cores).
* Auto discovery of modules via _info files.
* Hopefully complete dependencies via a simplified generator.
* CFLAGS are respected and appended to compile flags.
* LINTFLAGS can be set to add check options (e.g. LINTFLAGS=-v).
* 'make clean' doesn't build anything before cleaning now.
* 'make quiet=1' builds quietly. 'make check quiet=1 -j N' produces
summary output like the former summary target.
* Non-phony test targets; tests are rebuilt only when dirty. Targets are:
check, fastcheck and fullcheck, the latter runs in non-summary mode.
* 'make <module>.[check|fastcheck|fullcheck]' runs tests for single modules.
TODO:
* Support Makefile-web and any other scattered targets
NOTES:
* The changes to dependency generation expose a circular
dependency between asort and order which is not fixed here.
* Tests always run their dependent tests. With -j support and
minimised rebuilds via tighter dependencies, its not worth avoiding.
* Some targets have been dropped as uneeded (e.g. distclean, tools).
Signed-off-by: Jon Griffiths <jon_p_griffiths@yahoo.com>
Showing
Makefile-ccan
deleted
100644 → 0
tools/Makefile
deleted
100644 → 0
tools/gen_deps.sh
0 → 100755
Please register or sign in to comment