Hello, I've made a POSIX sh/make build system in order to ditch GNU make. Its
only dependency is mktemp(1), which is available almost everywhere and can be
written in few lines of C with mkstemp(3) if not.
Here's an excerpt from the README:


For some time, I've been using GNU make with all its features to allow for some
complex operations. But after a while I noticed that GNU make was just (poorly)
trying to fuse POSIX make with sh, while not being as good as both.

So here's an almost (see Dependencies) POSIX compliant build system built on
POSIX sh and POSIX make. Here are some features it has:
    * Proper install/uninstall without needing install(1) nor readlink(1) -f to
      normalize PREFIX.
    * Simple runtime path rewriting for sh(1) scripts, allowing for inplace and
      installed use alike.
    * A compiler flag detector.
    * With the aforementioned detector, easy handling of LTO and PGO for both
      gcc and clang.
    * Some more compilation variables like NATIVE and STATIC or flag presets in
      the form of CONFIG.
    * Gperf and lex files handling (note: a `file.lex` or `file.gperf` is
      expected to produce a `file.c`, because SUFFIX rules don't allow for
      `file.lex.c`).
    * No macro/environment mess like make, we only use the environment since
      it's a nice builtin associative array and one that is automatically
      passed to subprocesses.
    * Since it's sh, it's as extensive as it should be, no need to bolt so much
      on make, and with a different syntax to boot.


If this can help other people rolling complicated makefiles, I guess it could
be nice. Criticism is welcome.


Regards,
Hadrien Lacour

Reply via email to