Commit f4192cb4 authored by José Fonseca's avatar José Fonseca

gallium: Make the build output dir depend on the configuration.

The build output dirs mimics the old config names:

  build/linux
  build/linux-dri
  build/linux-dri-x86
  build/linux-dri-x86-debug
  ...
parent c42e6254
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# Top-level SConstruct # Top-level SConstruct
import os import os
import os.path
import sys import sys
...@@ -40,7 +41,7 @@ Help(opts.GenerateHelpText(env)) ...@@ -40,7 +41,7 @@ Help(opts.GenerateHelpText(env))
# for debugging # for debugging
#print env.Dump() #print env.Dump()
if 1: if 0:
# platform will be typically 'posix' or 'win32' # platform will be typically 'posix' or 'win32'
platform = env['PLATFORM'] platform = env['PLATFORM']
else: else:
...@@ -56,7 +57,7 @@ machine = env['machine'] ...@@ -56,7 +57,7 @@ machine = env['machine']
# derived options # derived options
x86 = machine == 'x86' x86 = machine == 'x86'
gcc = platform == 'posix' gcc = platform in ('posix', 'linux', 'freebsd', 'darwin')
msvc = platform == 'win32' msvc = platform == 'win32'
Export([ Export([
...@@ -202,10 +203,20 @@ createConvenienceLibBuilder(env) ...@@ -202,10 +203,20 @@ createConvenienceLibBuilder(env)
####################################################################### #######################################################################
# Invoke SConscripts # Invoke SConscripts
# Put build output in a separate dir # Put build output in a separate dir, which depends on the current configuration
# TODO: make build_dir depend on platform and build type (check # See also http://www.scons.org/wiki/AdvancedBuildExample
# http://www.scons.org/wiki/AdvancedBuildExample for an example) build_topdir = 'build'
build_dir = 'build' build_subdir = platform
if dri:
build_subdir += "-dri"
if x86:
build_subdir += "-x86"
if debug:
build_subdir += "-debug"
build_dir = os.path.join(build_topdir, build_subdir)
# TODO: Build several variants at the same time?
# http://www.scons.org/wiki/SimultaneousVariantBuilds
SConscript( SConscript(
'src/mesa/SConscript', 'src/mesa/SConscript',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment