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.
This commit is contained in:
Willy Tarreau 2016-06-24 18:30:22 +02:00
parent 29bdb1c7ff
commit 13d67bbef3
1 changed files with 7 additions and 1 deletions

View File

@ -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)"