Mesa (master): scons: Ensure git_sha1.h's directory exists.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Sun Mar 22 08:23:37 UTC 2015
Module: Mesa
Branch: master
Commit: e6330f9f56d6df2c59191513630d837ef3a7b1a9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e6330f9f56d6df2c59191513630d837ef3a7b1a9
Author: Jose Fonseca <jfonseca at vmware.com>
Date: Thu Mar 19 13:31:37 2015 +0000
scons: Ensure git_sha1.h's directory exists.
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/mesa/SConscript | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/mesa/SConscript b/src/mesa/SConscript
index cc5d242..72d9811 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()
More information about the mesa-commit
mailing list