summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Fonseca <[email protected]>2015-03-19 13:31:37 +0000
committerJose Fonseca <[email protected]>2015-03-22 08:23:24 +0000
commite6330f9f56d6df2c59191513630d837ef3a7b1a9 (patch)
tree213855eff69f6a3e9b646c35d7d63a6e1515758e
parent8f0274c6c645f65a59cb54e14c299cbe131b162d (diff)
scons: Ensure git_sha1.h's directory exists.
Reviewed-by: Brian Paul <[email protected]>
-rw-r--r--src/mesa/SConscript4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/SConscript b/src/mesa/SConscript
index cc5d24221c3..72d98117378 100644
--- a/src/mesa/SConscript
+++ b/src/mesa/SConscript
@@ -130,7 +130,9 @@ def write_git_sha1_h_file(filename):
(commit, foo) = subprocess.Popen(args, stdout=subprocess.PIPE).communicate()
except:
# git log command didn't work
- if not os.path.exists(filename):
+ dirname = os.path.dirname(filename)
+ if not os.path.exists(dirname):
+ os.makedirs(dirname)
# create an empty file if none already exists
f = open(filename, "w")
f.close()