Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / odk / CustomTarget_doxygen.mk
blob9a28a54c21d79f02b2ec03533138829c83cc7cca
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 $(eval $(call gb_CustomTarget_CustomTarget,odk/docs))
12 odk_cpp_INCDIRLIST := sal salhelper rtl osl typelib uno cppu cppuhelper
14 odk_cpp_INCFILELIST := com/sun/star/uno/Any.h \
15 com/sun/star/uno/Any.hxx \
16 com/sun/star/uno/genfunc.h \
17 com/sun/star/uno/genfunc.hxx \
18 com/sun/star/uno/Reference.h \
19 com/sun/star/uno/Reference.hxx \
20 com/sun/star/uno/Sequence.h \
21 com/sun/star/uno/Sequence.hxx \
22 com/sun/star/uno/Type.h \
23 com/sun/star/uno/Type.hxx
25 # Cygwin Doxygen needs unix paths
26 odk_cygwin_path = $(if $(filter WNT,$(OS)),$(shell cygpath -u $(1)),$(1))
27 odk_cpp_PREFIX := $(INSTDIR)/$(SDKDIRNAME)/include/
28 odk_cpp_DOXY_INPUT := $(SRCDIR)/odk/docs/cpp/main.dox \
29 $(SRCDIR)/include/sal/log-areas.dox \
30 $(addprefix $(odk_cpp_PREFIX),$(odk_cpp_INCDIRLIST) $(odk_cpp_INCFILELIST))
31 odk_cpp_DOXY_WORKDIR := $(call gb_CustomTarget_get_workdir,odk/docs/cpp)/ref
33 $(eval $(call gb_CustomTarget_register_targets,odk/docs,\
34 cpp/Doxyfile \
35 cpp/doxygen.log \
38 $(call gb_CustomTarget_get_workdir,odk/docs)/cpp/Doxyfile : \
39 $(SRCDIR)/odk/docs/cpp/Doxyfile \
40 $(gb_Module_CURRENTMAKEFILE)
41 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1)
42 sed -e 's!^INPUT = %$$!INPUT = $(call odk_cygwin_path,$(odk_cpp_DOXY_INPUT))!' \
43 -e 's!^OUTPUT_DIRECTORY = %$$!OUTPUT_DIRECTORY = $(call odk_cygwin_path,$(odk_cpp_DOXY_WORKDIR))!' \
44 -e 's!^PROJECT_BRIEF = %$$!PROJECT_BRIEF = "$(PRODUCTNAME) $(PRODUCTVERSION) SDK C/C++ API Reference"!' \
45 -e 's!^PROJECT_NAME = %$$!PROJECT_NAME = $(PRODUCTNAME)!' \
46 -e 's!^QUIET = %$$!QUIET = $(if $(verbose),NO,YES)!' \
47 -e 's!^STRIP_FROM_PATH = %$$!STRIP_FROM_PATH = $(call odk_cygwin_path,$(odk_cpp_PREFIX))!' \
48 $< > $@
50 $(call gb_CustomTarget_get_workdir,odk/docs)/cpp/doxygen.log : \
51 $(call gb_CustomTarget_get_workdir,odk/docs)/cpp/Doxyfile \
52 $(SRCDIR)/include/sal/log-areas.dox \
53 $(SRCDIR)/odk/docs/cpp/main.dox \
54 $(call gb_Package_get_target,odk_headers) \
55 $(call gb_Package_get_target,odk_headers_generated)
56 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),GEN,1)
57 rm -rf $(odk_cpp_DOXY_WORKDIR)/ && $(DOXYGEN) $< > $@
59 $(eval $(call gb_CustomTarget_register_targets,odk/docs,\
60 idl/Doxyfile \
61 idl/doxygen.log \
64 odk_idl_PREFIX := $(SRCDIR)/udkapi/ $(SRCDIR)/offapi/
65 # note: generated_idl_chapter_refs.idl must be the _last_ input file!
66 # otherwise spurious references to it will appear in the output
67 odk_idl_DOXY_INPUT := $(SRCDIR)/odk/docs/idl/main.dox \
68 $(addsuffix com,$(odk_idl_PREFIX)) \
69 $(addsuffix org,$(odk_idl_PREFIX)) \
70 $(SRCDIR)/odk/docs/idl/generated_idl_chapter_refs.idl
71 odk_idl_DOXY_WORKDIR := $(call gb_CustomTarget_get_workdir,odk/docs/idl)/ref
73 # don't depend on the IDL files directly but instead on the udkapi/offapi
74 # which will get rebuilt when any IDL file changes
75 $(call gb_CustomTarget_get_workdir,odk/docs)/idl/Doxyfile : \
76 $(SRCDIR)/odk/docs/idl/Doxyfile \
77 $(call gb_UnoApi_get_target,udkapi) \
78 $(call gb_UnoApi_get_target,offapi) \
79 $(gb_Module_CURRENTMAKEFILE)
80 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1)
81 sed -e 's!^INPUT = %$$!INPUT = $(call odk_cygwin_path,$(odk_idl_DOXY_INPUT))!' \
82 -e 's!^OUTPUT_DIRECTORY = %$$!OUTPUT_DIRECTORY = $(call odk_cygwin_path,$(odk_idl_DOXY_WORKDIR))!' \
83 -e 's!^PROJECT_BRIEF = %$$!PROJECT_BRIEF = "$(PRODUCTNAME) $(PRODUCTVERSION) SDK API Reference"!' \
84 -e 's!^PROJECT_NAME = %$$!PROJECT_NAME = $(PRODUCTNAME)!' \
85 -e 's!^QUIET = %$$!QUIET = $(if $(verbose),NO,YES)!' \
86 -e 's!^STRIP_FROM_PATH = %$$!STRIP_FROM_PATH = $(call odk_cygwin_path,$(odk_idl_PREFIX))!' \
87 -e 's!^SHORT_NAMES = %$$!SHORT_NAMES = $(if $(filter WNT,$(OS)),YES,NO)!' \
88 $< > $@
90 $(call gb_CustomTarget_get_workdir,odk/docs)/idl/doxygen.log : \
91 $(call gb_CustomTarget_get_workdir,odk/docs)/idl/Doxyfile \
92 $(SRCDIR)/odk/docs/idl/main.dox
93 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),GEN,1)
94 rm -rf $(odk_idl_DOXY_WORKDIR)/ && $(DOXYGEN) $< > $@
96 # vim: set noet sw=4 ts=4: