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

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/47701Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 728104b3
......@@ -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))
......
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