Bump version to 4.3-4
[LibreOffice.git] / odk / CustomTarget_doxygen.mk
blob6fe5096621f580118f0d69f410cd1204a171d9e0
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 \
13 $(if $(filter WNT,$(OS)),systools)
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_PackageSet_get_target,odk_headers)
55 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),GEN,1)
56 rm -rf $(odk_cpp_DOXY_WORKDIR)/ && $(DOXYGEN) $< > $@
58 $(eval $(call gb_CustomTarget_register_targets,odk/docs,\
59 idl/Doxyfile \
60 idl/doxygen.log \
63 odk_idl_PREFIX := $(SRCDIR)/udkapi/ $(SRCDIR)/offapi/
64 # note: generated_idl_chapter_refs.idl must be the _last_ input file!
65 # otherwise spurious references to it will appear in the output
66 odk_idl_DOXY_INPUT := $(SRCDIR)/odk/docs/idl/main.dox \
67 $(addsuffix com,$(odk_idl_PREFIX)) \
68 $(SRCDIR)/odk/docs/idl/generated_idl_chapter_refs.idl
69 odk_idl_DOXY_WORKDIR := $(call gb_CustomTarget_get_workdir,odk/docs/idl)/ref
71 # don't depend on the IDL files directly but instead on the udkapi/offapi
72 # which will get rebuilt when any IDL file changes
73 $(call gb_CustomTarget_get_workdir,odk/docs)/idl/Doxyfile : \
74 $(SRCDIR)/odk/docs/idl/Doxyfile \
75 $(call gb_UnoApi_get_target,udkapi) \
76 $(call gb_UnoApi_get_target,offapi) \
77 $(gb_Module_CURRENTMAKEFILE)
78 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1)
79 sed -e 's!^INPUT = %$$!INPUT = $(call odk_cygwin_path,$(odk_idl_DOXY_INPUT))!' \
80 -e 's!^OUTPUT_DIRECTORY = %$$!OUTPUT_DIRECTORY = $(call odk_cygwin_path,$(odk_idl_DOXY_WORKDIR))!' \
81 -e 's!^PROJECT_BRIEF = %$$!PROJECT_BRIEF = "$(PRODUCTNAME) $(PRODUCTVERSION) SDK API Reference"!' \
82 -e 's!^PROJECT_NAME = %$$!PROJECT_NAME = $(PRODUCTNAME)!' \
83 -e 's!^QUIET = %$$!QUIET = $(if $(VERBOSE),NO,YES)!' \
84 -e 's!^STRIP_FROM_PATH = %$$!STRIP_FROM_PATH = $(call odk_cygwin_path,$(odk_idl_PREFIX))!' \
85 -e 's!^SHORT_NAMES = %$$!SHORT_NAMES = $(if $(filter WNT,$(OS)),YES,NO)!' \
86 $< > $@
88 $(call gb_CustomTarget_get_workdir,odk/docs)/idl/doxygen.log : \
89 $(call gb_CustomTarget_get_workdir,odk/docs)/idl/Doxyfile \
90 $(SRCDIR)/odk/docs/idl/main.dox
91 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),GEN,1)
92 rm -rf $(odk_idl_DOXY_WORKDIR)/ && $(DOXYGEN) $< > $@
94 # vim: set noet sw=4 ts=4: