summaryrefslogtreecommitdiff
path: root/solenv/gbuild
diff options
context:
space:
mode:
Diffstat (limited to 'solenv/gbuild')
-rw-r--r--solenv/gbuild/UnoApi.mk17
-rw-r--r--solenv/gbuild/ZipUnoApi.mk56
-rw-r--r--solenv/gbuild/gbuild.mk1
3 files changed, 57 insertions, 17 deletions
diff --git a/solenv/gbuild/UnoApi.mk b/solenv/gbuild/UnoApi.mk
index 7dd961c9995f..43b7b77b0af8 100644
--- a/solenv/gbuild/UnoApi.mk
+++ b/solenv/gbuild/UnoApi.mk
@@ -33,21 +33,17 @@ $(call gb_UnoApi_get_clean_target,%) :
define gb_UnoApi_UnoApi
$(call gb_UnoApiTarget_UnoApiTarget,$(1))
$(call gb_UnoApiHeadersTarget_UnoApiHeadersTarget,$(1))
-$(call gb_Package_Package_internal,$(1)_idl,$(SRCDIR))
$(call gb_Package_Package_internal,$(1)_inc,$(call gb_UnoApiHeadersTarget_get_dir,$(1)))
$(call gb_UnoApiTarget_set_root,$(1),UCR)
$(call gb_UnoApi_get_target,$(1)) :| $(dir $(call gb_UnoApi_get_target,$(1))).dir
$(call gb_UnoApi_get_target,$(1)) : $(call gb_UnoApiTarget_get_target,$(1))
-$(call gb_UnoApi_get_target,$(1)) :| $(call gb_Package_get_target,$(1)_idl)
$(call gb_UnoApi_get_target,$(1)) :| $(call gb_Package_get_target,$(1)_inc)
$(call gb_UnoApi_get_clean_target,$(1)) : $(call gb_UnoApiTarget_get_clean_target,$(1))
$(call gb_UnoApi_get_clean_target,$(1)) : $(call gb_UnoApiHeadersTarget_get_clean_target,$(1))
-$(call gb_UnoApi_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(1)_idl)
$(call gb_UnoApi_get_clean_target,$(1)) : $(call gb_Package_get_clean_target,$(1)_inc)
-$(call gb_UnoApiTarget_get_headers_target,$(1)) : $(call gb_Package_get_target,$(1)_idl)
$(call gb_Package_get_preparation_target,$(1)_inc) : $(call gb_UnoApiHeadersTarget_get_target,$(1))
$(call gb_Deliver_add_deliverable,$(call gb_UnoApi_get_target,$(1)),$(call gb_UnoApiTarget_get_target,$(1)),$(1))
@@ -57,11 +53,6 @@ $(call gb_Helper_make_userfriendly_targets,$(1),UnoApi)
endef
-define gb_UnoApi__add_idlfile
-$(call gb_Package_add_file,$(1)_idl,$(patsubst $(1)/%,idl/%,$(2)),$(2))
-
-endef
-
define gb_UnoApi__add_headerfile_impl
$(call gb_Package_add_file,$(1)_inc,inc/$(2),$(3))
$(call gb_UnoApiHeadersTarget_add_headerfile,$(1),$(2),$(3))
@@ -75,13 +66,7 @@ $(call gb_UnoApi__add_headerfile_impl,$(1),$(2),$(subst $() $(),/,$(wordlist 2,$
endef
-define gb_UnoApi__add_idlfile_noheader
-$(call gb_UnoApi__add_idlfile,$(1),$(2).idl)
-
-endef
-
define gb_UnoApi__add_idlfile_nohdl
-$(call gb_UnoApi__add_idlfile_noheader,$(1),$(2))
$(call gb_UnoApi__add_headerfile,$(1),$(2).hpp)
endef
@@ -121,13 +106,11 @@ endef
# for old-style services and modules
define gb_UnoApi_add_idlfile_noheader
$(call gb_UnoApiTarget_add_idlfile,$(1),$(2),$(3))
-$(call gb_UnoApi__add_idlfile_noheader,$(1),$(2)/$(3))
endef
define gb_UnoApi_add_idlfiles_noheader
$(call gb_UnoApiTarget_add_idlfiles,$(1),$(2),$(3))
-$(foreach idl,$(3),$(call gb_UnoApi__add_idlfile_noheader,$(1),$(2)/$(idl)))
endef
diff --git a/solenv/gbuild/ZipUnoApi.mk b/solenv/gbuild/ZipUnoApi.mk
new file mode 100644
index 000000000000..8e76dff71abf
--- /dev/null
+++ b/solenv/gbuild/ZipUnoApi.mk
@@ -0,0 +1,56 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+# ZipUnoApi class
+# this is a bit of a hack, hopefully needed only temporarily because
+# scp2 can easily deal with zip files but not so easily with 100s of
+# individual files; ideally the Package itself should be sufficient.
+
+define gb_ZipUnoApi_ZipUnoApi
+$(call gb_UnoApi_UnoApi,$(1),$(2))
+$(call gb_Zip_Zip_internal,$(1),$(WORKDIR)/Zip/$(1))
+$(call gb_UnoApi_get_target,$(1)) : $(call gb_Zip_get_outdir_bin_target,$(1))
+$(call gb_Zip_get_outdir_bin_target,$(1)) : $(call gb_Zip_get_target,$(1))
+ cp $$< $$@
+$(call gb_Zip_get_outdir_bin_target,$(1)) :| $(dir $(call gb_Zip_get_outdir_bin_target,$(1))).dir
+$(call gb_UnoApi_get_clean_target,$(1)) : $(call gb_Zip_get_clean_target,$(1))
+$(call gb_UnoApiTarget_get_headers_target,$(1)) : $(call gb_Zip_get_target,$(1))
+
+endef
+
+# hard-code "idl" path in zip so we don't need another parameter
+define gb_ZipUnoApi__add_idlfiles
+$(foreach file,$(3),$(call gb_Zip_add_file,$(1),$(patsubst $(1)/%,idl/%,$(2))/$(file).idl,$(SRCDIR)/$(2)/$(file).idl))
+
+endef
+
+# sadly source files in udkapi/ but ODK path is idl/ so need to
+# copy files
+# $(1) package
+# $(2) dir in source
+# $(3) file list
+define gb_ZipUnoApi_add_idlfiles
+$(call gb_UnoApi_add_idlfiles,$(1),$(2),$(3))
+$(call gb_ZipUnoApi__add_idlfiles,$(1),$(2),$(3))
+
+endef
+
+define gb_ZipUnoApi_add_idlfiles_nohdl
+$(call gb_UnoApi_add_idlfiles_nohdl,$(1),$(2),$(3))
+$(call gb_ZipUnoApi__add_idlfiles,$(1),$(2),$(3))
+
+endef
+
+define gb_ZipUnoApi_add_idlfiles_noheader
+$(call gb_UnoApi_add_idlfiles_noheader,$(1),$(2),$(3))
+$(call gb_ZipUnoApi__add_idlfiles,$(1),$(2),$(3))
+
+endef
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index f9ce8d6d6694..aff848b27899 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -333,6 +333,7 @@ include $(foreach class, \
CliUnoApi \
Zip \
ZipPackage \
+ ZipUnoApi \
AllLangZip \
Configuration \
HelpTarget \