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

Lisandro Dalcin dalcinl at gmail.com
Sun Jun 18 05:07:38 CDT 2017


Not perfect, my need more work, but this is possible way of
implemented "make help <target>"

$ 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



More information about the petsc-dev mailing list