]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/BUILD: don't automatically run "make" on "make install"
authorWilly Tarreau <w@1wt.eu>
Fri, 24 Jun 2016 16:30:22 +0000 (18:30 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 24 Jun 2016 16:34:13 +0000 (18:34 +0200)
Kay Fuchs reported that the recent changes to automatically rebuild files
on config option changes caused "make install" to rebuild the whole code
with the wrong options. That's caused by the fact that the "install-bin"
target depends on the "haproxy" target, which detects the lack of options
and causes a rebuild with different ones.

This patch makes a simple change, it removes this automatic dependency
which was already wrong since it could cause some files to be built with
different options prior to these changes, and instead emits an error
message indicating that "make" should be run prior to "make install".

The patches were backported into 1.6 so this fix must go there as well.

Makefile

index 08d6108d3178047ce1db03e13428350a5b61f68a..4d6ab1aced87cd8972b2a9ef5e63b680757b1ea5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -824,7 +824,13 @@ install-doc:
                install -m 644 doc/$$x.txt "$(DESTDIR)$(DOCDIR)" ; \
        done
 
-install-bin: haproxy $(EXTRA)
+install-bin:
+       @for i in haproxy $(EXTRA); do \
+               if ! [ -e "$$i" ]; then \
+                       echo "Please run 'make' before 'make install'."; \
+                       exit 1; \
+               fi; \
+       done
        install -d "$(DESTDIR)$(SBINDIR)"
        install haproxy $(EXTRA) "$(DESTDIR)$(SBINDIR)"