diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2013-06-16 05:01:45 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2013-06-18 10:06:51 +0200 |
commit | 66a0713dc9c676182fcd7aa1e21f8dc25c05be5e (patch) | |
tree | 3e4fd4107c94aa148b1ca0e0edccfe64f80062f7 /solenv/gbuild/LinkTarget.mk | |
parent | 88085a5b79eb7e11c0609b832c316b63146f4976 (diff) |
handle missing dep files in concat-deps
* this and Ib4762f5a260035f00b5e68cf45b687fdf02e9c02 reduces a default
build on my machine from 2min25sec to 2min12sec
* without unitchecks, its down to 1min50sec now
* it reduces the build time on a i7-4770 Windows tinderbox from 99min to
89min
* by now it also takes care of avoiding most string copying, although
this can certainly be considered overeager given that the file
creation on Windows took ~250ms per file before and still will take a
lot longer than any string operation with this change
Change-Id: I515432bdefe2b055c78b6ba97868adbde65d9165
Diffstat (limited to 'solenv/gbuild/LinkTarget.mk')
-rw-r--r-- | solenv/gbuild/LinkTarget.mk | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk index 63f0f1184fd3..626db2752f0a 100644 --- a/solenv/gbuild/LinkTarget.mk +++ b/solenv/gbuild/LinkTarget.mk @@ -98,18 +98,6 @@ endef # dep file as a side effect. # In the dep file rule just touch it so it's newer than the object. -# The gb_Object__command_dep generates an "always rebuild" dep file; -# It is used on first build and in case the user deletes the object dep file. -ifeq ($(gb_FULLDEPS),$(true)) -define gb_Object__command_dep - echo "$(2) : $(gb_Helper_PHONY)" > $(1) - -endef -else -gb_Object__command_dep = \ - $(call gb_Output_error,gb_Object__command_dep is only for gb_FULLDEPS) -endif - ifneq ($(FORCE_COMPILE_ALL),) # This one only exists to force .c/.cxx "rebuilds" when running a compiler tool. .PHONY: force_compile_all_target @@ -133,8 +121,7 @@ endif ifeq ($(gb_FULLDEPS),$(true)) $(call gb_CObject_get_dep_target,%) : - $(if $(wildcard $@),touch $@,\ - $(call gb_Object__command_dep,$@,$(call gb_CObject_get_target,$*))) + $(if $(wildcard $@),touch $@) endif @@ -191,8 +178,7 @@ $(dir $(call gb_CxxObject_get_dep_target,%))%/.dir : $(call gb_CxxObject_get_dep_target,%) : $(if $(wildcard $@),touch $@,\ - $(eval $(gb_CxxObject__set_pchflags))\ - $(call gb_Object__command_dep,$@,$(call gb_CxxObject_get_target,$*))) + $(eval $(gb_CxxObject__set_pchflags))) endif @@ -209,8 +195,7 @@ $(call gb_GenCObject_get_target,%) : ifeq ($(gb_FULLDEPS),$(true)) $(call gb_GenCObject_get_dep_target,%) : - $(if $(wildcard $@),touch $@,\ - $(call gb_Object__command_dep,$@,$(call gb_GenCObject_get_target,$*))) + $(if $(wildcard $@),touch $@) endif @@ -229,8 +214,7 @@ $(call gb_GenCxxObject_get_target,%) : ifeq ($(gb_FULLDEPS),$(true)) $(call gb_GenCxxObject_get_dep_target,%) : $(if $(wildcard $@),touch $@,\ - $(eval $(gb_CxxObject__set_pchflags))\ - $(call gb_Object__command_dep,$@,$(call gb_GenCxxObject_get_target,$*))) + $(eval $(gb_CxxObject__set_pchflags))) endif @@ -312,8 +296,7 @@ $(call gb_ObjCxxObject_get_target,%) : $(call gb_ObjCxxObject_get_source,$(SRCDI ifeq ($(gb_FULLDEPS),$(true)) $(call gb_ObjCxxObject_get_dep_target,%) : - $(if $(wildcard $@),touch $@,\ - $(call gb_Object__command_dep,$@,$(call gb_ObjCxxObject_get_target,$*))) + $(if $(wildcard $@),touch $) endif endif @@ -336,8 +319,7 @@ $(call gb_ObjCObject_get_target,%) : $(call gb_ObjCObject_get_source,$(SRCDIR),% ifeq ($(gb_FULLDEPS),$(true)) $(call gb_ObjCObject_get_dep_target,%) : - $(if $(wildcard $@),touch $@,\ - $(call gb_Object__command_dep,$@,$(call gb_ObjCObject_get_target,$*))) + $(if $(wildcard $@),touch $@) endif endif @@ -353,9 +335,14 @@ $(call gb_AsmObject_get_target,%) : $(call gb_AsmObject_get_source,$(SRCDIR),%) $(call gb_AsmObject__command,$@,$*,$<,$(call gb_AsmObject_get_dep_target,$*)) ifeq ($(gb_FULLDEPS),$(true)) +$(dir $(call gb_AsmObject_get_dep_target,%)).dir : + $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@)) + +$(dir $(call gb_AsmObject_get_dep_target,%))%/.dir : + $(if $(wildcard $(dir $@)),,mkdir -p $(dir $@)) + $(call gb_AsmObject_get_dep_target,%) : - $(if $(wildcard $@),touch $@,\ - $(call gb_Object__command_dep,$@,$(call gb_AsmObject_get_target,$*))) + $(if $(wildcard $@),touch $@) endif @@ -1000,6 +987,7 @@ $(call gb_AsmObject_get_target,$(2)) : \ ifeq ($(gb_FULLDEPS),$(true)) $(call gb_LinkTarget_get_dep_target,$(1)) : ASMOBJECTS += $(2) $(call gb_LinkTarget_get_dep_target,$(1)) : $(call gb_AsmObject_get_dep_target,$(2)) +$(call gb_AsmObject_get_dep_target,$(2)) :| $(dir $(call gb_AsmObject_get_dep_target,$(2))).dir endif endef |