You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2007/02/28 13:48:14 UTC

svn commit: r512737 - /apr/apr/branches/1.2.x/build/gen-build.py

Author: jorton
Date: Wed Feb 28 04:48:14 2007
New Revision: 512737

URL: http://svn.apache.org/viewvc?view=rev&rev=512737
Log:
Merge r501091, r512734 from trunk:

* build/gen-build.py: Basic support for defining dynamically-loadable
modules, in preparation for supporting APR-Util DBD drivers as DSOs.

* build/gen-build.py (main): Use OBJECTS_mod variable on the link line,
rather than substituting its expansion.

Modified:
    apr/apr/branches/1.2.x/build/gen-build.py

Modified: apr/apr/branches/1.2.x/build/gen-build.py
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.2.x/build/gen-build.py?view=diff&rev=512737&r1=512736&r2=512737
==============================================================================
--- apr/apr/branches/1.2.x/build/gen-build.py (original)
+++ apr/apr/branches/1.2.x/build/gen-build.py Wed Feb 28 04:48:14 2007
@@ -95,6 +95,23 @@
   f.write('HEADERS = $(top_srcdir)/%s\n\n' % string.join(headers, ' $(top_srcdir)/'))
   f.write('SOURCE_DIRS = %s $(EXTRA_SOURCE_DIRS)\n\n' % string.join(dirs.keys()))
 
+  if parser.has_option('options', 'modules'):
+    modules = parser.get('options', 'modules')
+
+    for mod in string.split(modules):
+      files = get_files(parser.get(mod, 'paths'))
+      objects, _unused = write_objects(f, legal_deps, h_deps, files)
+      flat_objects = string.join(objects)
+      f.write('OBJECTS_%s = %s\n' % (mod, flat_objects))
+
+      if parser.has_option(mod, 'target'):
+        target = parser.get(mod, 'target')
+        f.write('MODULE_%s = %s\n' % (mod, target))
+        f.write('%s: %s\n' % (target, flat_objects))
+        f.write('\t$(LINK_MODULE) -o $@ $(OBJECTS_%s) $(LDADD_%s)\n' % (mod, mod))
+
+      f.write('\n')
+
   # Build a list of all necessary directories in build tree
   alldirs = { }
   for dir in dirs.keys():



Re: svn commit: r512737 - /apr/apr/branches/1.2.x/build/gen-build.py

Posted by Bojan Smojver <bo...@rexursive.com>.
On Wed, 2007-02-28 at 12:48 +0000, jorton@apache.org wrote:

> Author: jorton
> Date: Wed Feb 28 04:48:14 2007
> New Revision: 512737
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=512737
> Log:
> Merge r501091, r512734 from trunk:
> 
> * build/gen-build.py: Basic support for defining dynamically-loadable
> modules, in preparation for supporting APR-Util DBD drivers as DSOs.

Nice, thanks!

-- 
Bojan