On 7/27/2016 2:03 PM, Shawn Heisey wrote:
> I'm building some new load balancer machines and I need to install into
> systemd on them.  I've compiled and installed haproxy 1.5.18, and found
> that a fix for the problem Tim outlined has made it into this version,
> and now even when the target is linux2628, which *builds* the systemd
> wrapper, the wrapper is not *installed*.

With a little research, I discovered one way to control make's behavior
depending on whether a file exists or not.

The attached patch causes the systemd wrapper to be installed if it got
built, but I don't know whether this is the right fix.  Trying to use
"wildcard" in a conditional didn't work, and I couldn't figure out why.
It does work if it's one of the arguments on the "install" command.  The
patch is against the master branch cloned in the last couple of days.

Thanks,
Shawn

diff --git a/Makefile b/Makefile
index 4d6ab1a..df7d65e 100644
--- a/Makefile
+++ b/Makefile
@@ -832,7 +832,8 @@ install-bin:
                fi; \
        done
        install -d "$(DESTDIR)$(SBINDIR)"
-       install haproxy $(EXTRA) "$(DESTDIR)$(SBINDIR)"
+       install haproxy $(wildcard haproxy-systemd-wrapper) \
+          $(EXTRA) "$(DESTDIR)$(SBINDIR)"
 
 install: install-bin install-man install-doc
 

Reply via email to