From 6359b876b97dcaa20e9b8896d33135fedd7d0fbf Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 5 Sep 2015 11:53:19 +0200 Subject: [PATCH] made FORCE_VERSION_COMPILE option to be used for build server (nw) --- makefile | 6 ++++++ scripts/genie.lua | 9 +++++++++ scripts/src/main.lua | 4 +++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/makefile b/makefile index 4b24d33978d..2bd0b0bbac1 100644 --- a/makefile +++ b/makefile @@ -92,6 +92,8 @@ # DRIVERS = src/mame/drivers/1942.c,src/mame/drivers/cops.c +# FORCE_VERSION_COMPILE = 1 + -include useroptions.mak ########################################################################### @@ -630,6 +632,10 @@ ifdef DRIVERS PARAMS += --DRIVERS='$(DRIVERS)' endif +ifdef FORCE_VERSION_COMPILE +PARAMS += --FORCE_VERSION_COMPILE='$(FORCE_VERSION_COMPILE)' +endif + #------------------------------------------------- # All scripts #------------------------------------------------- diff --git a/scripts/genie.lua b/scripts/genie.lua index 50526e5fd41..56a2f5126a5 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -374,6 +374,15 @@ newoption { description = "List of drivers to compile.", } +newoption { + trigger = "FORCE_VERSION_COMPILE", + description = "Force compiling of version.c file.", + allowed = { + { "0", "Disabled" }, + { "1", "Enabled" }, + } +} + if _OPTIONS["SHLIB"]=="1" then LIBTYPE = "SharedLib" else diff --git a/scripts/src/main.lua b/scripts/src/main.lua index 25cc1a32ca7..6baad44c566 100644 --- a/scripts/src/main.lua +++ b/scripts/src/main.lua @@ -234,12 +234,14 @@ if (_OPTIONS["DRIVERS"] == nil) then { MAME_DIR .. "src/".._target .."/" .. _subtarget ..".lst" , GEN_DIR .. _target .. "/" .. _subtarget .."/drivlist.c", { MAME_DIR .. "src/build/makelist.py" }, {"@echo Building driver list...", PYTHON .. " $(1) $(<) > $(@)" }}, } end + +if _OPTIONS["FORCE_VERSION_COMPILE"]=="1" then configuration { "gmake" } dependency { { ".PHONY", ".FORCE", true }, { "$(OBJDIR)/src/version.o", ".FORCE", true }, } - +end configuration { "mingw*" } custombuildtask { { MAME_DIR .. "src/version.c" , GEN_DIR .. "/resource/" .. rctarget .. "vers.rc", { MAME_DIR .. "src/build/verinfo.py" }, {"@echo Emitting " .. rctarget .. "vers.rc" .. "...", PYTHON .. " $(1) -r -b " .. rctarget .. " $(<) > $(@)" }},