]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUILD] ensure that users don't build without setting the target anymore.
authorWilly Tarreau <w@1wt.eu>
Tue, 11 Mar 2008 05:37:39 +0000 (06:37 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Mar 2008 05:37:39 +0000 (06:37 +0100)
Too often, people report performance issues on Linux 2.6 because they don't
use the available optimizations. We need to ensure that people are aware of
the available features, and for this, we must force them to choose a target
OS (or "generic"), but at least prevent them from blindly building for a
generic target.

Makefile

index 5e9b11d9e40bae4c13b1cdd66f4ddb4df03030a3..4976ffd264658d978413b27cebbeba6339e56bfc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -54,7 +54,7 @@
 # following list (use the default "generic" if uncertain) :
 #    generic, linux22, linux24, linux24e, linux24eold, linux26, solaris,
 #    freebsd, openbsd, custom
-TARGET = generic
+TARGET =
 
 #### TARGET CPU
 # Use CPU=<cpu_name> to optimize for a particular CPU, among the following
@@ -407,8 +407,29 @@ endif
 # add options at the beginning of the "ld" command line if needed.
 LDOPTS = $(TARGET_LDFLAGS) $(OPTIONS_LDFLAGS) $(ADDLIB)
 
-
+ifeq ($(TARGET),)
+all:
+       @echo
+       @echo "Due to too many reports of suboptimized setups, building without"
+       @echo "specifying the target is no longer supported. Please specify the"
+       @echo "target OS in the TARGET variable, in the following form:"
+       @echo
+       @echo "   $ make TARGET=xxx"
+       @echo
+       @echo "Please choose the target among the following supported list :"
+       @echo
+       @echo "   linux26, linux24, linux24e, linux24eold, linux22, solaris"
+       @echo "   freebsd, openbsd, custom, generic"
+       @echo
+       @echo "Use \"generic\" if you don't want any optimization, \"custom\" if you"
+       @echo "want to precisely tweak every option, or choose the target which"
+       @echo "matches your OS the most in order to gain the maximum performance"
+       @echo "out of it. Please check the Makefile in case of doubts."
+       @echo
+       @exit 1
+else
 all: haproxy
+endif
 
 OBJS = src/haproxy.o src/sessionhash.o src/base64.o src/protocols.o \
        src/uri_auth.o src/standard.o src/buffers.o src/log.o src/task.o \