Re: [PATCH] Makefile: implement help target
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Sep 28, 2010, 14:54 UTC
- Message-ID
- <AANLkTi=Z1HZDS=Cb4+zx7h95cgbOz7_KyTc5LGTD1jvw@mail.gmail.com>
- In-Reply-To
- <c16e8df7c8e9b562ce0e6cd6e543a83779cd2b25.1285684868.git.git@drmicha.warpmail.net>
On Tue, Sep 28, 2010 at 14:44, Michael J Gruber <git@drmicha.warpmail.net> wrote:
> +#H# Check test coverage and create HTMl report
HTML, not HTMl
> cover_db_html: cover_db > cover -report html -outputdir cover_db_html cover_db > + > +#H# Show help for main make targets
How about something less opaque, like "# Help: Show help [...]" or "# About:". It would serve the same purpose as #H#, without the reader wondering what that odd string means.
Show 7 quoted lines
> +help:
> + @sed -n -e '/^#H#/ {N'\
> + -e 's/^#H# \(.*\)\n\([a-z0-9_-]*\):.*/\2 \1/p'\
> + -e '}' <Makefile | sort --key=2 | while read target txt;\
> + do \
> + printf "%-20s: %s\n" "$$target" "$$txt"; \
> + doneLooks good, but --key=2 isn't in POSIX.