]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: makefile: don't display a dummy features list without a target
authorWilly Tarreau <w@1wt.eu>
Wed, 24 May 2023 13:59:04 +0000 (15:59 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 24 May 2023 14:23:24 +0000 (16:23 +0200)
"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.

Makefile

index 115dd553b9c90ac1fa8ffdebea2de83dcd96f7a1..e51a0c3ca7ea579fb9d4705503ab14175726302e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -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