Added rules NextID, which returns an numerical ID incremented with each
invocation, and NewUniqueTarget, which returns a unique target name. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20597 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+34
-2
@@ -30,6 +30,10 @@ rule SubIncludeGPL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# pragma mark - MakeLocate variants
|
||||||
|
|
||||||
|
|
||||||
rule MakeLocateCommonPlatform
|
rule MakeLocateCommonPlatform
|
||||||
{
|
{
|
||||||
MakeLocate $(1) : $(COMMON_PLATFORM_LOCATE_TARGET) ;
|
MakeLocate $(1) : $(COMMON_PLATFORM_LOCATE_TARGET) ;
|
||||||
@@ -76,6 +80,13 @@ rule MakeLocateDebug
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# pragma mark - Deferred SubIncludes
|
||||||
|
|
||||||
|
|
||||||
|
# The variable used to collect the deferred SubIncludes.
|
||||||
|
HAIKU_DEFERRED_SUB_INCLUDES = ;
|
||||||
|
|
||||||
rule DeferredSubInclude params
|
rule DeferredSubInclude params
|
||||||
{
|
{
|
||||||
# DeferredSubInclude <subdir tokens> ;
|
# DeferredSubInclude <subdir tokens> ;
|
||||||
@@ -125,5 +136,26 @@ rule HaikuSubInclude tokens
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# The variable used to collect the deferred SubIncludes.
|
|
||||||
HAIKU_DEFERRED_SUB_INCLUDES = ;
|
# pragma mark - Unique IDs/targets
|
||||||
|
|
||||||
|
|
||||||
|
# private to NextID; incremented with each NextID invocation
|
||||||
|
HAIKU_NEXT_ID = 0 ;
|
||||||
|
|
||||||
|
rule NextID
|
||||||
|
{
|
||||||
|
# NextID ;
|
||||||
|
|
||||||
|
local result = $(HAIKU_NEXT_ID:J=) ;
|
||||||
|
HAIKU_NEXT_ID = [ AddNumAbs $(HAIKU_NEXT_ID) : 1 ] ;
|
||||||
|
return $(result) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
rule NewUniqueTarget basename
|
||||||
|
{
|
||||||
|
# NewUniqueTarget [ basename ] ;
|
||||||
|
|
||||||
|
local id = [ NextID ] ;
|
||||||
|
return $(basename[1]:E=_target:G=unique!target)_$(id) ;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user