* Commented out SetupIncludes in StaticLibrary.
* Added rules ObjectReference and ObjectReferences which allow for using another identifier referring to an object. In particular useful in combination with... * Added *.o case in UserObject rule. It does simply nothing. This lets you add objects to the list of sources for Objects or Main rules. Very nice, if you want to (re-)use an object built in another directory. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@178 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -106,6 +106,7 @@ rule UserObject
|
|||||||
switch $(2)
|
switch $(2)
|
||||||
{
|
{
|
||||||
case *.S : assemble $(1) : $(2) ;
|
case *.S : assemble $(1) : $(2) ;
|
||||||
|
case *.o : return ;
|
||||||
case * : ECHO "unknown suffix on" $(2) ;
|
case * : ECHO "unknown suffix on" $(2) ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -332,7 +333,7 @@ rule StaticLibrary
|
|||||||
{
|
{
|
||||||
# StaticLibrary <name> : <sources> ;
|
# StaticLibrary <name> : <sources> ;
|
||||||
|
|
||||||
SetupIncludes ;
|
# SetupIncludes ;
|
||||||
SetupObjectsDir ;
|
SetupObjectsDir ;
|
||||||
MakeLocateObjects $(2) ;
|
MakeLocateObjects $(2) ;
|
||||||
Library lib$(<).a : $(>) ;
|
Library lib$(<).a : $(>) ;
|
||||||
@@ -716,6 +717,34 @@ actions Chmod1
|
|||||||
$(CHMOD) "$(MODE)" "$(1)"
|
$(CHMOD) "$(MODE)" "$(1)"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rule ObjectReference
|
||||||
|
{
|
||||||
|
# ObjectReference <reference object> : <source object>
|
||||||
|
# Makes <reference object> refer to the same file as <source object>.
|
||||||
|
# The filenames must of course be identical.
|
||||||
|
# <source object> must have already been LOCATEd.
|
||||||
|
|
||||||
|
local ref = $(1) ;
|
||||||
|
local source = $(2) ;
|
||||||
|
if $(ref) != $(source) {
|
||||||
|
DEPENDS $(ref) : $(source) ;
|
||||||
|
on $(ref) LOCATE = [ on $(source) return $(LOCATE) ] ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
rule ObjectReferences
|
||||||
|
{
|
||||||
|
# ObjectReferences <source objects>
|
||||||
|
# Creates local references to <source objects>, i.e. identifiers with the
|
||||||
|
# current grist referring to the same files. <source objects> must have
|
||||||
|
# already been LOCATEd.
|
||||||
|
|
||||||
|
local source ;
|
||||||
|
for source in $(1) {
|
||||||
|
ObjectReference [ FGristFiles $(source) ] : $(source) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
## Kernel stuff!
|
## Kernel stuff!
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user