From 08125d0764a2b2f10e8ade3ba7be96bf6227ed36 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 13 Jul 2002 16:50:16 +0000 Subject: [PATCH] * 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 --- Jamrules | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Jamrules b/Jamrules index 3f8925988d..260a9a925d 100644 --- a/Jamrules +++ b/Jamrules @@ -106,6 +106,7 @@ rule UserObject switch $(2) { case *.S : assemble $(1) : $(2) ; + case *.o : return ; case * : ECHO "unknown suffix on" $(2) ; } } @@ -332,7 +333,7 @@ rule StaticLibrary { # StaticLibrary : ; - SetupIncludes ; +# SetupIncludes ; SetupObjectsDir ; MakeLocateObjects $(2) ; Library lib$(<).a : $(>) ; @@ -716,6 +717,34 @@ actions Chmod1 $(CHMOD) "$(MODE)" "$(1)" } +rule ObjectReference +{ + # ObjectReference : + # Makes refer to the same file as . + # The filenames must of course be identical. + # 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 + # Creates local references to , i.e. identifiers with the + # current grist referring to the same files. must have + # already been LOCATEd. + + local source ; + for source in $(1) { + ObjectReference [ FGristFiles $(source) ] : $(source) ; + } +} + ## Kernel stuff!