Re: [PATCH] Makefile: implement help target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> writes:

> How's this for a version without maintenance issues?

Something along these lines would be closer to what I had in mind,
actually.

Traditionally a multi-line sed command embed in Makefile has been
portability nightmare, which is a bit worrysome.

Isn't there a "makedoc" ala "perldoc" or "javadoc", by the way?

> ...
> +#H# Show help for main make targets
> +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
> -- 
> 1.7.3.98.g5ad7d
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]