[Libreoffice-commits] core.git: odk/CustomTarget_autodoc.mk odk/CustomTarget_check.mk odk/CustomTarget_odkcommon.mk odk/Module_odk.mk odk/Package_autodoc.mk odk/Package_docs.mk odk/PackageSet_autodoc.mk scp2/source solenv/gbuild

David Tardon dtardon at redhat.com
Wed Apr 24 06:06:30 PDT 2013


 odk/CustomTarget_autodoc.mk        |   27 +++--
 odk/CustomTarget_check.mk          |    1 
 odk/CustomTarget_odkcommon.mk      |    1 
 odk/Module_odk.mk                  |    2 
 odk/PackageSet_autodoc.mk          |   18 +++
 odk/Package_autodoc.mk             |  175 +++++++++++++++++++++++++++++++++++++
 odk/Package_docs.mk                |    4 
 scp2/source/sdkoo/module_sdkoo.scp |    1 
 scp2/source/sdkoo/sdkoo.scp        |    7 +
 solenv/gbuild/UnoApi.mk            |   61 ++++++++++++
 10 files changed, 283 insertions(+), 14 deletions(-)

New commits:
commit 0ea6217986e69612faf314611bf2e8349d78705c
Author: David Tardon <dtardon at redhat.com>
Date:   Tue Apr 23 09:03:24 2013 +0200

    install gen. IDL docs using filelist
    
    Change-Id: I474f6e7a45d09683eb0dd7172114407c9dca84d7
    Reviewed-on: https://gerrit.libreoffice.org/3571
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

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 3782224..16e50ec 100644
--- a/odk/CustomTarget_check.mk
+++ b/odk/CustomTarget_check.mk
@@ -43,6 +43,7 @@ $(call gb_CustomTarget_get_workdir,odk/check)/checkbin : \
 		$(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 08e1756..c253c2e 100644
--- a/odk/CustomTarget_odkcommon.mk
+++ b/odk/CustomTarget_odkcommon.mk
@@ -14,7 +14,6 @@ odkcommon_ZIPDEPS :=
 $(eval $(call gb_CustomTarget_CustomTarget,odk/odkcommon))
 
 $(call gb_CustomTarget_get_target,odk/odkcommon): \
-	$(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 5415494..35865e8 100644
--- a/odk/Module_odk.mk
+++ b/odk/Module_odk.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_Module_add_targets,odk,\
 	CustomTarget_settings \
 	CustomTarget_autodoc \
 	Executable_unoapploader \
+	Package_autodoc \
 	Package_bin \
 	Package_config \
 	Package_docs \
@@ -30,6 +31,7 @@ $(eval $(call gb_Module_add_targets,odk,\
 	Package_odk_headers_generated \
 	Package_settings \
 	Package_settings_generated \
+	PackageSet_autodoc \
 	PackageSet_odk_headers \
 ))
 
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..bd1117b
--- /dev/null
+++ b/odk/Package_autodoc.mk
@@ -0,0 +1,175 @@
+# -*- 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
+$(eval $(call gb_Package_add_files_with_dir,odk_autodoc,$(gb_Package_SDKDIRNAME)/docs/common/ref,\
+	module-ix.html \
+	$(addsuffix /module-ix.html,\
+		com \
+		com/sun \
+		com/sun/star \
+		com/sun/star/accessibility \
+		com/sun/star/animations \
+		com/sun/star/auth \
+		com/sun/star/awt \
+		com/sun/star/awt/grid \
+		com/sun/star/awt/tab \
+		com/sun/star/awt/tree \
+		com/sun/star/beans \
+		com/sun/star/bridge \
+		com/sun/star/bridge/oleautomation \
+		com/sun/star/chart \
+		com/sun/star/chart2 \
+		com/sun/star/chart2/data \
+		com/sun/star/configuration \
+		com/sun/star/configuration/backend \
+		com/sun/star/configuration/backend/xml \
+		com/sun/star/configuration/bootstrap \
+		com/sun/star/connection \
+		com/sun/star/container \
+		com/sun/star/cui \
+		com/sun/star/datatransfer \
+		com/sun/star/datatransfer/clipboard \
+		com/sun/star/datatransfer/dnd \
+		com/sun/star/deployment \
+		com/sun/star/deployment/test \
+		com/sun/star/deployment/ui \
+		com/sun/star/document \
+		com/sun/star/drawing \
+		com/sun/star/drawing/framework \
+		com/sun/star/embed \
+		com/sun/star/form \
+		com/sun/star/form/binding \
+		com/sun/star/form/component \
+		com/sun/star/form/control \
+		com/sun/star/form/inspection \
+		com/sun/star/form/runtime \
+		com/sun/star/form/submission \
+		com/sun/star/form/validation \
+		com/sun/star/formula \
+		com/sun/star/frame \
+		com/sun/star/frame/status \
+		com/sun/star/gallery \
+		com/sun/star/geometry \
+		com/sun/star/graphic \
+		com/sun/star/i18n \
+		com/sun/star/image \
+		com/sun/star/inspection \
+		com/sun/star/io \
+		com/sun/star/java \
+		com/sun/star/lang \
+		com/sun/star/ldap \
+		com/sun/star/linguistic2 \
+		com/sun/star/loader \
+		com/sun/star/logging \
+		com/sun/star/mail \
+		com/sun/star/media \
+		com/sun/star/mozilla \
+		com/sun/star/office \
+		com/sun/star/packages \
+		com/sun/star/packages/manifest \
+		com/sun/star/packages/zip \
+		com/sun/star/plugin \
+		com/sun/star/presentation \
+		com/sun/star/presentation/textfield \
+		com/sun/star/qa \
+		com/sun/star/rdf \
+		com/sun/star/reflection \
+		com/sun/star/registry \
+		com/sun/star/rendering \
+		com/sun/star/report \
+		com/sun/star/report/inspection \
+		com/sun/star/report/meta \
+		com/sun/star/resource \
+		com/sun/star/scanner \
+		com/sun/star/script \
+		com/sun/star/script/browse \
+		com/sun/star/script/provider \
+		com/sun/star/script/vba \
+		com/sun/star/sdb \
+		com/sun/star/sdb/application \
+		com/sun/star/sdb/tools \
+		com/sun/star/sdbc \
+		com/sun/star/sdbcx \
+		com/sun/star/security \
+		com/sun/star/setup \
+		com/sun/star/sheet \
+		com/sun/star/smarttags \
+		com/sun/star/style \
+		com/sun/star/svg \
+		com/sun/star/system \
+		com/sun/star/table \
+		com/sun/star/task \
+		com/sun/star/text \
+		com/sun/star/text/fieldmaster \
+		com/sun/star/text/textfield \
+		com/sun/star/text/textfield/docinfo \
+		com/sun/star/ucb \
+		com/sun/star/ui \
+		com/sun/star/ui/dialogs \
+		com/sun/star/uno \
+		com/sun/star/uri \
+		com/sun/star/util \
+		com/sun/star/view \
+		com/sun/star/xforms \
+		com/sun/star/xml \
+		com/sun/star/xml/crypto \
+		com/sun/star/xml/crypto/sax \
+		com/sun/star/xml/csax \
+		com/sun/star/xml/dom \
+		com/sun/star/xml/dom/events \
+		com/sun/star/xml/dom/views \
+		com/sun/star/xml/input \
+		com/sun/star/xml/sax \
+		com/sun/star/xml/wrapper \
+		com/sun/star/xml/xpath \
+		com/sun/star/xml/xslt \
+		com/sun/star/xsd \
+		org \
+		org/freedesktop \
+		org/freedesktop/PackageKit \
+	) \
+))
+
+# 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_Package,odk_docs,$(SRCDIR)/odk))
 $(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 \
@@ -34,7 +35,4 @@ $(eval $(call gb_Package_add_files_with_dir,odk_docs,$(gb_Package_SDKDIRNAME),\
 	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 58f7fb8..94fb3ea 100644
--- a/scp2/source/sdkoo/module_sdkoo.scp
+++ b/scp2/source/sdkoo/module_sdkoo.scp
@@ -34,6 +34,7 @@ Module gid_Module_Optional_Sdkoo
     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 4897fd7..6d30f13 100644
--- a/scp2/source/sdkoo/sdkoo.scp
+++ b/scp2/source/sdkoo/sdkoo.scp
@@ -116,6 +116,13 @@ File gid_File_Txt_Readme
     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 d21dacd..b5eeb5f 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))
+
 # NOTE: This is needed temporarily to force rebuild with API files from
 # $(WORKDIR), thus fixing generated deps. Otherwise, a change of an .idl
 # file would not rebuild a .cxx if it still depended on the $(OUTDIR)
@@ -26,6 +31,11 @@ $(call gb_UnoApiTarget_UnoApiTarget,$(1))
 $(call gb_UnoApiHeadersTarget_UnoApiHeadersTarget,$(1))
 $(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)
 
@@ -72,6 +82,51 @@ $(call gb_UnoApi__add_headerfile_impl,$(1),$(2),$(subst $() $(),/,$(wordlist 2,$
 
 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 has-xref?
+define gb_UnoApi__add_docfile_for_idl
+$(if $(filter-out modules %-modules,$(basename $(notdir $(2)))),\
+	$(call gb_UnoApi__add_docfile_direct,$(1),$(2).html) \
+	$(if $(3),$(call gb_UnoApi__add_docfile_direct,$(1),$(2)-xref.html)) \
+)
+
+endef
+
+# gb_UnoApi__add_docfile api idlfile has-xref?
+define gb_UnoApi__add_docfile
+$(call gb_UnoApi__add_docfile_for_idl,$(1),$(2),$(3))
+
+endef
+
+# gb_UnoApi__add_docfiles api dir idlfiles has-xref?
+define gb_UnoApi__add_docfiles
+$(foreach idlfile,$(3),$(call gb_UnoApi__add_docfile_for_idl,$(1),$(2)/$(idlfile),$(3)))
+
+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)
 
@@ -93,12 +148,14 @@ endef
 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),$(true))
 
 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),$(true))
 
 endef
 
@@ -106,12 +163,14 @@ endef
 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
 
@@ -119,12 +178,14 @@ endef
 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
 


More information about the Libreoffice-commits mailing list