Improve exclusion list generation for tools build
authorShabe Razvi <shaber@symbian.org>
Wed, 28 Apr 2010 18:02:45 +0100
changeset 992 64899060ea4d
parent 991 73dce18476a0
child 994 92dd719cc91b
Improve exclusion list generation for tools build
common/build.xml
common/tools/listdir.py
sf-tools/build.xml
--- a/common/build.xml	Wed Apr 28 17:18:05 2010 +0100
+++ b/common/build.xml	Wed Apr 28 18:02:45 2010 +0100
@@ -497,7 +497,7 @@
             <istrue value="${sf.spec.dirlist.enable}"/>
             <then>
                 <echo message="Dirlist name: ${sf.currentlist.name} requested for ${sf.dir.location} excluding ${sf.dir.exclude}"/>
-                <exec executable="python" dir="${build.log.dir}/" failonerror="true" output="${build.log.dir}/listdir_${build.id}_${sf.currentlist.name}.log">
+                <exec executable="python" dir="${build.drive}/" failonerror="true" output="${build.log.dir}/listdir_${build.id}_${sf.currentlist.name}.log">
                     <arg value="${sf.common.config.dir}/tools/listdir.py"/>
                     <arg value="${sf.dir.location}"/>
                     <arg value="${sf.dir.exclude}"/>
--- a/common/tools/listdir.py	Wed Apr 28 17:18:05 2010 +0100
+++ b/common/tools/listdir.py	Wed Apr 28 18:02:45 2010 +0100
@@ -26,9 +26,9 @@
   if(len(sys.argv)>2):
     x_dirs = string.lower(sys.argv[2])
     exclude_dirs = re.split(',', x_dirs)
-  scandir(directory, exclude_dirs,directory)
+  scandir(directory, exclude_dirs)
 
-def scandir(top, exclude_dirs,directory):
+def scandir(top, exclude_dirs):
     fixpath = re.compile('\\\\')    
     fixroot = re.compile('^%s\\\\' % top)
     for root, dirs, files in os.walk(top, topdown=True):
@@ -38,6 +38,6 @@
         for name in files:
             filename = os.path.join(root, name)
             fn = string.lower(fixpath.sub('/',fixroot.sub('',filename)))
-            print fn.strip(directory)
+            print top+"/"+fn
 
 main()
--- a/sf-tools/build.xml	Wed Apr 28 17:18:05 2010 +0100
+++ b/sf-tools/build.xml	Wed Apr 28 18:02:45 2010 +0100
@@ -48,8 +48,8 @@
 
     <echo message="INFO Getting bootstrap environment listing"/>
     <antcall target="sf-list-dir" inheritAll="false">
-      <param name="sf.dir.location" value="${build.drive}/"/> 
-      <param name="sf.dir.exclude"  value="${build.drive}/epoc32/build"/>     
+      <param name="sf.dir.location" value="epoc32"/> 
+      <param name="sf.dir.exclude"  value="epoc32/build"/>     
       <param name="sf.list.name" value="bootstrap"/>
     </antcall>    
   </target>