diff options
author | Jim Jagielski <jim@apache.org> | 2012-09-26 14:30:31 +0000 |
---|---|---|
committer | Jim Jagielski <jim@apache.org> | 2012-09-26 14:30:31 +0000 |
commit | 32bf896e8f39f803b5cf85b5ee4a689a5ffcdfcb (patch) | |
tree | dfaaf6a08213d84a957738176536ff10844c7567 /build | |
parent | 34090b7b27c450443ca9f069f1be926edc7c01d8 (diff) | |
download | httpd-32bf896e8f39f803b5cf85b5ee4a689a5ffcdfcb.tar.gz |
backport r1385216, r1387610 from trunk:
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/branches/2.4.x@1390518 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build')
-rw-r--r-- | build/rules.mk.in | 29 |
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 $@ |