apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r501091 - /apr/apr/trunk/build/gen-build.py
Date Mon, 29 Jan 2007 16:31:23 GMT
Author: jorton
Date: Mon Jan 29 08:31:18 2007
New Revision: 501091

URL: http://svn.apache.org/viewvc?view=rev&rev=501091
Log:
* build/gen-build.py: Basic support for defining dynamically-loadable
modules, in preparation for supporting APR-Util DBD drivers as DSOs.

Modified:
    apr/apr/trunk/build/gen-build.py

Modified: apr/apr/trunk/build/gen-build.py
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/gen-build.py?view=diff&rev=501091&r1=501090&r2=501091
==============================================================================
--- apr/apr/trunk/build/gen-build.py (original)
+++ apr/apr/trunk/build/gen-build.py Mon Jan 29 08:31:18 2007
@@ -123,6 +123,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 $@ %s $(LDADD_%s)\n' % (flat_objects, mod))
+
+      f.write('\n')
+
   # Build a list of all necessary directories in build tree
   alldirs = { }
   for dir in dirs.keys():



Mime
View raw message