CLEANUP: makefile: don't display a dummy features list without a target

"make help" ends with a list of enabled/disabled features for TARGET '',
which makes no sense. Let's only display enabled/disabled features when
a target is set. It also removes visual pollution when users seek help.
This commit is contained in:
Willy Tarreau 2023-05-24 15:59:04 +02:00
parent f1df006ffe
commit 060769836e

View file

@ -958,16 +958,16 @@ help:
else \
echo "Current TARGET: $(TARGET) (custom target)"; \
fi; \
echo;echo "Enabled features for TARGET '$(TARGET)' (disable with 'USE_xxx=') :"; \
set -- $(enabled_opts); echo " $$*" | (fmt || cat) 2>/dev/null; \
echo;echo "Disabled features for TARGET '$(TARGET)' (enable with 'USE_xxx=1') :"; \
set -- $(disabled_opts); echo " $$*" | (fmt || cat) 2>/dev/null; \
else \
echo "TARGET not set, you may pass 'TARGET=xxx' to set one among :";\
echo "TARGET not set, you should pass 'TARGET=xxx' to set one among :";\
echo " linux-glibc, linux-glibc-legacy, solaris, freebsd, dragonfly, netbsd,"; \
echo " osx, openbsd, aix51, aix52, aix72-gcc, cygwin, haiku, generic,"; \
echo " custom"; \
fi
@echo;echo "Enabled features for TARGET '$(TARGET)' (disable with 'USE_xxx=') :"
@set -- $(enabled_opts); echo " $$*" | (fmt || cat) 2>/dev/null
@echo;echo "Disabled features for TARGET '$(TARGET)' (enable with 'USE_xxx=1') :"
@set -- $(disabled_opts); echo " $$*" | (fmt || cat) 2>/dev/null
# Used only to force a rebuild if some build options change, but we don't do
# it for certain targets which take no build options