* Turned off optimization for unit tests. The Storage Kit tests were running
amok... * Added rules SplitPath and SymLink used in the Storage Kit tests Jamfile. * Removed the setting of CCFLAGS and C++FLAGS on the SystemMain target. This really doesn't made sense. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@23 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
5527b575c3
commit
3b9eae39d5
46
Jamrules
46
Jamrules
@ -174,6 +174,10 @@ rule UnitTest
|
|||||||
local libraries = $(4) ;
|
local libraries = $(4) ;
|
||||||
local headerDirs = $(5) ;
|
local headerDirs = $(5) ;
|
||||||
|
|
||||||
|
# Turn optimization off.
|
||||||
|
local optim = $(OPTIM) ;
|
||||||
|
OPTIM = ;
|
||||||
|
|
||||||
# SetupIncludes ;
|
# SetupIncludes ;
|
||||||
UseCppUnitHeaders ;
|
UseCppUnitHeaders ;
|
||||||
SetupObjectsDir ;
|
SetupObjectsDir ;
|
||||||
@ -189,6 +193,9 @@ rule UnitTest
|
|||||||
# Turn debugging on. That is usually desired for test code.
|
# Turn debugging on. That is usually desired for test code.
|
||||||
ObjectCcFlags $(sources) : "-g" ;
|
ObjectCcFlags $(sources) : "-g" ;
|
||||||
ObjectC++Flags $(sources) : "-g" ;
|
ObjectC++Flags $(sources) : "-g" ;
|
||||||
|
|
||||||
|
# Turn optimization on again.
|
||||||
|
OPTIM = $(optim) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
rule R5UnitTest
|
rule R5UnitTest
|
||||||
@ -207,6 +214,10 @@ rule R5UnitTest
|
|||||||
local libraries = $(4) ;
|
local libraries = $(4) ;
|
||||||
local objects = [ R5ObjectNames $(sources) ] ;
|
local objects = [ R5ObjectNames $(sources) ] ;
|
||||||
|
|
||||||
|
# Turn optimization off.
|
||||||
|
local optim = $(OPTIM) ;
|
||||||
|
OPTIM = ;
|
||||||
|
|
||||||
UseCppUnitHeaders ;
|
UseCppUnitHeaders ;
|
||||||
SetupObjectsDir ;
|
SetupObjectsDir ;
|
||||||
MakeLocateObjects $(objects) ;
|
MakeLocateObjects $(objects) ;
|
||||||
@ -230,6 +241,9 @@ rule R5UnitTest
|
|||||||
# Turn debugging on. That is usually desired for test code.
|
# Turn debugging on. That is usually desired for test code.
|
||||||
ObjectCcFlags $(objects) : "-g" ;
|
ObjectCcFlags $(objects) : "-g" ;
|
||||||
ObjectC++Flags $(objects) : "-g" ;
|
ObjectC++Flags $(objects) : "-g" ;
|
||||||
|
|
||||||
|
# Turn optimization on again.
|
||||||
|
OPTIM = $(optim) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
rule R5ObjectNames
|
rule R5ObjectNames
|
||||||
@ -435,6 +449,36 @@ rule UseArchHeaders
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rule SplitPath
|
||||||
|
{
|
||||||
|
# SplitPath <path> ;
|
||||||
|
# Decomposes a path into its components.
|
||||||
|
local path = $(1:G=) ;
|
||||||
|
local components ;
|
||||||
|
while $(path:D)
|
||||||
|
{
|
||||||
|
# Note: $(path:B) returns "." for "..", but $(path:D=) is fine.
|
||||||
|
components = $(path:D=) $(components) ;
|
||||||
|
path = $(path:D) ;
|
||||||
|
}
|
||||||
|
components = $(path) $(components) ;
|
||||||
|
return $(components) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
rule SymLink
|
||||||
|
{
|
||||||
|
# SymLink <target> : <source> ;
|
||||||
|
# Links <target> to <source>.
|
||||||
|
# <source> is the exact link contents. No binding is done.
|
||||||
|
LINKCONTENTS on $(1) = $(2) ;
|
||||||
|
SymLink1 $(1) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
actions SymLink1
|
||||||
|
{
|
||||||
|
$(RM) $(1) && $(LN) -s $(LINKCONTENTS) $(1)
|
||||||
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
# Low-level OBOS utility rules
|
# Low-level OBOS utility rules
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
@ -637,8 +681,6 @@ rule SystemMain
|
|||||||
# Usage SystemMain <target> : <sources> : <rqd_by> ;
|
# Usage SystemMain <target> : <sources> : <rqd_by> ;
|
||||||
SetupObjectsDir ;
|
SetupObjectsDir ;
|
||||||
|
|
||||||
CCFLAGS on $(1) = $(OPTIM) ;
|
|
||||||
C++FLAGS on $(1) = $(OPTIM) ;
|
|
||||||
LINKLIBS = ;
|
LINKLIBS = ;
|
||||||
|
|
||||||
# This allows us to preset certain commands we use
|
# This allows us to preset certain commands we use
|
||||||
|
Loading…
Reference in New Issue
Block a user