makefile simplification: replace $(call gb_AutoInstall_get_target,foo)

by a simple/static $(gb_AutoInstall_targetdir)/foo and also drop the
custom .dir target

Change-Id: I4893c2675cb076cb8a0b61c0c207a223658b43d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168709
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
This commit is contained in:
Christian Lohmaier
2024-06-19 16:16:05 +02:00
parent 86cd603627
commit 0740c9cde9
4 changed files with 21 additions and 25 deletions
+17 -22
View File
@@ -9,14 +9,12 @@
# AutoInstall class
$(dir $(call gb_AutoInstall_get_target,%)).dir :
$(if $(wildcard $(dir $@)),,mkdir -p $(dir $@))
$(call gb_AutoInstall_get_target,%) : $(GBUILDDIR)/AutoInstall.mk \
$(SRCDIR)/Repository.mk $(SRCDIR)/RepositoryExternal.mk \
$(BUILDDIR)/config_host.mk \
$(GBUILDDIR)/gen-autoinstall.py \
$(call gb_ExternalExecutable_get_dependencies,python)
$(gb_AutoInstall_targetdir)/% : $(GBUILDDIR)/AutoInstall.mk \
$(SRCDIR)/Repository.mk $(SRCDIR)/RepositoryExternal.mk \
$(BUILDDIR)/config_host.mk \
$(GBUILDDIR)/gen-autoinstall.py \
$(call gb_ExternalExecutable_get_dependencies,python) \
| $(gb_AutoInstall_targetdir)/.dir
$(call gb_Output_announce,$*,$(true),AIN,3)
$(call gb_Trace_StartRange,$*,AIN)
SDKLIBFILE=$(call gb_var2file,$(shell $(gb_MKTEMP)),\
@@ -47,29 +45,26 @@ $(call gb_AutoInstall_get_target,%) : $(GBUILDDIR)/AutoInstall.mk \
$(call gb_AutoInstall_get_clean_target,%) :
$(call gb_Output_announce,$*,$(false),AIL,3)
rm -f $(call gb_AutoInstall_get_target,$*)
rm -f $(gb_AutoInstall_targetdir)/$*
define gb_AutoInstall_AutoInstall
$(call gb_AutoInstall_get_target,all) :| $(dir $(call gb_AutoInstall_get_target,all)).dir
$$(eval $$(call gb_Module_register_target,$(call gb_AutoInstall_get_target,all),$(call gb_AutoInstall_get_clean_target,all)))
$(call gb_Helper_make_userfriendly_targets,all,AutoInstall)
$$(eval $$(call gb_Module_register_target,$(gb_AutoInstall_targetdir)/all,$(call gb_AutoInstall_get_clean_target,all)))
$(call gb_Helper_make_userfriendly_targets,all,AutoInstall,$(gb_AutoInstall_targetdir)/all)
endef
# gb_AutoInstall_add_module module lib_template exe_template jar_template package_template componentcondition
define gb_AutoInstall_add_module
$(call gb_AutoInstall_get_target,all) : $(call gb_AutoInstall_get_target,$(1))
$(gb_AutoInstall_targetdir)/all : $(gb_AutoInstall_targetdir)/$(1)
$(call gb_AutoInstall_get_clean_target,all) : $(call gb_AutoInstall_get_clean_target,$(1))
$(call gb_Helper_make_userfriendly_targets,$(1),AutoInstall)
$(call gb_Helper_make_userfriendly_targets,$(1),AutoInstall,$(gb_AutoInstall_targetdir)/$(1))
$(call gb_AutoInstall_get_target,$(1)) : $(gb_Module_CURRENTMAKEFILE)
$(call gb_AutoInstall_get_target,$(1)) :| $(dir $(call gb_AutoInstall_get_target,$(1))).dir
$(call gb_AutoInstall_get_target,$(1)) : SCP2LIBTEMPLATE := $(2)
$(call gb_AutoInstall_get_target,$(1)) : SCP2EXETEMPLATE := $(3)
$(call gb_AutoInstall_get_target,$(1)) : SCP2JARTEMPLATE := $(4)
$(call gb_AutoInstall_get_target,$(1)) : SCP2PKGTEMPLATE := $(5)
$(call gb_AutoInstall_get_target,$(1)) : SCP2COMPONENTCONDITION := $(6)
$(gb_AutoInstall_targetdir)/$(1) : $(gb_Module_CURRENTMAKEFILE)
$(gb_AutoInstall_targetdir)/$(1) : SCP2LIBTEMPLATE := $(2)
$(gb_AutoInstall_targetdir)/$(1) : SCP2EXETEMPLATE := $(3)
$(gb_AutoInstall_targetdir)/$(1) : SCP2JARTEMPLATE := $(4)
$(gb_AutoInstall_targetdir)/$(1) : SCP2PKGTEMPLATE := $(5)
$(gb_AutoInstall_targetdir)/$(1) : SCP2COMPONENTCONDITION := $(6)
endef
+1 -1
View File
@@ -255,7 +255,7 @@ $(call gb_InstallModuleTarget_add_defs,$(1),\
endef
define gb_InstallModuleTarget_use_auto_install_libs
$(call gb_InstallModuleTarget_get_external_target,$(1)) : $(foreach ai,$(2),$(call gb_AutoInstall_get_target,$(ai)))
$(call gb_InstallModuleTarget_get_external_target,$(1)) : $(foreach ai,$(2),$(gb_AutoInstall_targetdir)/$(ai))
endef
+2 -1
View File
@@ -33,7 +33,8 @@ gb_UnoApi_get_target_for_build = $(INSTROOT_FOR_BUILD)/$(if $(filter udkapi,$(1)
# workdir target patterns
gb_AutoInstall_get_target = $(WORKDIR)/AutoInstall/$(1)
gb_AutoInstall_get_target = $(error please use plain gb_AutoInstall_targetdir instead)
gb_AutoInstall_targetdir := $(WORKDIR)/AutoInstall
gb_AllLangHelp_get_target = $(WORKDIR)/AllLangHelp/$(1)
gb_AllLangHelp_get_helpfiles_target = $(WORKDIR)/AllLangHelp/$(1).helpfiles
gb_AllLangPackage_get_target = $(WORKDIR)/AllLangPackage/$(1)
+1 -1
View File
@@ -1477,7 +1477,7 @@ $(foreach theme,$(WITH_THEMES), \
$(eval gb_emscripten_fs_image_files += $(INSTROOT)/$(LIBO_SHARE_FOLDER)/config/images_$(theme).zip))
ifeq ($(WITH_FONTS),TRUE)
gb_emscripten_fs_image_autoinstall += $(call gb_AutoInstall_get_target,ooo_fonts)
gb_emscripten_fs_image_autoinstall += $(gb_AutoInstall_targetdir)/ooo_fonts
endif
gb_emscripten_fs_image_filelists += $(call gb_Package_get_target,liblangtag_data)