build(Makefile): make help produces usable output.
This commit is contained in:
parent
1a5564031d
commit
bb57451cbc
2
Makefile
2
Makefile
@ -26,7 +26,7 @@ export DEV_PORT_HTTPS
|
|||||||
.PHONY: help
|
.PHONY: help
|
||||||
# HELP: print out this help message
|
# HELP: print out this help message
|
||||||
help:
|
help:
|
||||||
@echo "Nothing to see here, go away"
|
@utils/makehelp.pl Makefile
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
# HELP: unfinished
|
# HELP: unfinished
|
||||||
|
|||||||
@ -5,6 +5,7 @@ use warnings;
|
|||||||
|
|
||||||
my %msg = ();
|
my %msg = ();
|
||||||
my @start = ();
|
my @start = ();
|
||||||
|
my %reorder = (help=>-1);
|
||||||
|
|
||||||
READ: while(<>) {
|
READ: while(<>) {
|
||||||
if(m/^# HELP HEADER START/) {
|
if(m/^# HELP HEADER START/) {
|
||||||
@ -34,7 +35,7 @@ READ: while(<>) {
|
|||||||
|
|
||||||
print "$_\n" for @start;
|
print "$_\n" for @start;
|
||||||
print "\n" if @start;
|
print "\n" if @start;
|
||||||
for my $tar(sort keys %msg) {
|
for my $tar(sort {($reorder{$a}||0) <=> ($reorder{$b}||0) || $a cmp $b } keys %msg) {
|
||||||
print "$tar\n $msg{$tar}\n\n"
|
print "$tar\n $msg{$tar}\n\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user