blob: 3e6baa094c11a9d0396697ed88eed3bf544ad182 [file] [log] [blame]
Brian Paulace31242016-06-15 10:42:34 -06001import filecmp
2import os
3import subprocess
Jose Fonsecab99dcbf2017-08-01 14:36:16 +01004from sys import executable as python_cmd
José Fonseca33ceb672008-02-18 10:52:44 +00005
Brian Paulace31242016-06-15 10:42:34 -06006Import('*')
José Fonseca982609f2011-02-11 17:38:54 +00007
José Fonseca601498a2010-11-01 13:30:22 +00008if env['platform'] == 'windows':
José Fonseca6d670f62011-01-12 15:32:17 +00009 SConscript('getopt/SConscript')
Chia-I Wu1e6c10f2010-05-31 11:47:58 +080010
Kenneth Graunke1e0da622014-02-24 23:39:14 -080011SConscript('util/SConscript')
Emil Velikov1a882fd2016-01-18 10:47:13 +020012SConscript('compiler/SConscript')
José Fonseca982609f2011-02-11 17:38:54 +000013
14if env['hostonly']:
15 # We are just compiling the things necessary on the host for cross
16 # compilation
17 Return()
18
Brian Paulace31242016-06-15 10:42:34 -060019
20def write_git_sha1_h_file(filename):
21 """Mesa looks for a git_sha1.h file at compile time in order to display
22 the current git hash id in the GL_VERSION string. This function tries
23 to retrieve the git hashid and write the header file. An empty file
24 will be created if anything goes wrong."""
25
Eric Engestrom70886222017-10-25 14:04:35 +010026 args = [ python_cmd, Dir('#').abspath + '/bin/git_sha1_gen.py', '--output', filename ]
27 try:
28 subprocess.call(args)
29 except:
30 print("Warning: exception in write_git_sha1_h_file()")
31 return
Brian Paulace31242016-06-15 10:42:34 -060032
33
34# Create the git_sha1.h header file
35write_git_sha1_h_file("git_sha1.h")
36# and update CPPPATH so the git_sha1.h header can be found
37env.Append(CPPPATH = ["#" + env['build_dir']])
38
39
40
Jose Fonseca47870d62015-03-24 20:26:21 +000041if env['platform'] != 'windows':
42 SConscript('loader/SConscript')
José Fonseca982609f2011-02-11 17:38:54 +000043
Brian Pauldff36e92012-05-30 10:08:11 -060044SConscript('mapi/glapi/gen/SConscript')
José Fonseca601498a2010-11-01 13:30:22 +000045SConscript('mapi/glapi/SConscript')
Alexander von Gluck IV61ef6972013-12-31 15:39:49 -060046
José Fonseca601498a2010-11-01 13:30:22 +000047SConscript('mesa/SConscript')
José Fonseca1ca29452010-08-13 13:53:04 +010048
José Fonseca706eda32010-03-09 15:07:57 +000049SConscript('gallium/SConscript')
José Fonseca57d00012009-01-23 12:32:35 +000050