On Sat, Aug 18, 2012 at 8:31 PM, Rakesh Sharma <[email protected]>wrote:
> then when an invalid target is specified, make should just run the "make
> help" target.
>
This isn't quite what you want but might still be useful:
########################################################################
# A simple help facility, taken from "Managing Projects with GNU Make,
# Third Edition":
.PHONY: list-targets
list-targets-noop:# don't ask
list-targets:
@$(MAKE) --print-data-base --question list-targets-noop | \
grep -v -e '^no-such-target' -e '^makefile' | \
awk '/^[^.%][-A-Za-z0-9_]*:/{ print substr($$1, 1, length($$1)-1) }'
| \
sort | \
pr --omit-pagination --columns=2
--
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make