]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: makefile: do not use echo -n
authorWilly Tarreau <w@1wt.eu>
Sun, 16 Jun 2019 17:26:18 +0000 (19:26 +0200)
committerWilly Tarreau <w@1wt.eu>
Sun, 16 Jun 2019 17:26:18 +0000 (19:26 +0200)
On certain UNIXes (Solaris at least), echo -n displays "-n". Let's
simply re-arrange the "if" block in the help message not to use it.

Makefile

index 94be6d1b3d98d1800f19f4421e6bf1916f6feee0..d62fead7a3ee9e6bb214111e80f625664531b02d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -803,9 +803,11 @@ help:
        $(Q)sed -ne "/^[^#]*$$/q;s/^# \?\(.*\)/\1/p" Makefile
        $(Q)echo; \
           if [ -n "$(TARGET)" ]; then \
-            echo -n "Current TARGET: $(TARGET)"; \
-            if [ -z "$(set_target_defaults)" ]; then echo -n " (custom target)";fi; \
-            echo;\
+            if [ -n "$(set_target_defaults)" ]; then \
+               echo "Current TARGET: $(TARGET)"; \
+            else \
+               echo "Current TARGET: $(TARGET) (custom target)"; \
+            fi; \
           else \
             echo "TARGET not set, you may pass 'TARGET=xxx' to set one among :";\
             echo "  linux-glibc, solaris, freebsd, netbsd, osx, openbsd,"; \