tdf#99528: revert vertical tabs changes (24.8 only)
[LibreOffice.git] / odk / CustomTarget_doxygen.mk
blob03b43c0c71803bb7377d833c152108b1ebed320c
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, wsl-as-helper works in windows-realm
26 odk_cygwin_path = $(if $(MSYSTEM),$(1),$(call gb_Helper_cyg_path,$(1)))
27 odk_cpp_PREFIX := $(call odk_cygwin_path,$(INSTDIR)/$(SDKDIRNAME)/include/)
28 odk_cpp_DOXY_INPUT := $(call odk_cygwin_path,$(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 odk_cygwin_path,$(gb_CustomTarget_workdir)/odk/docs/cpp/ref)
33 $(eval $(call gb_CustomTarget_register_targets,odk/docs,\
34 cpp/Doxyfile \
35 cpp/doxygen.log \
38 $(gb_CustomTarget_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 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),SED)
43 sed -e 's!^INPUT = %$$!INPUT = $(odk_cpp_DOXY_INPUT)!' \
44 -e 's!^OUTPUT_DIRECTORY = %$$!OUTPUT_DIRECTORY = $(odk_cpp_DOXY_WORKDIR)!' \
45 -e 's!^PROJECT_BRIEF = %$$!PROJECT_BRIEF = "$(PRODUCTNAME) $(PRODUCTVERSION) SDK C/C++ API Reference"!' \
46 -e 's!^PROJECT_NAME = %$$!PROJECT_NAME = $(PRODUCTNAME)!' \
47 -e 's!^QUIET = %$$!QUIET = $(if $(verbose),NO,YES)!' \
48 -e 's!^STRIP_FROM_PATH = %$$!STRIP_FROM_PATH = $(odk_cpp_PREFIX)!' \
49 $< > $@
50 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),SED)
52 $(gb_CustomTarget_workdir)/odk/docs/cpp/doxygen.log : \
53 $(gb_CustomTarget_workdir)/odk/docs/cpp/Doxyfile \
54 $(SRCDIR)/include/sal/log-areas.dox \
55 $(SRCDIR)/odk/docs/cpp/main.dox \
56 $(call gb_Package_get_target,odk_headers) \
57 $(call gb_Package_get_target,odk_headers_generated)
58 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),GEN,1)
59 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),GEN)
60 rm -rf $(odk_cpp_DOXY_WORKDIR)/ && $(DOXYGEN) $< > $@
61 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),GEN)
63 $(eval $(call gb_CustomTarget_register_targets,odk/docs,\
64 idl/Doxyfile \
65 idl/doxygen.log \
68 odk_idl_PREFIX := $(call odk_cygwin_path,$(SRCDIR)/udkapi/ $(SRCDIR)/offapi/)
69 # note: generated_idl_chapter_refs.idl must be the _last_ input file!
70 # otherwise spurious references to it will appear in the output
71 odk_idl_DOXY_INPUT := $(call odk_cygwin_path,$(SRCDIR)/odk/docs/idl/main.dox \
72 $(addsuffix com,$(odk_idl_PREFIX)) \
73 $(addsuffix org,$(odk_idl_PREFIX)) \
74 $(SRCDIR)/odk/docs/idl/generated_idl_chapter_refs.idl)
75 odk_idl_DOXY_WORKDIR := $(call odk_cygwin_path,$(gb_CustomTarget_workdir)/odk/docs/idl/ref)
77 # don't depend on the IDL files directly but instead on the udkapi/offapi
78 # which will get rebuilt when any IDL file changes
79 $(gb_CustomTarget_workdir)/odk/docs/idl/Doxyfile : \
80 $(SRCDIR)/odk/docs/idl/Doxyfile \
81 $(call gb_UnoApi_get_target,udkapi) \
82 $(call gb_UnoApi_get_target,offapi) \
83 $(gb_Module_CURRENTMAKEFILE)
84 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1)
85 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),SED)
86 sed -e 's!^INPUT = %$$!INPUT = $(odk_idl_DOXY_INPUT)!' \
87 -e 's!^OUTPUT_DIRECTORY = %$$!OUTPUT_DIRECTORY = $(odk_idl_DOXY_WORKDIR)!' \
88 -e 's!^PROJECT_BRIEF = %$$!PROJECT_BRIEF = "$(PRODUCTNAME) $(PRODUCTVERSION) SDK API Reference"!' \
89 -e 's!^PROJECT_NAME = %$$!PROJECT_NAME = $(PRODUCTNAME)!' \
90 -e 's!^QUIET = %$$!QUIET = $(if $(verbose),NO,YES)!' \
91 -e 's!^STRIP_FROM_PATH = %$$!STRIP_FROM_PATH = $(odk_idl_PREFIX)!' \
92 -e 's!^SHORT_NAMES = %$$!SHORT_NAMES = $(if $(filter WNT,$(OS)),YES,NO)!' \
93 $< > $@
94 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),SED)
96 $(gb_CustomTarget_workdir)/odk/docs/idl/doxygen.log : \
97 $(gb_CustomTarget_workdir)/odk/docs/idl/Doxyfile \
98 $(SRCDIR)/odk/docs/idl/main.dox
99 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),GEN,1)
100 $(call gb_Trace_StartRange,$(subst $(WORKDIR)/,,$@),GEN)
101 rm -rf $(odk_idl_DOXY_WORKDIR)/ && $(DOXYGEN) $< > $@
102 $(call gb_Trace_EndRange,$(subst $(WORKDIR)/,,$@),GEN)
104 # vim: set noet sw=4 ts=4: