solenv/gbuild/AutoInstall.mk | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-)
New commits: commit c33fb4828e2fda2648f11614a20ce0172d4af3db Author: Michael Stahl <mst...@redhat.com> Date: Tue Feb 16 12:39:14 2016 +0100 gbuild: yet more substitution for AutoInstall Pyuno creates packages with a "/" in the name, so need to escape that too. Since it's getting a bit repetitive facotr out a function to do the escaping. Change-Id: I4481d6a291b384390723a04e3e82615e73edc7eb Reviewed-on: https://gerrit.libreoffice.org/22392 Reviewed-by: David Ostrovsky <da...@ostrovsky.org> Tested-by: Jenkins <c...@libreoffice.org> diff --git a/solenv/gbuild/AutoInstall.mk b/solenv/gbuild/AutoInstall.mk index 11ff644..ebf3e30a 100644 --- a/solenv/gbuild/AutoInstall.mk +++ b/solenv/gbuild/AutoInstall.mk @@ -9,24 +9,28 @@ # AutoInstall class +define gb_AutoInstall__escape +$(subst .,_,$(subst -,_,$(subst /,_,$(1)))) +endef + define gb_AutoInstall__make_define echo "#define auto_$*_ALL \ " >> $@ -$(foreach binary,$(filter-out $(lastword $(1)),$(1)),echo " $(subst .,_,$(subst -,_,$(binary))), \ " >> $@;) -echo " $(subst .,_,$(subst -,_,$(lastword $(1))))" >> $@; +$(foreach binary,$(filter-out $(lastword $(1)),$(1)),echo " $(call gb_AutoInstall__escape$(binary)), \ " >> $@;) +echo " $(call gb_AutoInstall__escape,$(lastword $(1)))" >> $@; echo "" >> $@ endef define gb_AutoInstall__gen_define $(file >>$@,#define auto_$*_ALL \) $(foreach binary,$(filter-out $(lastword $(1)),$(1)),$(file >>$@,\ - $(subst .,_,$(subst -,_,$(binary))), \)) + $(call gb_AutoInstall__escape,$(binary)), \)) $(file >>$@,\ - $(subst .,_,$(subst -,_,$(lastword $(1))))) + $(call gb_AutoInstall__escape,$(lastword $(1)))) endef define gb_AutoInstall__gen_lib -$(SCP2LIBTEMPLATE)(auto_$*_lib_$(subst .,_,$(subst -,_,$(1))),$(call gb_Library_get_runtime_filename,$(1))$(if $(SCP2COMPONENTCONDITION),$(COMMA)$(SCP2COMPONENTCONDITION))) +$(SCP2LIBTEMPLATE)(auto_$*_lib_$(call gb_AutoInstall__escape,$(1)),$(call gb_Library_get_runtime_filename,$(1))$(if $(SCP2COMPONENTCONDITION),$(COMMA)$(SCP2COMPONENTCONDITION))) endef @@ -46,7 +50,7 @@ ifeq ($(HAVE_GNUMAKE_FILE_FUNC),) $(foreach jar,$(gb_Jar_MODULE_$*),auto_$*_jar_$(jar)) \ $(foreach pkg,$(gb_Package_MODULE_$*),auto_$*_pkg_$(pkg))) $(foreach lib,$(gb_Library_MODULE_$*),\ - echo '$(SCP2LIBTEMPLATE)(auto_$*_lib_$(subst .,_,$(subst -,_,$(lib))),$(call gb_Library_get_runtime_filename,$(lib))$(if $(SCP2COMPONENTCONDITION),$(COMMA)$(SCP2COMPONENTCONDITION)))' >> $@;) + echo '$(SCP2LIBTEMPLATE)(auto_$*_lib_$(call gb_AutoInstall__escape$(lib)),$(call gb_Library_get_runtime_filename,$(lib))$(if $(SCP2COMPONENTCONDITION),$(COMMA)$(SCP2COMPONENTCONDITION)))' >> $@;) else $(file >$@,/* autogenerated installs for group $* */) $(call gb_AutoInstall__gen_define,\ @@ -60,11 +64,11 @@ endif $(foreach lib,$(gb_SdkLinkLibrary_MODULE_$*),\ echo 'SDK_LIBRARY_LINK(auto_$*_link_$(lib),$(notdir $(call gb_Library_get_sdk_link_lib,$(lib))),../../program/$(call gb_Library_get_runtime_filename,$(lib)))' >> $@;) $(foreach exe,$(gb_Executable_MODULE_$*),\ - echo "$(SCP2EXETEMPLATE)(auto_$*_exe_$(subst .,_,$(subst -,_,$(exe))),$(call gb_Executable_get_filename,$(exe))$(if $(SCP2COMPONENTCONDITION),$(COMMA)$(SCP2COMPONENTCONDITION)))" >> $@;) + echo "$(SCP2EXETEMPLATE)(auto_$*_exe_$(call gb_AutoInstall__escape,$(exe)),$(call gb_Executable_get_filename,$(exe))$(if $(SCP2COMPONENTCONDITION),$(COMMA)$(SCP2COMPONENTCONDITION)))" >> $@;) $(foreach jar,$(gb_Jar_MODULE_$*),\ - echo '$(SCP2JARTEMPLATE)(auto_$*_jar_$(subst .,_,$(subst -,_,$(jar))),$(jar).jar)' >> $@;) + echo '$(SCP2JARTEMPLATE)(auto_$*_jar_$(call gb_AutoInstall__escape,$(jar)),$(jar).jar)' >> $@;) $(foreach pkg,$(gb_Package_MODULE_$*),\ - echo 'PACKAGE_FILELIST(auto_$*_pkg_$(subst -,_,$(pkg)),$(pkg).filelist)' >> $@;) + echo 'PACKAGE_FILELIST(auto_$*_pkg_$(call gb_AutoInstall__escape,$(pkg)),$(pkg).filelist)' >> $@;) $(call gb_AutoInstall_get_clean_target,%) : _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits