fix: make help on Ubuntu 22.04

Ubuntu 22.04 uses make 4.3 which broke the current `make help` target
Reference:
https://stackoverflow.com/a/26339924

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
This commit is contained in:
Beniamino Pozzan 2024-08-18 10:09:29 +01:00 committed by Daniel Agar
parent f2f4488594
commit 98eae3cd4c

View File

@ -557,7 +557,7 @@ help:
@echo "Usage: $(MAKE) <target>"
@echo "Where <target> is one of:"
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | \
awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | \
awk -v RS= -F: '/(^|\n)# Files(\n|$$)/,/(^|\n)# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | \
egrep -v -e '^[^[:alnum:]]' -e '^($(subst $(space),|,$(ALL_CONFIG_TARGETS)))$$' -e '_default$$' -e '^(Makefile)'
@echo
@echo "Or, $(MAKE) <config_target> [<make_target(s)>]"