X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=scons%2Fcustom.py;h=7c59fe985d026ea83e64b3d7871bdb102704f7b2;hb=1a57717bbe8a2cedf2e1bb72cfd7ec85cd2350fc;hp=e9c90d09991861dfa8f2633c62f754ad0d3f7718;hpb=97e2c5ac0bba7298c9a32703fe3d19de1f7b815a;p=mesa.git diff --git a/scons/custom.py b/scons/custom.py index e9c90d09991..7c59fe985d0 100644 --- a/scons/custom.py +++ b/scons/custom.py @@ -56,6 +56,9 @@ def quietCommandLines(env): env['SHLINKCOMSTR'] = " Linking $TARGET ..." env['LDMODULECOMSTR'] = " Linking $TARGET ..." env['SWIGCOMSTR'] = " Generating $TARGET ..." + env['LEXCOMSTR'] = " Generating $TARGET ..." + env['YACCCOMSTR'] = " Generating $TARGET ..." + env['CODEGENCOMSTR'] = " Generating $TARGET ..." def createConvenienceLibBuilder(env): @@ -125,7 +128,8 @@ def code_generate(env, script, target, source, command): # This command creates generated code *in the build directory*. command = command.replace('$SCRIPT', script_src.path) - code = env.Command(target, source, command) + action = SCons.Action.Action(command, "$CODEGENCOMSTR") + code = env.Command(target, source, action) # Explicitly mark that the generated code depends on the generator, # and on implicitly imported python modules @@ -149,36 +153,6 @@ def createCodeGenerateMethod(env): env.AddMethod(code_generate, 'CodeGenerate') -def symlink(target, source, env): - target = str(target[0]) - source = str(source[0]) - if os.path.islink(target) or os.path.exists(target): - os.remove(target) - os.symlink(os.path.basename(source), target) - -def install_program(env, source): - source = str(source[0]) - target_dir = os.path.join(env.Dir('#.').srcnode().abspath, env['build'], 'bin') - target_name = str(source) - env.InstallAs(os.path.join(target_dir, target_name), source) - -def install_shared_library(env, source, version = ()): - source = str(source[0]) - version = tuple(map(str, version)) - target_dir = os.path.join(env.Dir('#.').srcnode().abspath, env['build'], 'lib') - target_name = '.'.join((str(source),) + version) - last = env.InstallAs(os.path.join(target_dir, target_name), source) - while len(version): - version = version[:-1] - target_name = '.'.join((str(source),) + version) - action = SCons.Action.Action(symlink, "$TARGET -> $SOURCE") - last = env.Command(os.path.join(target_dir, target_name), last, action) - -def createInstallMethods(env): - env.AddMethod(install_program, 'InstallProgram') - env.AddMethod(install_shared_library, 'InstallSharedLibrary') - - def generate(env): """Common environment generation code""" @@ -188,7 +162,6 @@ def generate(env): # Custom builders and methods createConvenienceLibBuilder(env) createCodeGenerateMethod(env) - createInstallMethods(env) # for debugging #print env.Dump()