About tmake

# Building should be this easy
Executable --install=/usr/local/bin awesome *.c

tmake is a proof-of-concept, advanced build system that is usable for small to medium sized projects (< ~10,000 source files) with the following features:

  • Build descriptions are succinct and declarative
  • A real language for build descriptions (Tcl) and build actions, with simple conditional syntax
  • Rules can create multiple files
  • Multi-stage reparsing allows build configurations to be generated and reloaded (e.g. via configure or kconfig)
  • Build system metadata cache allows for:
    • Rebuilding if build commands change
    • Rebuilding if the target is to be built by a different rule
    • Hash-based determination of changed sources
    • Rules that don't update the build target
    • Cleaning orphan targets
    • Cached dynamic dependencies
  • Easily supports "generators" that generate sources, including header files
  • Dynamic dependency support, including caching dependencies and support for generated files
  • Excellent debugging facilities to identify exactly what is occuring and why
  • 'tmake --find' to find specific rules
  • Builds are out-of-tree
  • Supports (optional) wildcarding for specifying sources
  • Non-recursive
  • Automatic creation of directories as required
  • Common operations (mkdir, rm) can be done without forking a process
  • Add additional dependencies, bound vars, etc. to existing rules
  • tmake --genie for fast-start
  • Requires jimsh, the Jim Tcl interpreter to run (but it is possible to include a single-file bootstrap implementation that auto-builds with a C compiler)

Essentially almost everything listed here: http://www.conifersystems.com/whitepapers/gnu-make/ is addressed.

Simple things are simple

Consider the following example of building a library and an executable that links against the library. The build description is simple, succinct and has a minimum use of punctuation.

# Set CFLAGS for all subsequent sources
CFlags -DPOLARSSLTEST

# Build a library from sources
Lib polarssl {
     aes.c arc4.c asn1parse.c asn1write.c base64.c bignum.c camellia.c
     certs.c cipher.c cipher_wrap.c ctr_drbg.c debug.c des.c dhm.c
     entropy.c entropy_poll.c error.c havege.c md.c md_wrap.c md2.c
     md4.c md5.c net.c padlock.c pem.c pkcs11.c rsa.c sha1.c sha2.c
     sha4.c ssl_cli.c ssl_srv.c ssl_tls.c timing.c version.c
     x509parse.c x509write.c xtea.c
}

# Automatically links against polarssl and 'tmake install' will
# strip and install to /usr/local/bin
Executable --strip --install=/usr/local/bin polarssl main.c

Where to start?

The results of the search are