Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def setStdVars(filename):
mk.setVar('LF', '\n')
mk.setVar('TAB', '\t')
mk.setVar('SPACE', '$(" ")', eval=0)
mk.setVar('DOLLAR', '$')
mk.setVar('INPUT_FILE', os.path.abspath(filename))
mk.setVar('INPUT_FILE_ARG', filename)
mk.setVar('OUTPUT_FILE', config.output_file)
mk.setVar('FORMAT', config.format)
def loadModule(m):
if m in loadedModules:
return
if config.verbose: print "loading module '%s'..." % m
loadedModules.append(m)
# set USING_ variable:
mk.setVar('USING_%s' % m.upper(), '1')
# import module's py utilities:
imported = mk.importPyModule(m)
# include module-specific makefiles:
global availableFiles
for f in availableFiles:
if m in f.modules:
f.modules.remove(m)
if len(f.modules) == 0:
processFile(f.file)
imported = True
availableFiles = [f for f in availableFiles if len(f.modules)>0]
if not imported:
raise ReaderError(None, "unknown module '%s'" % m)
def setStdVars(filename):
mk.setVar('LF', '\n')
mk.setVar('TAB', '\t')
mk.setVar('SPACE', '$(" ")', eval=0)
mk.setVar('DOLLAR', '$')
mk.setVar('INPUT_FILE', os.path.abspath(filename))
mk.setVar('INPUT_FILE_ARG', filename)
mk.setVar('OUTPUT_FILE', config.output_file)
mk.setVar('FORMAT', config.format)
def createMakeVar(target, var, makevar, hints=''):
"""Creates make variable called 'makevar' with same value as 'var' and
returns reference to it in the form of $(makevar)."""
tg = mk.targets[target]
mk.setVar('%s_%s' % (safeMakefileValue(target.upper()), makevar),
"$(ref('%s','%s'))" % (var, target),
target=tg, makevar=1, hints=hints)
return '$(%s_%s)' % (safeMakefileValue(target.upper()), makevar)
def setStdVars(filename):
mk.setVar('LF', '\n')
mk.setVar('TAB', '\t')
mk.setVar('SPACE', '$(" ")', eval=0)
mk.setVar('DOLLAR', '$')
mk.setVar('INPUT_FILE', os.path.abspath(filename))
mk.setVar('INPUT_FILE_ARG', filename)
mk.setVar('OUTPUT_FILE', config.output_file)
mk.setVar('FORMAT', config.format)
def setStdVars(filename):
mk.setVar('LF', '\n')
mk.setVar('TAB', '\t')
mk.setVar('SPACE', '$(" ")', eval=0)
mk.setVar('DOLLAR', '$')
mk.setVar('INPUT_FILE', os.path.abspath(filename))
mk.setVar('INPUT_FILE_ARG', filename)
mk.setVar('OUTPUT_FILE', config.output_file)
mk.setVar('FORMAT', config.format)
else:
val = cv.values[0].value
if val != '': continue
purge = 1
for v in cv.values[1:]:
if v.value != val:
purge = 0
break
if purge: toDel.append((c,val))
if config.verbose:
sys.stdout.write(': %i of %i\n' % (len(toDel), len(mk.cond_vars)))
for c, val in toDel:
t = mk.cond_vars[c].target
del mk.cond_vars[c]
mk.setVar(c, val, target=t)
return len(toDel) > 0
def setStdVars(filename):
mk.setVar('LF', '\n')
mk.setVar('TAB', '\t')
mk.setVar('SPACE', '$(" ")', eval=0)
mk.setVar('DOLLAR', '$')
mk.setVar('INPUT_FILE', os.path.abspath(filename))
mk.setVar('INPUT_FILE_ARG', filename)
mk.setVar('OUTPUT_FILE', config.output_file)
mk.setVar('FORMAT', config.format)