forked from cory/tildefriends
build: Redid this thing in sed to make it work on more platforms.
This commit is contained in:
parent
740d788c7c
commit
aa40084010
14
GNUmakefile
14
GNUmakefile
@ -7,8 +7,8 @@ MAKEFLAGS += --no-builtin-rules
|
|||||||
##
|
##
|
||||||
## This is a list of all supported build targets.
|
## This is a list of all supported build targets.
|
||||||
##
|
##
|
||||||
## Note: Consider passing -j$(nproc) or adding it to your $MAKEFLAGS to build
|
## Consider passing -j$(nproc) or adding it to your $MAKEFLAGS to build in
|
||||||
## in parallel (faster).
|
## parallel (faster).
|
||||||
##
|
##
|
||||||
## Useful variables to override:
|
## Useful variables to override:
|
||||||
## [35mCC[m Compiler.
|
## [35mCC[m Compiler.
|
||||||
@ -1245,12 +1245,10 @@ clean: ## Clean all generated files from the out/ directory.
|
|||||||
## Documentation:
|
## Documentation:
|
||||||
##
|
##
|
||||||
help: ## Display this help message.
|
help: ## Display this help message.
|
||||||
@gawk -vG=$$(tput setaf 2) -vR=$$(tput sgr0) ' \
|
@awk -F: ' \
|
||||||
match($$0, "^(([^#:]*[^ :]) *:)?([^#]*)##([^#].+|)$$",a) { \
|
/^##/ { sub(/^##\s?/, ""); print $$0 } \
|
||||||
if (a[2] != "") { printf " make %s%-22s%s %s\n", G, a[2], R, a[4]; next }\
|
/^\w+: .*##/ { sub(/^/, "[36;1m"); sub(/:.*##\s?/, "[m:"); printf "%-32s %s\n", $$1, $$2 } \
|
||||||
if (a[3] == "") { print a[4]; next }\
|
' < $(filter-out %.d,$(MAKEFILE_LIST))
|
||||||
printf "\n%-36s %s\n","",a[4]\
|
|
||||||
}' $(filter-out %.d,$(MAKEFILE_LIST))
|
|
||||||
@echo "" # Blank line.
|
@echo "" # Blank line.
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
.DEFAULT_GOAL := help
|
.DEFAULT_GOAL := help
|
||||||
|
Loading…
x
Reference in New Issue
Block a user