summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorKaspar Brand <kbrand@apache.org>2012-09-16 06:19:13 +0000
committerKaspar Brand <kbrand@apache.org>2012-09-16 06:19:13 +0000
commit089f0eb0ac7b1ef567ef5e3c0e2b953624dc0569 (patch)
tree009d5a6f579fb91810b5338d5bb6c215a9fc4902 /build
parent5eb4537e2afdfdfb308efc7efd5de351bba45cba (diff)
downloadhttpd-089f0eb0ac7b1ef567ef5e3c0e2b953624dc0569.tar.gz
Spin off module-specific build options into separate build vars.
[second try, supersedes r1385214] Add MOD_CFLAGS, MOD_LDFLAGS variables etc. to the build commands, which are available to modules for customization on a per-subdir basis (by adding definitions to modules.mk). Reduces the risk of side-effects when a module needs to add CFLAGS, LDFLAGS etc. and these would be added to the global settings (ALL_CFLAGS etc.). Adapt build settings for mod_ssl, mod_socache_dc, mod_deflate, mod_xml2enc, mod_proxy_html, and mod_lua to use the new MOD_xxx build variables. Change PICFLAGS, SHLTCFLAGS and LTCFLAGS into config vars, instead of AC_SUBSTing them in build/rules.mk.in. For support/ab, introduce ab_CFLAGS and ab_LDFLAGS, and define explicit make targets where they appear at the proper position in the build commands. Consistently use "--with-xxx=PATH" in configure help strings which are used to specify a path to the installation directory of an auxiliary package. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1385216 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build')
-rw-r--r--build/rules.mk.in29
1 files changed, 16 insertions, 13 deletions
diff --git a/build/rules.mk.in b/build/rules.mk.in
index 3dedb9a3cb..a1804fa9c5 100644
--- a/build/rules.mk.in
+++ b/build/rules.mk.in
@@ -22,31 +22,34 @@
# the user-defined flags can always override the configure ones, if needed.
# Note that includes are listed after the flags because -I options have
# left-to-right precedence and CPPFLAGS may include user-defined overrides.
+# The "MOD_" prefixed variable are provided to allow modules to insert their
+# (per-subdirectory) settings through definitions in modules.mk, with highest
+# precedence.
#
-ALL_CFLAGS = $(EXTRA_CFLAGS) $(NOTEST_CFLAGS) $(CFLAGS)
-ALL_CPPFLAGS = $(DEFS) $(INTERNAL_CPPFLAGS) $(EXTRA_CPPFLAGS) $(NOTEST_CPPFLAGS) $(CPPFLAGS)
-ALL_CXXFLAGS = $(EXTRA_CXXFLAGS) $(NOTEST_CXXFLAGS) $(CXXFLAGS)
-ALL_LDFLAGS = $(EXTRA_LDFLAGS) $(NOTEST_LDFLAGS) $(LDFLAGS)
-ALL_LIBS = $(EXTRA_LIBS) $(NOTEST_LIBS) $(LIBS)
-ALL_INCLUDES = $(INCLUDES) $(EXTRA_INCLUDES)
+ALL_CFLAGS = $(MOD_CFLAGS) $(EXTRA_CFLAGS) $(NOTEST_CFLAGS) $(CFLAGS)
+ALL_CPPFLAGS = $(DEFS) $(INTERNAL_CPPFLAGS) $(MOD_CPPFLAGS) $(EXTRA_CPPFLAGS) $(NOTEST_CPPFLAGS) $(CPPFLAGS)
+ALL_CXXFLAGS = $(MOD_CXXFLAGS) $(EXTRA_CXXFLAGS) $(NOTEST_CXXFLAGS) $(CXXFLAGS)
+ALL_LDFLAGS = $(MOD_LDFLAGS) $(EXTRA_LDFLAGS) $(NOTEST_LDFLAGS) $(LDFLAGS)
+ALL_LIBS = $(MOD_LIBS) $(EXTRA_LIBS) $(NOTEST_LIBS) $(LIBS)
+ALL_INCLUDES = $(MOD_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES)
# Compile commands
BASE_CC = $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(ALL_INCLUDES)
BASE_CXX = $(CXX) $(ALL_CXXFLAGS) $(ALL_CPPFLAGS) $(ALL_INCLUDES)
-COMPILE = $(BASE_CC) @PICFLAGS@
-CXX_COMPILE = $(BASE_CXX) @PICFLAGS@
+COMPILE = $(BASE_CC) $(PICFLAGS)
+CXX_COMPILE = $(BASE_CXX) $(PICFLAGS)
-SH_COMPILE = $(LIBTOOL) --mode=compile $(BASE_CC) @SHLTCFLAGS@ -c $< && touch $@
-SH_CXX_COMPILE = $(LIBTOOL) --mode=compile $(BASE_CXX) @SHLTCFLAGS@ -c $< && touch $@
+SH_COMPILE = $(LIBTOOL) --mode=compile $(BASE_CC) $(SHLTCFLAGS) -c $< && touch $@
+SH_CXX_COMPILE = $(LIBTOOL) --mode=compile $(BASE_CXX) $(SHLTCFLAGS) -c $< && touch $@
-LT_COMPILE = $(LIBTOOL) --mode=compile $(COMPILE) @LTCFLAGS@ -c $< && touch $@
-LT_CXX_COMPILE = $(LIBTOOL) --mode=compile $(CXX_COMPILE) @LTCFLAGS@ -c $< && touch $@
+LT_COMPILE = $(LIBTOOL) --mode=compile $(COMPILE) $(LTCFLAGS) -c $< && touch $@
+LT_CXX_COMPILE = $(LIBTOOL) --mode=compile $(CXX_COMPILE) $(LTCFLAGS) -c $< && touch $@
# Link-related commands
-LINK = $(LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) @PILDFLAGS@ $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@
+LINK = $(LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) $(PILDFLAGS) $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@
SH_LINK = $(SH_LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) $(LT_LDFLAGS) $(ALL_LDFLAGS) $(SH_LDFLAGS) $(CORE_IMPLIB) $(SH_LIBS) -o $@
MOD_LINK = $(LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) -static $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@