Changeset 1465 for trunk/scons


Ignore:
Timestamp:
01/14/09 13:52:57 (16 years ago)
Author:
Malte Marquarding
Message:

add WalkDirTree which is erequired for data dir installs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scons/utils.py

    r1437 r1465  
    121121    env.CheckFortran = CheckFortran
    122122
     123    def WalkDirTree(targetroot, sourceroot, sources):
     124        ifiles = []
     125        ofiles = []
     126        for s in sources:
     127            if os.path.isdir(os.path.join(sourceroot ,s)):
     128                for d,ld,f in os.walk(os.path.join(sourceroot ,s)):
     129                    for fl in f:
     130                        ifile = os.path.join(d, fl)
     131                        ifiles.append(ifile)
     132                        ofile = ifile.replace(sourceroot, targetroot)
     133                        ofiles.append(ofile)
     134        return ofiles, ifiles
     135    env.WalkDirTree = WalkDirTree
     136
     137
    123138    def null_action(target, source, env): return 0
    124139
Note: See TracChangeset for help on using the changeset viewer.