2016-06-15 17:42:34 +01:00
|
|
|
import filecmp
|
|
|
|
import os
|
|
|
|
import subprocess
|
2017-08-01 14:36:16 +01:00
|
|
|
from sys import executable as python_cmd
|
2008-02-18 10:52:44 +00:00
|
|
|
|
2016-06-15 17:42:34 +01:00
|
|
|
Import('*')
|
2011-02-11 17:38:54 +00:00
|
|
|
|
2010-11-01 13:30:22 +00:00
|
|
|
if env['platform'] == 'windows':
|
2011-01-12 15:32:17 +00:00
|
|
|
SConscript('getopt/SConscript')
|
2010-08-13 13:53:04 +01:00
|
|
|
|
2014-02-25 07:39:14 +00:00
|
|
|
SConscript('util/SConscript')
|
2016-01-18 08:47:13 +00:00
|
|
|
SConscript('compiler/SConscript')
|
2011-02-11 17:38:54 +00:00
|
|
|
|
|
|
|
if env['hostonly']:
|
|
|
|
# We are just compiling the things necessary on the host for cross
|
|
|
|
# compilation
|
|
|
|
Return()
|
|
|
|
|
2016-06-15 17:42:34 +01:00
|
|
|
|
|
|
|
def write_git_sha1_h_file(filename):
|
|
|
|
"""Mesa looks for a git_sha1.h file at compile time in order to display
|
|
|
|
the current git hash id in the GL_VERSION string. This function tries
|
|
|
|
to retrieve the git hashid and write the header file. An empty file
|
|
|
|
will be created if anything goes wrong."""
|
|
|
|
|
2017-10-25 14:04:35 +01:00
|
|
|
args = [ python_cmd, Dir('#').abspath + '/bin/git_sha1_gen.py', '--output', filename ]
|
|
|
|
try:
|
|
|
|
subprocess.call(args)
|
|
|
|
except:
|
|
|
|
print("Warning: exception in write_git_sha1_h_file()")
|
|
|
|
return
|
2016-06-15 17:42:34 +01:00
|
|
|
|
|
|
|
|
|
|
|
# Create the git_sha1.h header file
|
|
|
|
write_git_sha1_h_file("git_sha1.h")
|
|
|
|
# and update CPPPATH so the git_sha1.h header can be found
|
|
|
|
env.Append(CPPPATH = ["#" + env['build_dir']])
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-24 20:26:21 +00:00
|
|
|
if env['platform'] != 'windows':
|
|
|
|
SConscript('loader/SConscript')
|
2011-02-11 17:38:54 +00:00
|
|
|
|
2012-05-30 17:08:11 +01:00
|
|
|
SConscript('mapi/glapi/gen/SConscript')
|
2010-11-01 13:30:22 +00:00
|
|
|
SConscript('mapi/glapi/SConscript')
|
2013-12-31 21:39:49 +00:00
|
|
|
|
2010-11-01 13:30:22 +00:00
|
|
|
SConscript('mesa/SConscript')
|
2008-02-22 15:46:40 +00:00
|
|
|
|
2010-03-09 15:07:57 +00:00
|
|
|
SConscript('gallium/SConscript')
|
2009-01-23 12:32:35 +00:00
|
|
|
|