Skip to content

Commit

Permalink
Corrige make help sur MacOS
Browse files Browse the repository at this point in the history
- head ne supporte pas un nombre négatif de lignes
- column affiche "(null)" pour les lignes vides
  • Loading branch information
philippemilink authored and Situphen committed Jan 21, 2023
1 parent fe00164 commit 1a70d23
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ start-publication-watchdog: ## Start the publication watchdog
help: ## Show this help
@echo "Use 'make [command]' to run one of these commands:"
@echo ""
@fgrep --no-filename "##" ${MAKEFILE_LIST} | head -n '-1' | sed 's/\:.*\#/\: \#/g' | column -s ':#' -t -c 2
ifeq ($(shell uname), Darwin)
@fgrep --no-filename "##" ${MAKEFILE_LIST} | tail -r | tail -n +3 | tail -r | sed 's/\:.*\#/\: \#/g' | column -s ':#' -t -c 2 | sed 's/(null)//g'
else
@fgrep --no-filename "##" ${MAKEFILE_LIST} | head -n '-2' | sed 's/\:.*\#/\: \#/g' | column -s ':#' -t -c 2 # assume GNU tools
endif
@echo ""
@echo "Open this Makefile to see what each command does."

0 comments on commit 1a70d23

Please sign in to comment.