apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r757716 - /apr/apr/trunk/build/aprenv.py
Date Tue, 24 Mar 2009 10:48:39 GMT
Author: pquerna
Date: Tue Mar 24 10:48:39 2009
New Revision: 757716

URL: http://svn.apache.org/viewvc?rev=757716&view=rev
Log:
SCons:
 - Start building APR Util directories and apu.h
 - Improve read_version to handle VariantDirs by using env.File() to get contents.

Modified:
    apr/apr/trunk/build/aprenv.py

Modified: apr/apr/trunk/build/aprenv.py
URL: http://svn.apache.org/viewvc/apr/apr/trunk/build/aprenv.py?rev=757716&r1=757715&r2=757716&view=diff
==============================================================================
--- apr/apr/trunk/build/aprenv.py (original)
+++ apr/apr/trunk/build/aprenv.py Tue Mar 24 10:48:39 2009
@@ -40,7 +40,18 @@
     'user'
 ]
 
-_simple_dirs = ['tables', 'strings']
+_simple_dirs = [
+    'buckets',
+    'dbd',
+    'dbm',
+    'encoding',
+    'hooks',
+    'hooks',
+    'memcache',
+    'tables',
+    'strings',
+    'util-misc',
+]
 
 class APREnv(Environment):
   def __init__(self, parent=None, args=None, **kw):
@@ -85,18 +96,17 @@
 
   def APRVersion(self):
     if not self.has_key('APR_VERSION'):
-      self['APR_VERSION'] = self.read_version('APR', 'include/apr_version.h')
+      self['APR_VERSION'] = self.read_version('APR', '#include/apr_version.h')
     return self['APR_VERSION']
 
   def read_version(self, prefix, path):
     version_re = re.compile("(.*)%s_(?P<id>MAJOR|MINOR|PATCH)_VERSION(\s+)(?P<num>\d)(.*)"
% prefix)
     versions = {}
-    fp = open(path, 'rb')
-    for line in fp.readlines():
+    fp = self.File(path).get_contents()
+    for line in fp.splitlines():
       m = version_re.match(line)
       if m:
         versions[m.group('id')] = int(m.group('num'))
-    fp.close()
     return (versions['MAJOR'], versions['MINOR'], versions['PATCH'])
 
   def Filter(self, **kw):
@@ -639,6 +649,7 @@
     subst['@shlibpath_var@'] = pjoin(self['prefix'], 'lib')
 
     self.SubstFile('include/apr.h', 'include/apr.h.in', SUBST_DICT = subst)
+    self.SubstFile('include/apu.h', 'include/apu.h.in', SUBST_DICT = subst)
 
     if hasattr(conf, "config_h_text"):
       conf.Define("APR_OFF_T_STRFN", subst['@off_t_strfn@'])



Mime
View raw message