apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r758206 - /apr/apr/trunk/build/gen-build.py
Date Wed, 25 Mar 2009 10:35:07 GMT
Author: jorton
Date: Wed Mar 25 10:35:05 2009
New Revision: 758206

URL: http://svn.apache.org/viewvc?rev=758206&view=rev
Log:
* build/gen-build.py (main): Add support for building multiple 
  libraries.

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?rev=758206&r1=758205&r2=758206&view=diff
==============================================================================
--- apr/apr/trunk/build/gen-build.py (original)
+++ apr/apr/trunk/build/gen-build.py Wed Mar 25 10:35:05 2009
@@ -140,6 +140,23 @@
 
       f.write('\n')
 
+  if parser.has_option('options', 'libraries'):
+    libs = parser.get('options', 'libraries')
+
+    for lib in string.split(libs):
+      files = get_files(parser.get(lib, 'paths'))
+      objects, _unused = write_objects(f, legal_deps, h_deps, files)
+      flat_objects = string.join(objects)
+      f.write('OBJECTS_%s = %s\n' % (lib, flat_objects))
+
+      if parser.has_option(lib, 'target'):
+        target = parser.get(lib, 'target')
+        f.write('MODULE_%s = %s\n' % (lib, target))
+        f.write('%s: $(OBJECTS_%s)\n' % (target, lib))
+        f.write('\t$(LINK_LIBRARY) -o $@ $(OBJECTS_%s) $(LDADD_%s)\n' % (lib, lib))
+
+      f.write('\n')
+
   # Build a list of all necessary directories in build tree
   alldirs = { }
   for dir in dirs.keys():



Mime
View raw message