Example #1
0
def main(cwd, topdir, automake, incdirsmap, conditional=()):
    p = parser()
    read_makefile(p, cwd)
    codegen(p.curvar, cwd, topdir, incdirsmap)
    (InstallList, DocList, OutList) = am.output(p.curvar, cwd, topdir,
                                                automake, conditional)
    msc.output(p.curvar, cwd, topdir)
    if 'SUBDIRS' in p.curvar:
        for (dir, cond) in expand_subdirs(p.curvar['SUBDIRS']):
            d = os.path.join(cwd, dir)
            if os.path.exists(d):
                incdirsmap.append((d, os.path.join('includedir', dir)))
                print(d)
                if cond is None:
                    cond = ()
                else:
                    cond = (cond, )
                (deltaInstallList, deltaDocList, deltaOutList) = \
                                   main(d, topdir, automake, incdirsmap, conditional + cond)
                InstallList = InstallList + deltaInstallList
                DocList = DocList + deltaDocList
                OutList = OutList + deltaOutList
                #cmd = "cd " + dir + "; " + sys.argv[0] + " " + topdir
                #os.system (cmd)
    return InstallList, DocList, OutList
Example #2
0
def main(cwd, topdir, automake, incdirsmap, conditional = ()):
    p = parser()
    read_makefile(p, cwd)
    codegen(p.curvar, cwd, topdir, incdirsmap)
    (InstallList, DocList, OutList) = am.output(p.curvar, cwd, topdir, automake, conditional)
    msc.output(p.curvar, cwd, topdir)
    if 'SUBDIRS' in p.curvar:
        for (dir, cond) in expand_subdirs(p.curvar['SUBDIRS']):
            d = os.path.join(cwd, dir)
            if os.path.exists(d):
                incdirsmap.append((d, os.path.join('includedir', dir)))
                print(d)
                if cond is None:
                    cond = ()
                else:
                    cond = (cond,)
                (deltaInstallList, deltaDocList, deltaOutList) = \
                                   main(d, topdir, automake, incdirsmap, conditional + cond)
                InstallList = InstallList + deltaInstallList
                DocList = DocList + deltaDocList
                OutList = OutList + deltaOutList
                #cmd = "cd " + dir + "; " + sys.argv[0] + " " + topdir
                #os.system (cmd)
    return InstallList, DocList, OutList