Thread (8 messages) flat view 8 messages, 7 authors, 2016-06-15

Re: [PATCH] Makefile: implement help target

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:49:38

Possibly related (same subject, not in this thread)

On Tue, Sep 28, 2010 at 14:44, Michael J Gruber
[off-list ref] 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.
+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"; \
+       done
Looks good, but --key=2 isn't in POSIX.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help