Skip to content

Commit

Permalink
BUG/BUILD: don't automatically run "make" on "make install"
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
wtarreau committed Jun 24, 2016
1 parent 29bdb1c commit 13d67bb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand Down

0 comments on commit 13d67bb

Please sign in to comment.