You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rj...@apache.org on 2012/11/17 21:51:26 UTC

svn commit: r1410782 - /httpd/mod_mbox/trunk/SConstruct

Author: rjung
Date: Sat Nov 17 20:51:25 2012
New Revision: 1410782

URL: http://svn.apache.org/viewvc?rev=1410782&view=rev
Log:
Remove all linker flags from SConstruct for
mod_mbox. The module only has the usual
dependency on apr which is provided by the surrounding
httpd.

The old SConstruct resulted in a dependency on the
platform apr/apu instead of the httpd bundled one.

Instead add linker dependency and RPATH setting for
apr/apu to build environment for standalone binary
mod-mbox-util.

The new SConstruct was already used for today's update
of mail-archives on eos.

Modified:
    httpd/mod_mbox/trunk/SConstruct

Modified: httpd/mod_mbox/trunk/SConstruct
URL: http://svn.apache.org/viewvc/httpd/mod_mbox/trunk/SConstruct?rev=1410782&r1=1410781&r2=1410782&view=diff
==============================================================================
--- httpd/mod_mbox/trunk/SConstruct (original)
+++ httpd/mod_mbox/trunk/SConstruct Sat Nov 17 20:51:25 2012
@@ -22,9 +22,9 @@ from os.path import join as pjoin
 EnsureSConsVersion(1, 1, 0)
 
 
-opts = Options('build.py')
+opts = Variables('build.py')
 
-opts.Add(PathOption('APXS', 'Path apxs','/usr/local/bin/apxs'))
+opts.Add(PathVariable('APXS', 'Path apxs','/usr/local/bin/apxs'))
 
 env = Environment(options=opts)
 
@@ -44,22 +44,12 @@ apu_config = apxs_query(env["APXS"], 'AP
 env.Replace(CC = apxs_query(env["APXS"], 'CC'))
 env.Replace(CPP = apxs_query(env["APXS"], 'CPP'))
 
-# This is a hack to set the RPATH on some operating systems... make me more 
-# portable later....
-p1 = get_output([apr_config, '--bindir'])
-p1 = pjoin(p1[:p1.rfind('/')], 'lib')
-p2 = get_output([apr_config, '--bindir'])
-p2 = pjoin(p2[:p2.rfind('/')], 'lib')
-env.AppendUnique(RPATH = [p1, p2])
-
-env.ParseConfig(apr_config + ' --cflags --cppflags --includes --ldflags')
-env.ParseConfig(apu_config + ' --includes  --ldflags')
+env.ParseConfig(apr_config + ' --cflags --cppflags --includes')
+env.ParseConfig(apu_config + ' --includes')
 
 # TODO: Move to httpd-config when it comes out !
 env.ParseConfig(env['APXS'] + ' -q EXTRA_CFLAGS')
 env.ParseConfig(env['APXS'] + ' -q EXTRA_CPPFLAGS')
-env.ParseConfig(env['APXS'] + ' -q EXTRA_LIBS')
-env.ParseConfig(env['APXS'] + ' -q EXTRA_LIBS')
 
 env.AppendUnique(CPPPATH = [apxs_query(env['APXS'], 'exp_includedir')])
 if env['PLATFORM'] == 'darwin':
@@ -88,8 +78,17 @@ modsources = [pjoin('module-2.0', x) for
 module = env.LoadableModule(target = "mod_mbox.so", source = [modsources, libsources], SHLIBPREFIX='')
 
 lenv = env.Clone()
-lenv.ParseConfig(apr_config + ' --link-ld --libs')
-lenv.ParseConfig(apu_config + ' --link-ld --libs')
+
+# This is a hack to set the RPATH on some operating systems... make me more
+# portable later....
+p1 = get_output([apr_config, '--bindir'])
+p1 = pjoin(p1[:p1.rfind('/')], 'lib')
+p2 = get_output([apu_config, '--bindir'])
+p2 = pjoin(p2[:p2.rfind('/')], 'lib')
+lenv.AppendUnique(RPATH = [p1, p2])
+
+lenv.ParseConfig(apr_config + ' --link-ld')
+lenv.ParseConfig(apu_config + ' --link-ld')
 util = lenv.Program(target = 'mod-mbox-util', source = ['module-2.0/mod-mbox-util.c', lib])
 
 mod_path = apxs_query(env["APXS"], 'exp_libexecdir')