Example #1
0
def go(startofpath=''):
    #happyitems = configutils.getactivesubset(blueprint.items)
    happyitems = blueprint.items

    # find out all the items with paths, and all the paths
    # used in those items
    pathitems = []
    pathlist = []

    count = 0
    for item in happyitems:
        path = item.get_path()

        if path:
            pathitems.append(item)
            pathlist.append(path)

    linkcache = {}

    existingdirs = {}
    existingdirs[''] = 1

    for item in pathitems:
        modpath = item.get_path()
        l = string.split(modpath, '/')
        lprime = []
        # make sure the directories are created
        for pathitem in l:
            subpath = string.join(lprime, '/')

            if not (existingdirs.has_key(subpath)):
                buildutils.maybemakedir(subpath)
                existingdirs[subpath] = 1
            lprime.append(pathitem)

        # if we are inside the directory specified by startofpath,
        if item.get_path()[0:len(startofpath)] == startofpath:
            sys.stdout.write('ln ' + item.get_name())
            sys.stdout.flush()
            if item.options.has_key(
                    'makefileflags') and item.options['makefileflags'].has_key(
                        'custom'
                    ) and not item.options['makefileflags']['custom']:
                item.locatefiles['Makefile'] = 0
            sourcemanager.obtaindir(item.get_path(), linkcache,
                                    item.is_grow_recursive(), item.location,
                                    item.locatefiles)
            sys.stdout.write(',')
            sys.stdout.flush()
            count = count + 1

    if count == 0:
        sys.stderr.write("""
Warning; no items found in directory where gendirs was executed.
Perhaps you are running make grow in a subdirectory of an item?
If so, you must run it in the top-level directory of the item.

Eg. ntsc/ix86/intel is a subdirectory of ntsc_ix86; to grow
the intel directory you must grow in the ntsc/ix86 directory
""")
Example #2
0
def go(startofpath = ''):
    #happyitems = configutils.getactivesubset(blueprint.items)
    happyitems = blueprint.items

    # find out all the items with paths, and all the paths
    # used in those items
    pathitems = []
    pathlist = []

    count = 0
    for item in happyitems:
	path = item.get_path()

	if path:
	    pathitems.append(item)
	    pathlist.append(path)

    linkcache = {}

    existingdirs = {}
    existingdirs[ '' ] = 1

    for item in pathitems:
	modpath = item.get_path()
	l = string.split(modpath, '/')
	lprime = []
	# make sure the directories are created
	for pathitem in l:
	    subpath = string.join(lprime, '/')

	    if not(existingdirs.has_key(subpath)):
		buildutils.maybemakedir(subpath)
		existingdirs[subpath] =1
	    lprime.append(pathitem)

	# if we are inside the directory specified by startofpath, 
	if item.get_path()[0:len(startofpath)] == startofpath:
	    sys.stdout.write('ln '+item.get_name())
	    sys.stdout.flush()
	    if item.options.has_key('makefileflags') and item.options['makefileflags'].has_key('custom') and not item.options['makefileflags']['custom']:
		item.locatefiles['Makefile'] = 0
	    sourcemanager.obtaindir(item.get_path(), linkcache, item.is_grow_recursive(), item.location, item.locatefiles)
	    sys.stdout.write(',')
	    sys.stdout.flush()
	    count = count + 1

    if count == 0:
	sys.stderr.write("""
Warning; no items found in directory where gendirs was executed.
Perhaps you are running make grow in a subdirectory of an item?
If so, you must run it in the top-level directory of the item.

Eg. ntsc/ix86/intel is a subdirectory of ntsc_ix86; to grow
the intel directory you must grow in the ntsc/ix86 directory
""")
Example #3
0
def go(startofpath=''):
    pathmap = fixsubdirs()

    pathsorted = pathmap.keys()
    pathsorted.sort()
    for path in pathsorted:
        #print 'Path: "'+path+'" item name '+pathmap[path].get_name()
        if path[0:len(startofpath)] == startofpath:
            buildutils.maybemakedir(build_tree_dir + '/' + path)

    for path in pathmap.keys():
        if path[0:len(startofpath)] == startofpath:
            item = pathmap[path]
            sys.stdout.write('mk ' + item.get_name())
            sys.stdout.flush()
            genmakefile.genmakefile(item)
            sys.stdout.write(',')
            sys.stdout.flush()
Example #4
0
def go(startofpath=''):
    pathmap = fixsubdirs()

    pathsorted = pathmap.keys()
    pathsorted.sort()
    for path in pathsorted:
	#print 'Path: "'+path+'" item name '+pathmap[path].get_name()
	if path[0:len(startofpath)] == startofpath:
	   buildutils.maybemakedir(build_tree_dir+'/'+path)

    for path in pathmap.keys():
	if path[0:len(startofpath)] == startofpath:
	    item = pathmap[path]
	    sys.stdout.write('mk '+item.get_name())
	    sys.stdout.flush()
	    genmakefile.genmakefile(item)
	    sys.stdout.write(',')
	    sys.stdout.flush()
Example #5
0
                                              dir[1:] + '/' + thingy):
                                newfiles[dir[1:]].append(thingy)

                item.options['contents'] = newfiles
        if package:
            if not packages.has_key(package):
                packages[package] = {'items': [], 'files': {}}
            packages[package]['items'].append(item)
            for dir in newfiles.keys():
                packages[package]['files'][dir] = newfiles[dir]

package_list = packages.keys()
package_list.sort()

print 'Packages', package_list
buildutils.maybemakedir('new_packages')

if 1:
    movedout = {}
    olddirs = []
    o = open('creation', 'w')

    for package in package_list:
        if package != core_package:
            for dir in packages[package]['files'].keys():
                for file in packages[package]['files'][dir]:
                    o.write('remove("moved to ' + package + '", "' + dir +
                            '/' + file + '")\n')
                    movedout[dir + '/' + file] = package
                olddirs.append((package, dir))
    for (npackage, directory) in olddirs:
Example #6
0
                                newfiles[dir[1:]].append(thingy)

                item.options['contents'] = newfiles
        if package:
            if not packages.has_key(package):
                packages[package] = { 'items': [], 'files' : {} }
            packages[package]['items'].append(item)
            for dir in newfiles.keys():
                packages[package]['files'][dir] = newfiles[dir]


package_list = packages.keys()
package_list.sort()

print 'Packages',package_list
buildutils.maybemakedir('new_packages')

if 1:
    movedout = {}
    olddirs = []
    o = open('creation', 'w')
    
    for package in package_list:
        if package != core_package:
            for dir in packages[package]['files'].keys():
                for file in packages[package]['files'][dir]:
                    o.write('remove("moved to '+package+'", "'+dir+'/'+file+'")\n')
                    movedout[dir+'/'+file] = package
                olddirs.append((package,dir))
    for (npackage,directory) in olddirs:
        if not packages[core_package]['files'].has_key(directory):