[PATCH] install gen. IDL docs using filelist

David Tardon (via Code Review) gerrit at gerrit.libreoffice.org
Tue Apr 23 00:45:04 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3571

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/71/3571/1

install gen. IDL docs using filelist

Change-Id: I474f6e7a45d09683eb0dd7172114407c9dca84d7
---
M odk/CustomTarget_autodoc.mk
M odk/CustomTarget_check.mk
M odk/CustomTarget_odkcommon.mk
M odk/Module_odk.mk
A odk/PackageSet_autodoc.mk
A odk/Package_autodoc.mk
M odk/Package_docs.mk
M scp2/source/sdkoo/module_sdkoo.scp
M scp2/source/sdkoo/sdkoo.scp
M solenv/gbuild/UnoApi.mk
10 files changed, 162 insertions(+), 14 deletions(-)



diff --git a/odk/CustomTarget_autodoc.mk b/odk/CustomTarget_autodoc.mk
index cf87fcc..126d5e2 100644
--- a/odk/CustomTarget_autodoc.mk
+++ b/odk/CustomTarget_autodoc.mk
@@ -7,21 +7,28 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
-$(eval $(call gb_CustomTarget_CustomTarget,odk/odkcommon/docs/common/ref))
+$(eval $(call gb_CustomTarget_CustomTarget,odk/docs/common/ref))
 
-odkcommon_ZIPLIST += docs/common/ref
-odkcommon_ZIPDEPS += $(odk_WORKDIR)/docs/common/ref/module-ix.html
+$(eval $(call gb_CustomTarget_register_targets,odk/docs/common/ref,\
+	autodoc_log.txt \
+))
 
-$(eval $(call gb_CustomTarget_register_target,odk/odkcommon/docs/common/ref,module-ix.html))
-$(odk_WORKDIR)/docs/common/ref/module-ix.html: $(SRCDIR)/odk/pack/copying/idl_chapter_refs.txt \
-	$(SRCDIR)/odk/docs/common/ref/idl.css $(call gb_UnoApi_get_target,offapi) \
-	$(call gb_Executable_get_runtime_dependencies,autodoc)
+$(call gb_CustomTarget_get_workdir,odk/docs/common/ref)/%.html : $(call gb_CustomTarget_get_workdir,odk/docs/common/ref)/autodoc_log.txt
+	touch $@
+
+$(call gb_CustomTarget_get_workdir,odk/docs/common/ref)/autodoc_log.txt : \
+		$(SRCDIR)/odk/pack/copying/idl_chapter_refs.txt \
+		$(SRCDIR)/odk/docs/common/ref/idl.css \
+		$(call gb_Executable_get_runtime_dependencies,autodoc)
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),AUD,1)
-	$(call gb_Helper_execute,autodoc) -html $(dir $@) \
+	$(call gb_Executable_get_command,autodoc) \
+		-html $(dir $@) \
 		-dvgroot "http://wiki.services.openoffice.org/wiki" \
 		-name "LibreOffice $(PRODUCTVERSION) API" \
-		-lg idl -dvgfile $< -t $(SRCDIR)/udkapi $(SRCDIR)/offapi \
-		> $(odk_WORKDIR)/autodoc_log.txt
+		-lg idl \
+		-dvgfile $< \
+		-t $(SRCDIR)/udkapi $(SRCDIR)/offapi \
+		> $@
 
 
 # vim: set noet sw=4 ts=4:
diff --git a/odk/CustomTarget_check.mk b/odk/CustomTarget_check.mk
index 85113b3..620c01e 100644
--- a/odk/CustomTarget_check.mk
+++ b/odk/CustomTarget_check.mk
@@ -41,6 +41,7 @@
 		$(call gb_Package_get_target,odk_settings) \
 		$(call gb_Package_get_target,odk_settings_generated) \
 		$(if $(SOLAR_JAVA),$(call gb_Package_get_target,odk_unowinreg)) \
