]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: makefile: adjust the sed expression of "make help" for solaris
authorWilly Tarreau <w@1wt.eu>
Sat, 22 Jun 2019 06:13:24 +0000 (08:13 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 22 Jun 2019 06:13:24 +0000 (08:13 +0200)
Solaris's sed doesn't take the 'p' argument on the 's' command so
nothing is printed. Just passing ';p' fixes this without affecting
other implementations. Additionally, optional characters cannot be
matched using a question mark, which is always searched verbatim, so
the leading '#' wasn't stripped. Using \{0,1\} works fine everywhere
so let's use this instead.

Makefile

index 1387097b1dc7fe0537a8047885a5d335451ec535..3d67fd27f11a596c75995a5f3bbf217b1a8fa669 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -800,7 +800,7 @@ INCLUDES = $(wildcard include/*/*.h ebtree/*.h)
 DEP = $(INCLUDES) .build_opts
 
 help:
-       $(Q)sed -ne "/^[^#]*$$/q;s/^# \?\(.*\)/\1/p" Makefile
+       $(Q)sed -ne "/^[^#]*$$/q;s/^# \{0,1\}\(.*\)/\1/;p" Makefile
        $(Q)echo; \
           if [ -n "$(TARGET)" ]; then \
             if [ -n "$(set_target_defaults)" ]; then \