Print the available targets and variables along w/ their docs
bmakelib should contain a target to list all available targets along w/ their documentation.
For example:
$ make bmakelib.help
TARGETS
-------
foo: foo inline docs
bar: bar inline docs
baz: no documentation available
VARIABLES
---------
X: no documentation available
Y: Y inline docs
I would kill for this feature.
It shouldn't be too difficult w/ a bit of Perl magic. However, we'd need to make a compromise and only support certain ways of documenting targets.
I'm not sure what could be considered a common style(s) of that.
I'm seen people do
foo: ## lorem ipsum dolor
or
# lorem ipsum dolor
foo:
and there's also my personal style using Markdown. for an example see https://github.com/bahmanm/bmakelib/blob/4108d438d54cfbfcdc422bddf4a62ffd5c8f84c4/src/bmakelib.mk#L17
#######################################################################
#>
# # foo
#
# Lorem ipsum dolor.
# Aliquam diam sapien, suscipit ac ligula a, cursus tempus ante.
#<
#######################################################################
foo :
For the first version, I think as soon as we choose which style is the preferred one, I can get started w/ this.