[petsc-dev] make -f gmakefile test needs a proper help message of some sort

Jed Brown jed at jedbrown.org
Sun Jun 18 11:48:38 CDT 2017


Lisandro Dalcin <dalcinl at gmail.com> 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 <jed at jedbrown.org> wrote:
>> Barry Smith <bsmith at mcs.anl.gov> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170618/dfdf6a1d/attachment.sig>


More information about the petsc-dev mailing list