diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-10-15 15:36:25 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-10-15 15:40:33 +0200 |
commit | 0349c738da5970d9f0fc10d7cf4d7b766ce10e13 (patch) | |
tree | 572fa7304614ae5cac51938d45823114655e145e /solenv/gbuild/LinkTarget.mk | |
parent | 41d6a0ea2d2d3c8daa758771bf956036d84cbe1a (diff) |
support for compiler rewriters
Change-Id: I12e98ac9fc49ef2007914324006a396d183b778c
Diffstat (limited to 'solenv/gbuild/LinkTarget.mk')
-rw-r--r-- | solenv/gbuild/LinkTarget.mk | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index 617fc562bb2e..00c218697c11 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -114,6 +114,9 @@ gb_Object__command_dep = \ $(call gb_Output_error,gb_Object__command_dep is only for gb_FULLDEPS) endif +# This one only exists to force .c/.cxx "rebuilds" when running a compiler tool. +.PHONY: force_compiler_tool_run +force_compiler_tool_run: # CObject class @@ -121,8 +124,13 @@ gb_CObject_get_source = $(1)/$(2).c # defined by platform # gb_CObject__command +ifneq ($(COMPILER_PLUGIN_TOOL),) +$(call gb_CObject_get_target,%) : $(call gb_CObject_get_source,$(SRCDIR),%) force_compiler_tool_run + $(call gb_CObject__tool_command,$*,$<) +else $(call gb_CObject_get_target,%) : $(call gb_CObject_get_source,$(SRCDIR),%) $(call gb_CObject__command,$@,$*,$<,$(call gb_CObject_get_dep_target,$*)) +endif ifeq ($(gb_FULLDEPS),$(true)) $(call gb_CObject_get_dep_target,%) : @@ -138,8 +146,13 @@ gb_CxxObject_get_source = $(1)/$(2).cxx # defined by platform # gb_CxxObject__command +ifneq ($(COMPILER_PLUGIN_TOOL),) +$(call gb_CxxObject_get_target,%) : $(call gb_CxxObject_get_source,$(SRCDIR),%) force_compiler_tool_run + $(call gb_CxxObject__tool_command,$*,$<) +else $(call gb_CxxObject_get_target,%) : $(call gb_CxxObject_get_source,$(SRCDIR),%) $(call gb_CxxObject__command,$@,$*,$<,$(call gb_CxxObject_get_dep_target,$*)) +endif ifeq ($(gb_FULLDEPS),$(true)) $(call gb_CxxObject_get_dep_target,%) : @@ -252,6 +265,11 @@ gb_ObjCxxObject_get_source = $(1)/$(2).mm # defined by platform # gb_ObjCxxObject__command +ifneq ($(COMPILER_PLUGIN_TOOL),) +$(call gb_ObjCxxObject_get_target,%) : $(call gb_ObjCxxObject_get_source,$(SRCDIR),%) force_compiler_tool_run + $(call gb_ObjCxxObject__tool_command,$*,$<) +else + $(call gb_ObjCxxObject_get_target,%) : $(call gb_ObjCxxObject_get_source,$(SRCDIR),%) $(call gb_ObjCxxObject__command,$@,$*,$<,$(call gb_ObjCxxObject_get_dep_target,$*)) @@ -261,6 +279,7 @@ $(call gb_ObjCxxObject_get_dep_target,%) : $(call gb_Object__command_dep,$@,$(call gb_ObjCxxObject_get_target,$*))) endif +endif # ObjCObject class @@ -270,6 +289,11 @@ gb_ObjCObject_get_source = $(1)/$(2).m # defined by platform # gb_ObjCObject__command +ifneq ($(COMPILER_PLUGIN_TOOL),) +$(call gb_ObjCObject_get_target,%) : $(call gb_ObjCObject_get_source,$(SRCDIR),%) force_compiler_tool_run + $(call gb_ObjCObject__tool_command,$*,$<) +else + $(call gb_ObjCObject_get_target,%) : $(call gb_ObjCObject_get_source,$(SRCDIR),%) $(call gb_ObjCObject__command,$@,$*,$<,$(call gb_ObjCObject_get_dep_target,$*)) @@ -279,6 +303,7 @@ $(call gb_ObjCObject_get_dep_target,%) : $(call gb_Object__command_dep,$@,$(call gb_ObjCObject_get_target,$*))) endif +endif # AsmObject class |