i965: Apply a workaround for the Ironlake "vertex flashing".
[mesa.git] / scons / custom.py
index e9c90d09991861dfa8f2633c62f754ad0d3f7718..7c59fe985d026ea83e64b3d7871bdb102704f7b2 100644 (file)
@@ -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()