OPENBUS-2923 Correção no Jamroot para o pre-processar o launcher.c para cada...

OPENBUS-2923 Correção no Jamroot para o pre-processar o launcher.c para cada executável (busservices e busadmin)

 - Adição de regra no Jamroot para tentar identificar a revisão do git
   caso o usuario não forneça a variável de ambiente OPENBUS_CODEREV
parent d22e5cce
...@@ -7,6 +7,21 @@ path-constant here : . ; ...@@ -7,6 +7,21 @@ path-constant here : . ;
path-constant root : $(here)/.. ; path-constant root : $(here)/.. ;
path-constant deps : $(root)/.. ; path-constant deps : $(root)/.. ;
rule trim ( string )
{
local match = [ MATCH "^(.*)[\n\r]$" : $(string) ] ;
if $(match) { return $(match[1]) ; }
else { return $(string) ; }
}
local revision = [ os.environ OPENBUS_CODEREV ] ;
if ! $(revision) {
revision = [ trim [ SHELL "git rev-parse --short HEAD" ] ] ;
if ! $(revision) { revision = "snapshot" ; }
}
ECHO ...using \".$(revision)\" as revision number... ;
local lua = [ os.environ LUA ] ; local lua = [ os.environ LUA ] ;
if ! $(lua) if ! $(lua)
{ {
...@@ -143,8 +158,7 @@ project busservices ...@@ -143,8 +158,7 @@ project busservices
<target-os>windows:<debug-store>database <target-os>windows:<debug-store>database
<target-os>windows:<define>_CRT_SECURE_NO_WARNINGS <target-os>windows:<define>_CRT_SECURE_NO_WARNINGS
<target-os>windows:<define>_WIN32 <target-os>windows:<define>_WIN32
<define>OPENBUS_PROGNAME=\\\""busservices\\\"" <define>OPENBUS_CODEREV=\\\""'$(revision)'\\\""
<define>OPENBUS_CODEREV=\\\""snapshot\\\""
<toolset>msvc-12.0:<cxxflags>/FS <toolset>msvc-12.0:<cxxflags>/FS
<debug-symbols>on <debug-symbols>on
<link>static <link>static
...@@ -238,9 +252,15 @@ local exe_requirements = ...@@ -238,9 +252,15 @@ local exe_requirements =
<include>$(here) <include>$(here)
; ;
obj busservices_launcher
: $(root)/src/launcher.c
/lua//lua
: <define>OPENBUS_PROGNAME=\\\""busservices\\\""
;
exe busservices exe busservices
: coreservices.c : coreservices.c
$(root)/src/launcher.c busservices_launcher
$(root)/src/lthreadlib.c $(root)/src/lthreadlib.c
$(root)/src/coreservlibs.c $(root)/src/coreservlibs.c
$(exe_deps) $(exe_deps)
...@@ -250,9 +270,15 @@ exe busservices ...@@ -250,9 +270,15 @@ exe busservices
; ;
explicit busservices ; explicit busservices ;
obj busadmin_launcher
: $(root)/src/launcher.c
/lua//lua
: <define>OPENBUS_PROGNAME=\\\""busadmin\\\""
;
exe busadmin exe busadmin
: coreadmin.c : coreadmin.c
$(root)/src/launcher.c busadmin_launcher
$(root)/src/adminlibs.c $(root)/src/adminlibs.c
$(exe_deps) $(exe_deps)
: $(exe_requirements) : $(exe_requirements)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment