Lisandro Dalcin <[email protected]> writes: > Not perfect, my need more work, but this is possible way of > implemented "make help <target>"
Too clever, IMO. Tab completion works, so make help<TAB> would offer help-test, help-install, etc. > $ cat makefile > all: > check: > test: > install: > > help-all: > @echo Build > help-check: > @echo Check > help-test: > @echo Test > help-install: > @echo Install > > ifeq (help,$(findstring help,$(MAKECMDGOALS))) > help-goals = $(filter-out help,$(MAKECMDGOALS)) > help-targets = $(help-goals:%=help-%) > $(help-goals): SHELL = /bin/true > help: $(help-targets) > .PHONY: help > endif > > > $ make help install > Install > make: Nothing to be done for 'install'. > > On 18 June 2017 at 02:53, Jed Brown <[email protected]> wrote: >> Barry Smith <[email protected]> writes: >> >>> make -f gmakefile test XXXX >>> >>> appears to be a very powerful tool, as such it needs a useful help message >>> since it is next to impossible to know where to look to find all its >>> options. >>> >>> make -f gmakefile test help=1 >> >> This is more-or-less a convention: >> >> make -f gmakefile help > > > > -- > Lisandro Dalcin > ============ > Research Scientist > Computer, Electrical and Mathematical Sciences & Engineering (CEMSE) > Extreme Computing Research Center (ECRC) > King Abdullah University of Science and Technology (KAUST) > http://ecrc.kaust.edu.sa/ > > 4700 King Abdullah University of Science and Technology > al-Khawarizmi Bldg (Bldg 1), Office # 0109 > Thuwal 23955-6900, Kingdom of Saudi Arabia > http://www.kaust.edu.sa > > Office Phone: +966 12 808-0459
signature.asc
Description: PGP signature
