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!