+		$(call gb_PackageSet_get_target,odk_autodoc) \
 		$(call gb_CustomTarget_get_target,odk/odkcommon)
 	$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CHK,1)
 	$(call gb_Helper_print_on_error,\
diff --git a/odk/CustomTarget_odkcommon.mk b/odk/CustomTarget_odkcommon.mk
index 6b500e8..2d21323 100644
--- a/odk/CustomTarget_odkcommon.mk
+++ b/odk/CustomTarget_odkcommon.mk
@@ -16,7 +16,6 @@
 $(call gb_CustomTarget_get_target,odk/odkcommon): \
 	$(if $(DOXYGEN),$(call gb_CustomTarget_get_target,odk/odkcommon/docs/cpp/ref)) \
 	$(if $(SOLAR_JAVA),$(call gb_CustomTarget_get_target,odk/odkcommon/docs/java/ref)) \
-	$(call gb_CustomTarget_get_target,odk/odkcommon/docs/common/ref) \
 	$(call gb_CustomTarget_get_target,odk/odkcommon/classes) \
 	$(call gb_CustomTarget_get_target,odk/odkcommon/idl) \
 	$(call gb_CustomTarget_get_target,odk/odkcommon/include)
diff --git a/odk/Module_odk.mk b/odk/Module_odk.mk
index 6e78471..fab07fe 100644
--- a/odk/Module_odk.mk
+++ b/odk/Module_odk.mk
@@ -17,6 +17,7 @@
 	CustomTarget_settings \
 	CustomTarget_autodoc \
 	Executable_unoapploader \
+	Package_autodoc \
 	Package_bin \
 	Package_config \
 	Package_docs \
@@ -25,6 +26,7 @@
 	Package_lib \
 	Package_settings \
 	Package_settings_generated \
+	PackageSet_autodoc \
 ))
 
 ifeq ($(OS),WNT)
diff --git a/odk/PackageSet_autodoc.mk b/odk/PackageSet_autodoc.mk
new file mode 100644
index 0000000..4e0ea6a
--- /dev/null
+++ b/odk/PackageSet_autodoc.mk
@@ -0,0 +1,18 @@
+# -*- 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/.
+#
+
+$(eval $(call gb_PackageSet_PackageSet,odk_autodoc))
+
+$(eval $(call gb_PackageSet_add_packages,odk_autodoc,\
+	odk_autodoc \
+	offapi_doc \
+	udkapi_doc \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/Package_autodoc.mk b/odk/Package_autodoc.mk
new file mode 100644
index 0000000..a21d2c0
--- /dev/null
+++ b/odk/Package_autodoc.mk
@@ -0,0 +1,54 @@
+# -*- 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/.
+#
+
+$(eval $(call gb_Package_Package,odk_autodoc,$(call gb_CustomTarget_get_workdir,odk/docs/common/ref)))
+
+$(eval $(call gb_Package_set_outdir,odk_autodoc,$(INSTDIR)))
+
+# indices
+$(eval $(call gb_Package_add_files_with_dir,odk_autodoc,$(gb_Package_SDKDIRNAME)/docs/common/ref,\
+	index-files/index-1.html \
+	index-files/index-10.html \
+	index-files/index-11.html \
+	index-files/index-12.html \
+	index-files/index-13.html \
+	index-files/index-14.html \
+	index-files/index-15.html \
+	index-files/index-16.html \
+	index-files/index-17.html \
+	index-files/index-18.html \
+	index-files/index-19.html \
+	index-files/index-2.html \
+	index-files/index-20.html \
+	index-files/index-21.html \
+	index-files/index-22.html \
+	index-files/index-23.html \
+	index-files/index-24.html \
+	index-files/index-25.html \
+	index-files/index-26.html \
+	index-files/index-27.html \
+	index-files/index-3.html \
+	index-files/index-4.html \
+	index-files/index-5.html \
+	index-files/index-6.html \
+	index-files/index-7.html \
+	index-files/index-8.html \
+	index-files/index-9.html \
+))
+
+# module lists that are not already covered by generated _doc packages
+$(eval $(call gb_Package_add_files_with_dir,odk_autodoc,$(gb_Package_SDKDIRNAME)/docs/common/ref,\
+	com/module-ix.html \
+	com/sun/module-ix.html \
+	module-ix.html \
+	org/freedesktop/module-ix.html \
+	org/module-ix.html \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/odk/Package_docs.mk b/odk/Package_docs.mk
index 3206a0d..24052a9 100644
--- a/odk/Package_docs.mk
+++ b/odk/Package_docs.mk
@@ -12,6 +12,7 @@
 $(eval $(call gb_Package_set_outdir,odk_docs,$(INSTDIR)))
 
 $(eval $(call gb_Package_add_files_with_dir,odk_docs,$(gb_Package_SDKDIRNAME),\
+	docs/common/ref/idl.css \
 	docs/images/arrow-1.gif \
 	docs/images/arrow-2.gif \
 	docs/images/arrow-3.gif \
@@ -33,8 +34,5 @@
 	docs/images/sdk_line-2.gif \
 	docs/sdk_styles.css \
 ))
-
-# This is installed by CustomTarget_autodoc for now
-#	docs/common/ref/idl.css \
 
 # vim: set noet sw=4 ts=4:
diff --git a/scp2/source/sdkoo/module_sdkoo.scp b/scp2/source/sdkoo/module_sdkoo.scp
index 2c965ea..702e0d5 100644
--- a/scp2/source/sdkoo/module_sdkoo.scp
+++ b/scp2/source/sdkoo/module_sdkoo.scp
@@ -34,6 +34,7 @@
     ParentID = gid_Module_Optional;
     Default = NO;
     Files = (
+        gid_File_Package_odk_autodoc,
         gid_File_Package_odk_bin,
         gid_File_Package_odk_cli,
         gid_File_Package_odk_config,
diff --git a/scp2/source/sdkoo/sdkoo.scp b/scp2/source/sdkoo/sdkoo.scp
index 69b6fd8..4920269 100644
--- a/scp2/source/sdkoo/sdkoo.scp
+++ b/scp2/source/sdkoo/sdkoo.scp
@@ -116,6 +116,13 @@
     Styles = (PACKED, SCPZIP_REPLACE);
 End
 
+File gid_File_Package_odk_autodoc
+    TXT_FILE_BODY;
+    Dir = FILELIST_SDK_DIR;
+    Name = "odk_autodoc.filelist";
+    Styles = (FILELIST,USE_INTERNAL_RIGHTS);
+End
+
 File gid_File_Package_odk_bin
     TXT_FILE_BODY;
     Dir = FILELIST_SDK_DIR;
diff --git a/solenv/gbuild/UnoApi.mk b/solenv/gbuild/UnoApi.mk
index 8c31959..fecbd7c 100644
--- a/solenv/gbuild/UnoApi.mk
+++ b/solenv/gbuild/UnoApi.mk
@@ -7,6 +7,11 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 #
 
+gb_UnoApi_DOCDIR := $(gb_Package_SDKDIRNAME)/docs/common/ref
+# NOTE: this is the output dir used in odk/CustomTarget_autodoc.mk
+gb_UnoApi_SRCDOCDIR := $(call gb_CustomTarget_get_workdir,odk/docs/common/ref)
+gb_UnoApi_ENABLE_DOC := $(filter ODK,$(BUILD_TYPE))
+
 .PHONY : $(call gb_UnoApi_get_clean_target,%)
 $(call gb_UnoApi_get_clean_target,%) :
 	$(call gb_Helper_abbreviate_dirs,\
@@ -18,6 +23,10 @@
 $(call gb_Package_Package_internal,$(1)_idl,$(SRCDIR))
 $(call gb_Package_set_outdir,$(1)_idl,$(INSTDIR))
 $(call gb_Package_Package_internal,$(1)_inc,$(call gb_UnoApiHeadersTarget_get_dir,$(1)))
+ifneq ($(gb_UnoApi_ENABLE_DOC),)
+$(call gb_Package_Package_internal,$(1)_doc,$(gb_UnoApi_SRCDOCDIR))
+$(call gb_Package_set_outdir,$(1)_doc,$(INSTDIR))
+endif
 
 $(call gb_UnoApiTarget_set_root,$(1),UCR)
 
@@ -65,6 +74,52 @@
 
 endef
 
+ifneq ($(gb_UnoApi_ENABLE_DOC),)
+
+# gb_UnoApi__add_docfile_impl api htmlfile
+define gb_UnoApi__add_docfile_impl
+$(if $(filter-out com ooo org,$(firstword $(subst /, ,$(2)))),\
+	$(call gb_Output_error,gb_UnoApi__add_docfile_impl: unknown namespace: $(firstword $(subst /, ,$(2)))) \
+)
+$(call gb_Package_add_file,$(1)_doc,$(gb_UnoApi_DOCDIR)/$(2),$(2))
+
+endef
+
+# gb_UnoApi__add_docfile_direct api htmlfile
+define gb_UnoApi__add_docfile_direct
+$(call gb_UnoApi__add_docfile_impl,$(1),$(patsubst $(1)/%,%,$(2)))
+
+endef
+
+# gb_UnoApi__add_docfile_for_idl api idlfile
+define gb_UnoApi__add_docfile_for_idl
+$(if $(filter-out modules %-modules,$(basename $(notdir $(2)))),\
+	$(call gb_UnoApi__add_docfile_direct,$(1),$(2).html) \
+)
+
+endef
+
+# gb_UnoApi__add_docfile api idlfile
+define gb_UnoApi__add_docfile
+$(call gb_UnoApi__add_docfile_for_idl,$(1),$(2))
+$(call gb_UnoApi__add_docfile_direct,$(1),$(dirname $(2))module-ix.html)
+
+endef
+
+# gb_UnoApi__add_docfiles api dir idlfiles
+define gb_UnoApi__add_docfiles
+$(foreach idlfile,$(3),$(call gb_UnoApi__add_docfile_for_idl,$(1),$(2)/$(idlfile)))
+$(call gb_UnoApi__add_docfile_direct,$(1),$(2)/module-ix.html)
+
+endef
+
+else
+
+gb_UnoApi__add_docfile :=
+gb_UnoApi__add_docfiles :=
+
+endif
+
 define gb_UnoApi__add_idlfile_noheader
 $(call gb_UnoApi__add_idlfile,$(1),$(2).idl)
 
@@ -86,12 +141,14 @@
 define gb_UnoApi_add_idlfile
 $(call gb_UnoApiTarget_add_idlfile,$(1),$(2),$(3))
 $(call gb_UnoApi__add_idlfile_full,$(1),$(2)/$(3))
+$(call gb_UnoApi__add_docfile,$(1),$(2)/$(3))
 
 endef
 
 define gb_UnoApi_add_idlfiles
 $(call gb_UnoApiTarget_add_idlfiles,$(1),$(2),$(3))
 $(foreach idl,$(3),$(call gb_UnoApi__add_idlfile_full,$(1),$(2)/$(idl)))
+$(call gb_UnoApi__add_docfiles,$(1),$(2),$(3))
 
 endef
 
@@ -99,12 +156,14 @@
 define gb_UnoApi_add_idlfile_nohdl
 $(call gb_UnoApiTarget_add_idlfile,$(1),$(2),$(3))
 $(call gb_UnoApi__add_idlfile_nohdl,$(1),$(2)/$(3))
+$(call gb_UnoApi__add_docfile,$(1),$(2)/$(3))
 
 endef
 
 define gb_UnoApi_add_idlfiles_nohdl
 $(call gb_UnoApiTarget_add_idlfiles,$(1),$(2),$(3))
 $(foreach idl,$(3),$(call gb_UnoApi__add_idlfile_nohdl,$(1),$(2)/$(idl)))
+$(call gb_UnoApi__add_docfiles,$(1),$(2),$(3))
 
 endef
 
@@ -112,12 +171,14 @@
 define gb_UnoApi_add_idlfile_noheader
 $(call gb_UnoApiTarget_add_idlfile,$(1),$(2),$(3))
 $(call gb_UnoApi__add_idlfile_noheader,$(1),$(2)/$(3))
+$(call gb_UnoApi__add_docfile,$(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)))
+$(call gb_UnoApi__add_docfiles,$(1),$(2),$(3))
 
 endef
 

-- 
To view, visit https://gerrit.libreoffice.org/3571
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I474f6e7a45d09683eb0dd7172114407c9dca84d7
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: David Tardon <dtardon at redhat.com>



More information about the LibreOffice mailing list