diff options
author | Michael Stahl <mstahl@redhat.com> | 2018-01-10 13:11:19 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2018-01-10 15:27:28 +0100 |
commit | 21ee376d99c040990b53df836f46792a70c3ccdf (patch) | |
tree | 014239acb45d47b6aad7800f95567df29843c961 | |
parent | 728104b31c89c93c8211fcd78a2c7a38192268eb (diff) |
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 <mstahl@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
-rw-r--r-- | solenv/gbuild/Module.mk | 7 |
1 files changed, 6 insertions, 1 deletions
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)) |