I have made a small update to the jprint branch of my experimental GNU make
fork.

https://github.com/tnmurphy/gmake-experimental.git

jprint is patch to make that allows you to print out the make database in
json format such that it's relatively easy to parse with a top-level
structure like so:
  {
  "Makefile": [
    "directories",
    "files",
    "rules",
    "variables"
  ]
}
You can already print the database out in a form that make itself can
re-read but all the effort to parse it is left up to the user - json is
much easier to use.

The Update:
* You can now specify the base output filename with an environment
variable: MAKE_JSON_BASE.   This creates files named
$MAKE_JSON_BASE-XXX.json where XXX is the PID of the make or submake that
generated the output.
* It also writes an index file now - perhaps unnecessary - but this should
allow the implementation of a feature to join up the output later:
$MAKE_JSON_BASE.idx
* The status of tasks now includes whether or not they succeeded or would
have been executed (in the case of -q or quiet builds)

What's still not done:
Directories are not dumped in json - this is a bit of a pain but I will get
to it when I'm desperate and there's absolutely nothing easy or fun left to
do :-).

Best regards,

Tim Murphy

Reply via email to