Kaydet (Commit) 23605574 authored tarafından Michael Stahl's avatar Michael Stahl

further spurious dep-file rebuild fixes:

With the way dep-file generation was changed for LinkTargets in
8b5a984d, it is necessary to change all
other dep-file generation the same way, because the LinkTarget dep-files
are outdated wrt. the object dep-files after an initial make run, and
hence if any other dep-file depends in any way (even build-order) on a
generated Executable, say by depending on the corresponding target file,
then the PHONY entries in the outdated LinkTarget dep-files for the
executable and its linked libraries cause all these objects to be
recompiled.

It is not a problem that there is a rule with the dep-file as target,
and another rule for the corresponding actual target that writes the
dep-file as a side-effect, without dependecy between the targets:
because make does processing in 2 phases, first building all included
makefiles, second all other targets, it is guaranteed that the 2
commands don't race to overwrite the dep-file because (when there is no
dependency between them) they will not be executed in the same phase.

The only problem here is that this will probably make IDL processing a
lot slower on Windows, writing all those dummy dep-files.
üst 6cdc3b9c
...@@ -100,9 +100,6 @@ $(call gb_SrsPartTarget_get_dep_target,%) : $(SRCDIR)/% $(gb_Helper_MISCDUMMY) ...@@ -100,9 +100,6 @@ $(call gb_SrsPartTarget_get_dep_target,%) : $(SRCDIR)/% $(gb_Helper_MISCDUMMY)
$(call gb_Helper_abbreviate_dirs,\ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && \ mkdir -p $(dir $@) && \
echo '$(call gb_SrsPartTarget_get_target,$*) : $(gb_Helper_PHONY)' > $@) echo '$(call gb_SrsPartTarget_get_target,$*) : $(gb_Helper_PHONY)' > $@)
$(call gb_SrsPartTarget_get_dep_target,%) :
$(eval $(call gb_Output_error,Unable to find resource definition file $* in repositories: $(gb_SrsPartTarget_REPOS)))
endif endif
...@@ -237,7 +234,6 @@ $(call gb_SrsTarget_get_external_headers_target,%) : ...@@ -237,7 +234,6 @@ $(call gb_SrsTarget_get_external_headers_target,%) :
mkdir -p $(dir $@) && touch $@) mkdir -p $(dir $@) && touch $@)
$(call gb_SrsTarget_get_target,%) : $(call gb_SrsTarget_get_target,%) :
$(call gb_SrsTarget__command_dep,$(call gb_SrsTarget_get_dep_target,$*),$*,$(foreach part,$(PARTS),$(call gb_SrsPartTarget_get_dep_target,$(part))))
$(call gb_Output_announce,$*,$(true),SRS,1) $(call gb_Output_announce,$*,$(true),SRS,1)
$(call gb_Helper_abbreviate_dirs,\ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $@) && \ mkdir -p $(dir $@) && \
...@@ -257,11 +253,7 @@ $(call gb_SrsTarget_get_target,$(1)) : PARTS := ...@@ -257,11 +253,7 @@ $(call gb_SrsTarget_get_target,$(1)) : PARTS :=
$(call gb_SrsTarget_get_target,$(1)) : $(call gb_SrsTemplateTarget_get_target,$(1)) $(call gb_SrsTarget_get_target,$(1)) : $(call gb_SrsTemplateTarget_get_target,$(1))
$(call gb_SrsTarget_get_clean_target,$(1)) : $(call gb_SrsTemplateTarget_get_clean_target,$(1)) $(call gb_SrsTarget_get_clean_target,$(1)) : $(call gb_SrsTemplateTarget_get_clean_target,$(1))
ifeq ($(gb_FULLDEPS),$(true)) ifeq ($(gb_FULLDEPS),$(true))
ifneq ($(wildcard $(call gb_SrsTarget_get_dep_target,$(1))),) -include $(call gb_SrsTarget_get_dep_target,$(1))
include $(call gb_SrsTarget_get_dep_target,$(1))
else
$(firstword $(MAKEFILE_LIST)) : $(call gb_SrsTarget_get_dep_target,$(1))
endif
endif endif
endef endef
......
...@@ -253,7 +253,7 @@ $(call gb_ObjCxxObject_get_target,%) : $(call gb_ObjCxxObject_get_source,$(SRCDI ...@@ -253,7 +253,7 @@ $(call gb_ObjCxxObject_get_target,%) : $(call gb_ObjCxxObject_get_source,$(SRCDI
$(call gb_ObjCxxObject__command,$@,$*,$<,$(call gb_ObjCxxObject_get_dep_target,$*)) $(call gb_ObjCxxObject__command,$@,$*,$<,$(call gb_ObjCxxObject_get_dep_target,$*))
ifeq ($(gb_FULLDEPS),$(true)) ifeq ($(gb_FULLDEPS),$(true))
$(call gb_ObjCxxObject_get_dep_target,%) : $(call gb_ObjCxxObject_get_target,%) $(call gb_ObjCxxObject_get_dep_target,%) :
$(if $(wildcard $@),touch $@,\ $(if $(wildcard $@),touch $@,\
$(call gb_Object__command_dep,$@,$(call gb_ObjCxxObject_get_target,$*))) $(call gb_Object__command_dep,$@,$(call gb_ObjCxxObject_get_target,$*)))
...@@ -271,7 +271,7 @@ $(call gb_ObjCObject_get_target,%) : $(call gb_ObjCObject_get_source,$(SRCDIR),% ...@@ -271,7 +271,7 @@ $(call gb_ObjCObject_get_target,%) : $(call gb_ObjCObject_get_source,$(SRCDIR),%
$(call gb_ObjCObject__command,$@,$*,$<,$(call gb_ObjCObject_get_dep_target,$*)) $(call gb_ObjCObject__command,$@,$*,$<,$(call gb_ObjCObject_get_dep_target,$*))
ifeq ($(gb_FULLDEPS),$(true)) ifeq ($(gb_FULLDEPS),$(true))
$(call gb_ObjCObject_get_dep_target,%) : $(call gb_ObjCObject_get_target,%) $(call gb_ObjCObject_get_dep_target,%) :
$(if $(wildcard $@),touch $@,\ $(if $(wildcard $@),touch $@,\
$(call gb_Object__command_dep,$@,$(call gb_ObjCObject_get_target,$*))) $(call gb_Object__command_dep,$@,$(call gb_ObjCObject_get_target,$*)))
...@@ -374,7 +374,6 @@ $(call gb_LinkTarget_get_target,%) : $(call gb_LinkTarget_get_headers_target,%) ...@@ -374,7 +374,6 @@ $(call gb_LinkTarget_get_target,%) : $(call gb_LinkTarget_get_headers_target,%)
$(call gb_LinkTarget__command_objectlist,$@,$*) $(call gb_LinkTarget__command_objectlist,$@,$*)
ifeq ($(gb_FULLDEPS),$(true)) ifeq ($(gb_FULLDEPS),$(true))
$(call gb_LinkTarget_get_target,%) : | $(call gb_LinkTarget_get_dep_target,%)
$(call gb_LinkTarget_get_dep_target,%) : $(call gb_LinkTarget_get_dep_target,%) :
$(call gb_LinkTarget__command_dep,$@,$*,$(COBJECTS),$(CXXOBJECTS),$(OBJCOBJECTS),$(OBJCXXOBJECTS),$(ASMOBJECTS),$(GENCOBJECTS),$(GENCXXOBJECTS)) $(call gb_LinkTarget__command_dep,$@,$*,$(COBJECTS),$(CXXOBJECTS),$(OBJCOBJECTS),$(OBJCXXOBJECTS),$(ASMOBJECTS),$(GENCOBJECTS),$(GENCXXOBJECTS))
endif endif
......
...@@ -53,10 +53,9 @@ $(call gb_SdiTarget_get_target,%) : $(SRCDIR)/%.sdi | $(gb_SdiTarget_SVIDLTARGET ...@@ -53,10 +53,9 @@ $(call gb_SdiTarget_get_target,%) : $(SRCDIR)/%.sdi | $(gb_SdiTarget_SVIDLTARGET
$<) $<)
ifeq ($(gb_FULLDEPS),$(true)) ifeq ($(gb_FULLDEPS),$(true))
$(call gb_SdiTarget_get_dep_target,%) : $(call gb_SdiTarget_get_target,%) $(call gb_SdiTarget_get_dep_target,%) :
$(if $(wildcard $@),touch $@,\ $(if $(wildcard $@),touch $@,\
$(call gb_Object__command_dep,$@,$(call gb_SdiTarget_get_target,$*))) $(call gb_Object__command_dep,$@,$(call gb_SdiTarget_get_target,$*)))
endif endif
.PHONY : $(call gb_SdiTarget_get_clean_target,%) .PHONY : $(call gb_SdiTarget_get_clean_target,%)
......
...@@ -160,7 +160,7 @@ endef ...@@ -160,7 +160,7 @@ endef
ifeq ($(gb_FULLDEPS),$(true)) ifeq ($(gb_FULLDEPS),$(true))
$(call gb_UnoApiTarget_get_dep_target,%) : $(call gb_UnoApiTarget_get_target,%) $(call gb_UnoApiTarget_get_dep_target,%) :
$(call gb_UnoApiTarget__command_dep,$@,$*,$(UNOAPI_IDLFILES)) $(call gb_UnoApiTarget__command_dep,$@,$*,$(UNOAPI_IDLFILES))
endif endif
...@@ -197,8 +197,6 @@ ifeq ($(gb_FULLDEPS),$(true)) ...@@ -197,8 +197,6 @@ ifeq ($(gb_FULLDEPS),$(true))
$(call gb_UnoApiTarget_get_dep_target,$(1)) : UNOAPI_IDLFILES += $(2)/$(3).idl $(call gb_UnoApiTarget_get_dep_target,$(1)) : UNOAPI_IDLFILES += $(2)/$(3).idl
$(call gb_UnoApiTarget_get_dep_target,$(1)) : \ $(call gb_UnoApiTarget_get_dep_target,$(1)) : \
$(call gb_UnoApiPartTarget_get_dep_target,$(2)/$(3)) $(call gb_UnoApiPartTarget_get_dep_target,$(2)/$(3))
$(call gb_UnoApiPartTarget_get_dep_target,$(2)/$(3)) : \
$(call gb_UnoApiPartTarget_get_target,$(2)/idl.done)
endif endif
endef endef
......
...@@ -16,12 +16,7 @@ $(call gb_WinResTarget_get_target,$(1)) : INCLUDE := $(SOLARINC) ...@@ -16,12 +16,7 @@ $(call gb_WinResTarget_get_target,$(1)) : INCLUDE := $(SOLARINC)
$(call gb_WinResTarget_get_clean_target,$(1)) : RCFILE := $(call gb_WinResTarget_get_clean_target,$(1)) : RCFILE :=
$(call gb_WinResTarget_get_target,$(1)) : RCFILE := $(call gb_WinResTarget_get_target,$(1)) : RCFILE :=
ifeq ($(gb_FULLDEPS),$(true)) ifeq ($(gb_FULLDEPS),$(true))
$(call gb_WinResTarget_get_target,$(1)) : $(call gb_WinResTarget_get_dep_target,$(1)) -include $(call gb_WinResTarget_get_dep_target,$(1))
ifneq ($(wildcard $(call gb_WinResTarget_get_dep_target,$(1))),)
include $(call gb_WinResTarget_get_dep_target,$(1))
else
$(firstword $(MAKEFILE_LIST)) : $(call gb_WinResTarget_get_dep_target,$(1))
endif
$(call gb_WinResTarget_get_dep_target,$(1)) : DEFS := $$(gb_WinResTarget_DEFAULTDEFS) $(call gb_WinResTarget_get_dep_target,$(1)) : DEFS := $$(gb_WinResTarget_DEFAULTDEFS)
$(call gb_WinResTarget_get_dep_target,$(1)) : INCLUDE := $$(gb_WinResTarget_INCLUDE) $(call gb_WinResTarget_get_dep_target,$(1)) : INCLUDE := $$(gb_WinResTarget_INCLUDE)
$(call gb_WinResTarget_get_dep_target,$(1)) : RCFILE := $(call gb_WinResTarget_get_dep_target,$(1)) : RCFILE :=
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment