コード例 #1
0
# we are now operating in the root of the (new?) build tree, with nemmaster
# and treeinfo on syspath. So the work of building the tree can begin properly

import blueprint, gendirs, geninfrastructure, sourcemanager

print 'Obtaining glue directory'
sourcemanager.obtaindir('glue')

if thingstodo['geninfra']:
    print '\n\nGenerating infrastructure'
    geninfrastructure.go()

if thingstodo['filldirs']:
    print '\n\nFilling out directories'
    gendirs.go()

if thingstodo['genmake']:
    print '\n\nSorting out make system'
    # legacy Make system stuff

    symlink(build_tree_dir + '/mk/' + platform_name + '.pfm.mk',
            build_tree_dir + '/mk/platform.mk')
    symlink(build_tree_dir + '/mk/' + target_name + '.tgt.mk',
            build_tree_dir + '/mk/target.mk')
    symlink(build_tree_dir + '/glue/layfoundations.py',
            build_tree_dir + '/glue/changefoundations.py')
    sourcemanager.obtain('Makefile')
    # XXX arch is not hooked in? (seemed to be what mkbuildtree did)

    o = open('mk/source.mk', 'w')
コード例 #2
0
ファイル: growtree.py プロジェクト: berkus/nemesis
subpaths should be a slash seperated sequence of slashes, starting with
the root of the tree.

Example:

./growtree.py app mod/net

Or:

./growtree.py ""


""")
    sys.exit(1)

linkcache = {}
for usubpath in sys.argv[1:]:
    subpath = usubpath
    if usubpath == '.':
	subpath = ''
    if (len(subpath)>1 and subpath[0] == '/'):
	sys.stderr.write('Warning; subpath looks bad\n')
    if (len(subpath)>2 and subpath[:2] == './'):
	subpath = subpath[2:]
    sys.stderr.write('Filling out subpath "'+subpath+'"\n')
    geninfrastructure.go(subpath)
    gendirs.go(subpath)
    sys.stderr.write('\n')


コード例 #3
0
Grow those parts of the tree that have a path names starting with one of 
the subpaths. If one of the subpaths is empty, the whole tree is grown.
subpaths should be a slash seperated sequence of slashes, starting with
the root of the tree.

Example:

./growtree.py app mod/net

Or:

./growtree.py ""


""")
    sys.exit(1)

linkcache = {}
for usubpath in sys.argv[1:]:
    subpath = usubpath
    if usubpath == '.':
        subpath = ''
    if (len(subpath) > 1 and subpath[0] == '/'):
        sys.stderr.write('Warning; subpath looks bad\n')
    if (len(subpath) > 2 and subpath[:2] == './'):
        subpath = subpath[2:]
    sys.stderr.write('Filling out subpath "' + subpath + '"\n')
    geninfrastructure.go(subpath)
    gendirs.go(subpath)
    sys.stderr.write('\n')
コード例 #4
0
ファイル: layfoundations.py プロジェクト: berkus/nemesis
# we are now operating in the root of the (new?) build tree, with nemmaster
# and treeinfo on syspath. So the work of building the tree can begin properly

import blueprint, gendirs, geninfrastructure, sourcemanager

print 'Obtaining glue directory'
sourcemanager.obtaindir('glue')

if thingstodo['geninfra']:
    print '\n\nGenerating infrastructure'
    geninfrastructure.go()

if thingstodo['filldirs']:
    print '\n\nFilling out directories'
    gendirs.go()

if thingstodo['genmake']:
    print '\n\nSorting out make system'
    # legacy Make system stuff

    symlink(build_tree_dir+'/mk/'+platform_name+'.pfm.mk', build_tree_dir+'/mk/platform.mk')
    symlink(build_tree_dir+'/mk/'+target_name+'.tgt.mk', build_tree_dir+'/mk/target.mk')
    symlink(build_tree_dir+'/glue/layfoundations.py', build_tree_dir+'/glue/changefoundations.py')
    sourcemanager.obtain('Makefile')
    # XXX arch is not hooked in? (seemed to be what mkbuildtree did)

    o = open('mk/source.mk', 'w')
    o.write('SRCROOT = '+source_tree_dir+'\n')
    o.write('BUILDROOT = '+build_tree_dir+'\n')
    o.close()