Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Commit

Permalink
chore(makefile): improve help command
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackHole1 committed Oct 30, 2023
1 parent 8f6288d commit 7c89860
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ UNAME := $(shell uname -s)
AWK := awk
ifeq ($(UNAME), Darwin)
AWK = gawk
ifeq (, $(shell which gawk 2> /dev/null))
$(error "gawk not found")
endif
endif

CODESIGN_IDENTITY ?= -
Expand Down Expand Up @@ -97,6 +94,11 @@ clean: ##@ Clean all build files

help: ##@ (Default) Print listing of key targets with their descriptions
@printf "\nUsage: make <command>\n"
@if [[ -z $(shell which $(AWK) 2> /dev/null) ]]; then \
printf "$(AWK) not found\n"; \
exit 1; \
fi; \

@grep -F -h "##@" $(MAKEFILE_LIST) | grep -F -v grep -F | sed -e 's/\\$$//' | $(AWK) 'BEGIN {FS = ":*[[:space:]]*##@[[:space:]]*"}; \
{ \
if($$2 == "") \
Expand Down

0 comments on commit 7c89860

Please sign in to comment.