solenv/gbuild/Module.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
New commits: commit 21ee376d99c040990b53df836f46792a70c3ccdf Author: Michael Stahl <[email protected]> Date: Wed Jan 10 13:11:19 2018 +0100 gbuild: print a better error message when adding non-existing Module A confusing message "Corrupted module target stack!" is printed because: "If an included makefile cannot be found in any of these directories, a warning message is generated, but it is not an immediately fatal error; processing of the makefile containing the include continues. Once it has finished reading makefiles, make will try to remake any that are out of date or donât exist." Change-Id: Ia728c0283885fe839dbf8dd8ae2a885230f23836 Reviewed-on: https://gerrit.libreoffice.org/47701 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins <[email protected]> diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk index bd1873544f91..0d87ccc55379 100644 --- a/solenv/gbuild/Module.mk +++ b/solenv/gbuild/Module.mk @@ -380,8 +380,13 @@ $(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET) endef +define gb_Module__modulefile +$(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS)))/$(2)/Module_$(2).mk +endef + define gb_Module_add_moduledir -include $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS)))/$(2)/Module_$(2).mk +$(if $(wildcard $(call gb_Module__modulefile,$(1),$(2))),,$(call gb_Output_error,Module does not exist: $(call gb_Module__modulefile,$(1),$(2)))) +include $(call gb_Module__modulefile,$(1),$(2)) $(call gb_Module_get_target,$(1)) : $$(firstword $$(gb_Module_TARGETSTACK)) $(call gb_Module_get_l10n_target,$(1)) : $$(firstword $$(gb_Module_L10NTARGETSTACK)) $(call gb_Module_get_check_target,$(1)) : $$(firstword $$(gb_Module_CHECKTARGETSTACK))
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
