diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2016-11-30 09:15:53 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-12-07 15:42:23 +0000 |
commit | 4d5e5908b41308152698cfd769173c69cb3569d4 (patch) | |
tree | 9a6400a598593db50319f4d6b40d452b68aa6ae1 | |
parent | 20b54a228b2844ad66d80d930d4a9eb39ce8c336 (diff) |
tdf#97803: gbuild: Check that every package is registered
Change-Id: Idedad62ac28804f4725d6bda2f4633ed79c01535
Reviewed-on: https://gerrit.libreoffice.org/31571
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | Repository.mk | 35 | ||||
-rw-r--r-- | solenv/gbuild/Helper.mk | 18 | ||||
-rw-r--r-- | solenv/gbuild/Package.mk | 4 |
3 files changed, 57 insertions, 0 deletions
diff --git a/Repository.mk b/Repository.mk index 77dad7341971..245befa601ac 100644 --- a/Repository.mk +++ b/Repository.mk @@ -768,6 +768,41 @@ $(eval $(call gb_Helper_register_jars,NONE,\ )) endif +# 'test_unittest' is only package delivering to workdir. +# Other packages could be potentially autoinstalled. +$(eval $(call gb_Helper_register_packages, \ + test_unittest \ + cli_basetypes_copy \ + $(if $(BUILD_POSTGRESQL_SDBC),connectivity_postgresql-sdbc) \ + $(if $(and $(filter MSC,$(COM)),$(ENABLE_CRASHDUMP)),dbghelp) \ + desktop_install \ + $(if $(filter DESKTOP,$(BUILD_TYPE)),desktop_scripts_install) \ + extras_fonts \ + extras_wordbook \ + $(if $(filter WNTGCC,$(OS)$(COM)), \ + mingw_dlls \ + mingw_gccdlls \ + ) \ + $(if $(filter MSC,$(COM)),msvc_dlls) \ + more_fonts_conf \ + instsetoo_native_setup \ + $(if $(ENABLE_OOENV),instsetoo_native_ooenv) \ + libreofficekit_selectionhandles \ + odk_headers_generated \ + oox_customshapes \ + oox_generated \ + postprocess_images \ + postprocess_registry \ + python_zipcore \ + readlicense_oo_readmes \ + sc_res_xml \ + sdext_pdfimport_pdf \ + setup_native_misc \ + share \ + shell_senddoc \ + vcl_fontunxpsprint \ +)) + $(eval $(call gb_Helper_register_packages_for_install,impress,\ sd_xml \ )) diff --git a/solenv/gbuild/Helper.mk b/solenv/gbuild/Helper.mk index c3677c011f63..0693f139f365 100644 --- a/solenv/gbuild/Helper.mk +++ b/solenv/gbuild/Helper.mk @@ -231,9 +231,27 @@ gb_Jar_MODULE_$(2) += $(3) endef +define gb_Helper__register_packages +$(foreach target,$(1),\ + $(if $(filter $(target),$(gb_Package_REGISTERED)),\ + $(call gb_Output_error,gb_Helper_register_packages: already registered: $(target)))) +$(if $(filter-out $(words $(1)),$(words $(sort $(1)))),\ + $(call gb_Output_error,gb_Helper_register_packages: contains duplicates: $(1))) + +gb_Package_REGISTERED += $(1) + +endef + +# $(call gb_Helper_register_packages,packages) +define gb_Helper_register_packages +$(call gb_Helper__register_packages,$(1)) + +endef + # $(call gb_Helper_register_packages_for_install,installmodule,packages) define gb_Helper_register_packages_for_install $(if $(2),,$(call gb_Output_error,gb_Helper_register_packages_for_install: no packages - need 2 parameters)) +$(call gb_Helper__register_packages,$(2)) gb_Package_MODULE_$(1) += $(2) diff --git a/solenv/gbuild/Package.mk b/solenv/gbuild/Package.mk index a23728c2b65e..1ab45b687800 100644 --- a/solenv/gbuild/Package.mk +++ b/solenv/gbuild/Package.mk @@ -100,6 +100,10 @@ define gb_Package_Package $$(if $$(gb_Package_SOURCEDIR_$(1)),$$(call gb_Output_error,gb_Package__check: Package $(1) has already been defined)) $(if $(filter postprocess% instsetoo_native%,$(1)),,\ $(call gb_Postprocess_register_target,AllPackages,Package,$(1))) +ifeq (,$$(filter $(1),$$(gb_Package_REGISTERED))) +$$(eval $$(call gb_Output_info,Currently known packages are: $(sort $(gb_Package_REGISTERED)),ALL)) +$$(eval $$(call gb_Output_error,Package $(1) must be registered in Repository.mk or RepositoryExternal.mk)) +endif $(call gb_Package_Package_internal,$(1),$(2)) $$(eval $$(call gb_Module_register_target,$(call gb_Package_get_target,$(1)),$(call gb_Package_get_clean_target,$(1)))) $(call gb_Helper_make_userfriendly_targets,$(1),Package) |