Hey all,
I wanted to share that bmakelib v0.9+, released a couple of weeks ago,
includes a feature you may find useful: automated self-documenting
Makefiles without the usual recipe boilerplate.
Instead of writing awk or sed, you document targets and variables
inline with double-hash comments (##), and bmakelib automatically
extracts and categorises them into a nice and neat help screen across
scopes.
For instance, given the following Makefile:
-include .bmakelib/bmakelib.mk
PREFIX ?= /usr/local ## Base installation path
ENVIRONMENT ?= dev ## Target runtime environment (dev|staging|prod)
build: ## Compile and package distribution artefacts
@echo "Building for $(ENVIRONMENT)..."
This is what you get out of the box:
$ make help
==========================================================
LOCAL: defined inside the source tree
==========================================================
TARGETS
build Compile and package distribution artefacts
VARIABLES
ENVIRONMENT Target deployment environment (dev|staging|prod)
PREFIX Base installation path
Looking forward to your thoughts and feedback.
https://github.com/bahmanm/bmakelib
--
Bahman Movaqar
Problem solver & Software engineer
BahmanM.com & github.com/bahmanm