From: Willy Tarreau Date: Fri, 24 Jun 2016 16:30:22 +0000 (+0200) Subject: BUG/BUILD: don't automatically run "make" on "make install" X-Git-Tag: v1.7-dev4~51 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13d67bbef3a419fbbd800300f1f2e6f865e71213;p=thirdparty%2Fhaproxy.git BUG/BUILD: don't automatically run "make" on "make install" 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. --- diff --git a/Makefile b/Makefile index 08d6108d31..4d6ab1aced 100644 --- 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)"