Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / odk / CustomTarget_build-examples.mk
blob89e4273480878d1465545944ff647aa20023c79b
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
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/build-examples))
12 my_example_dirs = \
13 CLI/CSharp/Spreadsheet \
14 CLI/VB.NET/WriterDemo \
15 DevelopersGuide/BasicAndDialogs/ToolkitControls \
16 DevelopersGuide/Components/Addons/ProtocolHandlerAddon_cpp \
17 DevelopersGuide/Components/CppComponent \
18 DevelopersGuide/Database/DriverSkeleton \
19 DevelopersGuide/Extensions/DialogWithHelp \
20 DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp \
21 DevelopersGuide/ProfUNO/CppBinding \
22 DevelopersGuide/ProfUNO/SimpleBootstrap_cpp \
23 OLE/activex \
24 cpp/DocumentLoader \
25 cpp/complextoolbarcontrols \
26 cpp/counter \
27 cpp/remoteclient \
28 python/toolpanel \
31 # cpp/custompanel \
34 ifeq ($(ENABLE_JAVA),TRUE)
35 my_example_dirs += \
36 DevelopersGuide/BasicAndDialogs/CreatingDialogs \
37 DevelopersGuide/Charts \
38 DevelopersGuide/Components/Addons/JobsAddon \
39 DevelopersGuide/Components/Addons/ProtocolHandlerAddon_java \
40 DevelopersGuide/Components/JavaComponent \
41 DevelopersGuide/Components/SimpleLicense \
42 DevelopersGuide/Components/Thumbs \
43 DevelopersGuide/Components/dialogcomponent \
44 DevelopersGuide/Config \
45 DevelopersGuide/Database \
46 DevelopersGuide/Drawing \
47 DevelopersGuide/FirstSteps \
48 DevelopersGuide/Forms \
49 DevelopersGuide/GUI \
50 DevelopersGuide/OfficeBean \
51 DevelopersGuide/OfficeDev \
52 DevelopersGuide/OfficeDev/Clipboard \
53 DevelopersGuide/OfficeDev/DesktopEnvironment \
54 DevelopersGuide/OfficeDev/DisableCommands \
55 DevelopersGuide/OfficeDev/FilterDevelopment/AsciiFilter \
56 DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilterDetection \
57 DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_java \
58 DevelopersGuide/OfficeDev/Linguistic \
59 DevelopersGuide/OfficeDev/PathSettings \
60 DevelopersGuide/OfficeDev/PathSubstitution \
61 DevelopersGuide/OfficeDev/TerminationTest \
62 DevelopersGuide/ProfUNO/InterprocessConn \
63 DevelopersGuide/ProfUNO/Lifetime \
64 DevelopersGuide/ProfUNO/SimpleBootstrap_java \
65 DevelopersGuide/ScriptingFramework/SayHello \
66 DevelopersGuide/ScriptingFramework/ScriptSelector \
67 DevelopersGuide/Spreadsheet \
68 DevelopersGuide/Text \
69 DevelopersGuide/UCB \
70 java/DocumentHandling \
71 java/Drawing \
72 java/Inspector \
73 java/MinimalComponent \
74 java/PropertySet \
75 java/Spreadsheet \
76 java/Text \
77 java/ToDo \
79 endif
81 # java/ConverterServlet \
82 # java/EmbedDocument/Container1 \
83 # java/EmbedDocument/EmbeddedObject \
84 # java/NotesAccess \
85 # java/Storage \
88 .PHONY: $(call gb_CustomTarget_get_target,odk/build-examples)
90 $(call gb_CustomTarget_get_target,odk/build-examples): \
91 $(call gb_CustomTarget_get_workdir,odk/build-examples)/setsdkenv
92 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),CHK,1)
93 (saved_library_path=$${$(gb_Helper_LIBRARY_PATH_VAR)} && . $< \
94 $(if $(filter MACOSX,$(OS)),, \
95 && $(gb_Helper_LIBRARY_PATH_VAR)=$$saved_library_path) \
96 && export \
97 UserInstallation=$(call gb_Helper_make_url,$(call gb_CustomTarget_get_workdir,odk/build-examples)/user) \
98 $(foreach my_dir,$(my_example_dirs), \
99 && (cd $(INSTDIR)/$(SDKDIRNAME)/examples/$(my_dir) \
100 && printf 'yes\n' | LC_ALL=C make))) \
101 >$(call gb_CustomTarget_get_workdir,odk/build-examples)/log 2>&1 \
102 || (RET=$$? \
103 && cat $(call gb_CustomTarget_get_workdir,odk/build-examples)/log \
104 && exit $$RET)
106 $(call gb_CustomTarget_get_workdir,odk/build-examples)/setsdkenv: \
107 $(SRCDIR)/odk/config/setsdkenv_unix.sh.in \
108 $(BUILDDIR)/config_$(gb_Side).mk | \
109 $(call gb_CustomTarget_get_workdir,odk/build-examples)/.dir
110 $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),SED,1)
111 sed -e 's!@OO_SDK_NAME@!sdk!' \
112 -e 's!@OO_SDK_HOME@!$(INSTDIR)/$(SDKDIRNAME)!' \
113 -e 's!@OFFICE_HOME@!$(INSTROOTBASE)!' -e 's!@OO_SDK_MAKE_HOME@!!' \
114 -e 's!@OO_SDK_ZIP_HOME@!!' -e 's!@OO_SDK_CAT_HOME@!!' \
115 -e 's!@OO_SDK_SED_HOME@!!' -e 's!@OO_SDK_CPP_HOME@!!' \
116 -e 's!@OO_SDK_JAVA_HOME@!$(JAVA_HOME)!' \
117 -e 's!@OO_SDK_OUTPUT_DIR@!$(call gb_CustomTarget_get_workdir,odk/build-examples)/out!' \
118 -e 's!@SDK_AUTO_DEPLOYMENT@!YES!' $< > $@
120 # vim: set noet sw=4 ts=4: