summaryrefslogtreecommitdiffstatshomepage
path: root/scripts/src/main.lua
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-04-21 15:44:46 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-04-21 15:50:15 +0200
commit0d980951c9dd3234d693b1ff5bb554ef1ca2ae5c (patch)
tree35cc738fa1a7c0c97c53752eddce97c6d508570b /scripts/src/main.lua
parentf5aa86dfc67b045cdf5044e0e38c369a98e06ca6 (diff)
set GIT_VERSION only where it is used (nw)
Diffstat (limited to 'scripts/src/main.lua')
-rw-r--r--scripts/src/main.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/src/main.lua b/scripts/src/main.lua
index 3a52b985411..3b07a69211c 100644
--- a/scripts/src/main.lua
+++ b/scripts/src/main.lua
@@ -136,7 +136,17 @@ end
end
configuration { }
-
+
+if _OPTIONS["IGNORE_GIT"]~="1" then
+ GIT_VERSION = backtick( "git describe --dirty" )
+ local p = string.find(GIT_VERSION, '-', 1)
+ if (p~=nil) then
+ defines {
+ "GIT_VERSION=" .. string.sub(GIT_VERSION,p+1)
+ }
+ end
+end
+
if _OPTIONS["targetos"]=="android" then
includedirs {
MAME_DIR .. "3rdparty/SDL2/include",