From 13d67bbef3a419fbbd800300f1f2e6f865e71213 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 24 Jun 2016 18:30:22 +0200 Subject: [PATCH] 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. --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 08d6108d3..4d6ab1ace 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)"