• Jon Griffiths's avatar
    Makefile: First try at rewriting the ccan Makefile. · 2ee3b7c5
    Jon Griffiths authored
    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: default avatarJon Griffiths <jon_p_griffiths@yahoo.com>
    2ee3b7c5
gen_deps.sh 1.05 KB