Clean up includes
[LibreOffice.git] / Makefile.in
blobafccbb9ef4604bbb67180ff87c4d8a5b3a060970
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 gb_Top_MODULE_CHECK_TARGETS := slowcheck unitcheck subsequentcheck perfcheck uicheck screenshot
12 .PHONY : check-if-root bootstrap gbuild build build-non-l10n-only build-l10n-only check clean clean-build clean-host test-install distclean distro-pack-install docs download etags fetch get-submodules id install install-gdb-printers install-strip tags debugrun help showmodules translations packageinfo internal.clean $(gb_Top_MODULE_CHECK_TARGETS)
14 MAKECMDGOALS?=build
15 build_goal:=$(if $(filter build uicheck,$(MAKECMDGOALS)),build)\
16 $(if $(filter check,$(MAKECMDGOALS)),unitcheck slowcheck subsequentcheck $(if $(filter Linux, $(shell uname)), uicheck))\
17 $(filter build-l10n-only build-non-l10n-only debugrun help showmodules translations $(gb_Top_MODULE_CHECK_TARGETS) check packageinfo gbuildtojson,$(MAKECMDGOALS))
19 SRCDIR := @SRC_ROOT@
20 BUILDDIR := @BUILDDIR@
21 COMPILER_PLUGINS := @COMPILER_PLUGINS@
22 GIT_BUILD := $(if $(wildcard $(SRCDIR)/.git),T)
24 # Run autogen.sh if needed and force make to restart itself.
25 # ... but there are several cases where we do not want to run
26 # autogen.sh:
27 # 1. if we are building from tarballs, not git checkout (I do not
28 # think packagers would ever want that. I certainly do not.)
29 # 2. if we are making help, clean or distclean, because they do not
30 # need updated configuration
31 ifeq (,$(MAKE_RESTARTS)$(if $(GIT_BUILD),,T)$(if $(filter-out help showmodules clean distclean,$(MAKECMDGOALS)),,T))
33 # note: this must touch both Makefile and $(BUILDDIR)/Makefile, because make
34 # may be invoked using either of these paths, and it will restart itself only
35 # if the updated target is exactly the same path as the Makefile it is using
36 .PHONY : force-restart
37 Makefile $(BUILDDIR)/Makefile: $(BUILDDIR)/config_host.mk $(BUILDDIR)/config_host_lang.mk force-restart
38 @touch $@
40 # run configure in an environment not polluted by config_host.mk
41 $(BUILDDIR)/config_host.mk : $(wildcard \
42 $(SRCDIR)/autogen.sh \
43 $(SRCDIR)/config_host.mk.in \
44 $(SRCDIR)/config_host_lang.mk.in \
45 $(SRCDIR)/Makefile.in \
46 $(SRCDIR)/instsetoo_native/util/openoffice.lst.in \
47 $(SRCDIR)/configure.ac \
48 $(SRCDIR)/config_host/*.h.in \
49 $(SRCDIR)/download.lst \
50 $(SRCDIR)/m4/*.m4 \
51 $(BUILDDIR)/autogen.input \
52 $(BUILDDIR)/autogen.lastrun \
53 ) \
54 $(shell . $(SRCDIR)/bin/get_config_variables JAVA_HOME && \
55 if test -n "$${JAVA_HOME}" -a ! -d "$${JAVA_HOME}/bin"; then echo force-restart; fi)
56 sh -c $(SRCDIR)/autogen.sh
58 else # MAKE_RESTARTS
60 .DEFAULT_GOAL := build
62 # Nested test is to check if the systemd-detect-virt command doesn't exist or it reports we're not
63 # in a container:
64 check-if-root:
65 @if test ! `uname` = 'Haiku' -a `id -u` = 0; then \
66 if test ! -x "$$(command -v systemd-detect-virt)" || ! systemd-detect-virt -c -q; then \
67 echo; \
68 echo 'Building LibreOffice as root is a very bad idea, use a regular user.'; \
69 echo; \
70 exit 1; \
71 fi \
74 gb_Side ?= host
76 include $(BUILDDIR)/config_$(gb_Side).mk
78 export GMAKE_OPTIONS?=-r$(if $(verbose),,s)$(value $(MAKEFLAGS))
80 PARALLELISM_OPTION := $(if $(filter-out 0,$(PARALLELISM)),-j $(PARALLELISM),)
82 IWYU_OPTION := $(if $(IWYU_PATH),-k CC=$(IWYU_PATH) CXX=$(IWYU_PATH),)
84 # don't want to have a dependency to iwyudummy.generate because it's
85 # useful to manually edit the generated StaticLibrary_iwyudummy.mk
86 iwyudummy: bootstrap fetch
87 $(if $(wildcard $(BUILDDIR)/iwyudummy),,$(error first call "make iwyudummy.generate"))
88 cd $(BUILDDIR)/iwyudummy && $(MAKE) $(IWYU_OPTION) $(GMAKE_OPTIONS)
90 iwyudummy.generate:
91 $(SRCDIR)/bin/gen-iwyu-dummy-lib
94 # Partial Build
96 define gb_Top_GbuildModuleRules
97 .PHONY: $(1) $(1).build $(1).all $(1).check $(1).clean $(1).showdeliverables $(foreach target,$(gb_Top_MODULE_CHECK_TARGETS),$(1).$(target))
98 .PHONY: $(1).allbuild $(1).buildall $(1).allcheck $(1).checkall
100 $(1): bootstrap fetch
101 cd $(SRCDIR)/$(2) && $$(MAKE) $(IWYU_OPTION) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS)
103 $(1).build $(1).check $(foreach target,$(gb_Top_MODULE_CHECK_TARGETS),$(1).$(target)): bootstrap fetch
104 cd $(SRCDIR)/$(2) && $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) $$(patsubst $(1).%,%,$$@)
106 $(1).clean $(1).showdeliverables:
107 cd $(SRCDIR)/$(2) && $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) $$(patsubst $(1).%,%,$$@)
109 $(1).allbuild $(1).buildall: bootstrap fetch
110 $$(MAKE) $(PARALLELISM_OPTION) $(IWYU_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1)
112 $(1).allcheck $(1).checkall: bootstrap fetch
113 $$(MAKE) $(PARALLELISM_OPTION) $(IWYU_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) $(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1)
115 $(1).all:
116 @echo "'make $(1).all' was renamed to 'make $(1).allcheck' (or use 'make $(1).allbuild' to build without unit tests)"
117 @exit 42
119 endef
121 define gb_Top_GbuildModulesRules
122 $(foreach m,$(1),$(call gb_Top_GbuildModuleRules,$(notdir $(m)),$(m)))
123 endef
125 gbuild_modules := $(patsubst $(SRCDIR)/%/,%,$(dir $(wildcard $(SRCDIR)/*/Module_*.mk $(SRCDIR)/external/*/Module_*.mk)))
127 gbuild_internal_modules := $(filter-out odk external,$(patsubst $(SRCDIR)/%/,%,$(dir $(wildcard $(SRCDIR)/*/Module_*.mk))))
129 internal.clean: $(addsuffix .clean,$(gbuild_internal_modules))
132 $(eval $(call gb_Top_GbuildModulesRules,$(gbuild_modules)))
134 gbuild_TARGETS := AllLangHelp \
135 AllLangMoTarget \
136 AllLangPackage \
137 AutoInstall \
138 CliLibrary \
139 CliNativeLibrary \
140 CliUnoApi \
141 CompilerTest \
142 ComponentTarget \
143 Configuration \
144 CppunitTest \
145 CustomTarget \
146 Dictionary \
147 Executable \
148 Extension \
149 ExtensionPackage \
150 ExtensionPackageSet \
151 ExternalPackage \
152 ExternalProject \
153 Gallery \
154 GeneratedPackage \
155 InstallModule \
156 InstallScript \
157 InternalUnoApi \
158 Jar \
159 JunitTest \
160 Library \
161 Module \
162 Package \
163 PackageSet \
164 Pagein \
165 Postprocess \
166 Pyuno \
167 PythonTest \
168 Rdb \
169 SdiTarget \
170 StaticLibrary \
171 UIConfig \
172 UITest \
173 UnoApi \
174 UnpackedTarball \
175 WinResTarget \
176 Zip \
178 # build a generic gbuild target
179 $(foreach target,$(gbuild_TARGETS),$(target)_% $(foreach module,$(gbuild_modules),$(target)_$(module)/%)) UIConfig_modules/% %.genpatch: bootstrap fetch
180 $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
182 $(gbuild_TARGETS):
183 $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
186 # Clean
188 clean: clean-host clean-build
190 clean-host:
191 rm -fr $(TESTINSTALLDIR)
192 rm -fr $(INSTDIR)
193 rm -fr $(WORKDIR)
195 clean-build:
196 ifneq ($(CROSS_COMPILING),)
197 rm -fr $(INSTDIR_FOR_BUILD)
198 rm -fr $(WORKDIR_FOR_BUILD)
199 ifeq ($(OS),ANDROID)
200 rm -fr $(BUILDDIR)/android/obj
201 rm -fr $(BUILDDIR)/android/jniLibs
202 rm -fr $(SRCDIR)/android/source/build
203 rm -fr $(SRCDIR)/android/source/assets
204 rm -fr $(SRCDIR)/android/source/assets_fullUI
205 rm -fr $(SRCDIR)/android/source/assets_strippedUI
206 endif
207 endif
209 include $(SRCDIR)/compilerplugins/Makefile.mk
212 # Distclean
214 distclean : clean compilerplugins-clean
215 rm -fr \
216 $(BUILDDIR)/Makefile \
217 $(BUILDDIR)/aclocal.m4 \
218 $(BUILDDIR)/autom4te.cache \
219 $(BUILDDIR)/bin/bffvalidator.sh \
220 $(BUILDDIR)/bin/odfvalidator.sh \
221 $(BUILDDIR)/bin/officeotron.sh \
222 $(BUILDDIR)/config.Build.log \
223 $(BUILDDIR)/config.Build.warn \
224 $(BUILDDIR)/config.log \
225 $(BUILDDIR)/config.status \
226 $(BUILDDIR)/config.warn \
227 $(BUILDDIR)/config_build.mk \
228 $(BUILDDIR)/config_build_lang.mk \
229 $(BUILDDIR)/config_build \
230 $(BUILDDIR)/config_host.mk \
231 $(BUILDDIR)/config_host.mk.stamp \
232 $(BUILDDIR)/config_host_lang.mk \
233 $(BUILDDIR)/config_host_lang.mk.stamp \
234 $(BUILDDIR)/config_host/*.h \
235 $(BUILDDIR)/configure \
236 $(BUILDDIR)/hardened_runtime.xcent \
237 $(BUILDDIR)/instsetoo_native/util/openoffice.lst \
238 $(BUILDDIR)/solenv/lockfile/autoconf.h \
239 $(BUILDDIR)/sysui/desktop/macosx/Info.plist \
240 $(BUILDDIR)/vs-code*.code-workspace*
241 $(if $(filter WNT,$(OS)),env -i PATH="$$PATH") $(FIND) $(SRCDIR)/solenv/gdb -name \*.pyc -exec rm -f {} \;
244 # custom command
246 cmd:
247 $(if $(verbose),echo "custom cmd" &&) ( $(cmd) )
250 # Fetch
252 ifneq ($(DO_FETCH_TARBALLS),)
253 include $(SRCDIR)/Makefile.fetch
254 fetch: download
255 fetch: get-submodules
257 ifneq (,$(wildcard $(SRCDIR)/.git))
258 get-submodules:
259 ifneq ($(foreach i,$(GIT_NEEDED_SUBMODULES),$(SRCDIR)/$(i)/.git),$(wildcard $(foreach i,$(GIT_NEEDED_SUBMODULES),$(SRCDIR)/$(i)/.git)))
260 cd $(SRCDIR) && ./g -f clone
261 endif
262 ifeq ($(shell test -d $(SRCDIR)/.git; echo $$?),0)
263 @cd $(SRCDIR) && ./g -z # make sure the git hooks are in place even if no submodules are needed
264 endif
266 else # these sources are from a tarball, so get the other source tarballs
267 gb_LO_VER := $(shell . $(SRCDIR)/sources.ver && echo $$lo_sources_ver)
268 $(if $(gb_LO_VER),,$(error Error while retrieving $$lo_sources_ver from $(SRCDIR)/sources.ver))
270 get-submodules: | download
271 ifneq ($(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),$(SRCDIR)/src/libreoffice-$(i)-$(gb_LO_VER)),$(wildcard $(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),$(SRCDIR)/src/libreoffice-$(i)-$(gb_LO_VER))))
272 $(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),\
273 $(call fetch_Download_item_unchecked,http://download.documentfoundation.org/libreoffice/src/$(shell echo $(gb_LO_VER) | sed -e "s/\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/"),libreoffice-$(i)-$(gb_LO_VER).tar.xz))
274 $(SRCDIR)/bin/unpack-sources $(SRCDIR) $(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),\
275 $(TARFILE_LOCATION)/libreoffice-$(i)-$(gb_LO_VER).tar.xz)
276 endif
278 endif
280 else
281 fetch:
282 @echo "Automatic fetching of external tarballs is disabled."
284 endif
287 # Bootstrap
289 bootstrap: check-if-root compilerplugins
292 # Build
294 # Note: this will pipe through all gbuild targets to ... gbuild
295 # with some translations like "check"->"unitcheck subsequentcheck uicheck" for historic reasons
297 build: bootstrap fetch $(if $(CROSS_COMPILING),cross-toolset,install-gdb-printers) \
298 $(if $(filter check,$(MAKECMDGOALS)),$(if $(COMPILER_PLUGINS),$(if $(LODE_HOME),clang-format-check)))
299 $(MAKE) $(PARALLELISM_OPTION) $(IWYU_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(build_goal)
300 ifeq ($(OS),iOS)
301 $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) ios
302 endif
304 build-non-l10n-only build-l10n-only check debugrun translations packageinfo $(gb_Top_MODULE_CHECK_TARGETS): build
306 help showmodules gbuildtojson:
307 $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
309 cross-toolset: bootstrap fetch install-gdb-printers
310 # fetch again in case there are externals only needed on build platform
311 ifneq ($(OS),iOS)
312 $(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(BUILDDIR)/Makefile fetch
313 endif
314 $(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild build-tools
316 install-gdb-printers:
317 ifneq ($(filter-out WNT MACOSX iOS,$(OS)),)
318 ifneq ($(INSTDIR_FOR_BUILD),$(INSTDIR))
319 mkdir -p $(INSTDIR_FOR_BUILD)
320 $(SRCDIR)/solenv/bin/install-gdb-printers -a $(INSTDIR_FOR_BUILD) -c
321 endif
322 mkdir -p $(INSTDIR)
323 $(SRCDIR)/solenv/bin/install-gdb-printers -a $(INSTDIR) -c
324 endif
328 # Install
331 define gb_Top_DoInstall
332 echo "$(1) in $(INSTALLDIR) ..." && \
333 $(SRCDIR)/solenv/bin/ooinstall $(2) "$(INSTALLDIR)"
335 endef
337 ifneq ($(OS),MACOSX)
338 define gb_Top_InstallFinished
339 echo && echo "If you want to edit the .ui files with glade first execute:" && \
340 echo && echo "export GLADE_CATALOG_SEARCH_PATH=$(2)/share/glade" && \
341 echo && echo "$(1) finished, you can now execute:" && \
342 echo "$(2)/program/soffice"
344 endef
345 else
346 define gb_Top_InstallFinished
347 echo && echo "$(1) finished, you can now run: " && \
348 echo "open $(2)/$(PRODUCTNAME).app" && \
349 echo "" && \
350 echo "To debug: gdb $(2)/$(PRODUCTNAME).app/Contents/MacOS/soffice"
352 endef
353 endif
355 ifneq ($(OS),MACOSX)
356 install:
357 @$(call gb_Top_DoInstall,Installing,)
358 @$(call gb_Top_InstallFinished,Installation,$(INSTALLDIR))
360 install-strip:
361 @$(call gb_Top_DoInstall,Installing and stripping binaries,--strip)
362 @$(call gb_Top_InstallFinished,Installation,$(INSTALLDIR))
363 endif # !MACOSX
365 test-install: build
366 @rm -rf $(TESTINSTALLDIR)
367 @mkdir -p $(TESTINSTALLDIR)
368 ifeq ($(OS_FOR_BUILD),WNT)
369 cd $(SRCDIR)/instsetoo_native && $(MAKE) LIBO_TEST_INSTALL=TRUE $(GMAKE_OPTIONS)
370 else
371 @$(SRCDIR)/solenv/bin/ooinstall $(TESTINSTALLDIR)
372 ifeq ($(OS),MACOSX)
374 # Create Resources/*.lproj directories for languages supported by macOS
375 set -x; for lang in ca cs da de el en es fi fr hr hu id it ja ko ms nl no pl pt pt_PT ro ru sk sv th tr uk vi zh_CN zh_TW; do \
376 lproj=$(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/Resources/$$lang.lproj; \
377 mkdir "$$lproj"; \
378 done
380 # Remove unnecessary executables in the LibreOfficePython framework
381 rm -rf $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/bin
383 # Remove the python.o object file which is weird and interferes with app store uploading
384 # And with it removed, presumably the other stuff in the Python lib/python3.3/config-3.3m probably does not make sense either.
385 rm -rf $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/lib/python[1-9]*/config-[1-9]*
387 ifneq ($(ENABLE_MACOSX_SANDBOX),)
389 # Remove the gengal binary that we hardly need and the shell scripts
390 # for which code signatures (stored as extended attributes) won't
391 # survive upload to the App Store anyway. See
392 # https://developer.apple.com/library/content/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-TNTAG201
393 # We could put the shell scripts somewhere in Resources instead, but
394 # no 3rd-party code that would be interested in them would look there
395 # anyway.
396 rm $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/gengal
397 rm $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/unopkg
398 rm $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/unoinfo
399 endif
401 ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
402 # Then use the macosx-codesign-app-bundle script
403 @$(SRCDIR)/solenv/bin/macosx-codesign-app-bundle $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app
404 endif
405 endif
406 endif
407 @$(call gb_Top_InstallFinished,Test Installation,$(TESTINSTALLDIR))
409 mac-app-store-package: test-install
410 ifneq ($(MACOSX_PACKAGE_SIGNING_IDENTITY),)
411 rm -rf "$(PRODUCTNAME).app"
412 mv "$(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app" "$(PRODUCTNAME).app"
413 productbuild --component "$(PRODUCTNAME).app" /Applications --sign $(MACOSX_PACKAGE_SIGNING_IDENTITY) $(PRODUCTNAME_WITHOUT_SPACES).pkg
414 else
415 @echo You did not provide an installer signing identity with --enable-macosx-package-signing
416 @exit 1
417 endif
419 distro-pack-install: install
420 $(SRCDIR)/bin/distro-install-clean-up
421 $(SRCDIR)/bin/distro-install-desktop-integration
422 $(SRCDIR)/bin/distro-install-sdk
423 $(SRCDIR)/bin/distro-install-file-lists
425 install-package-%:
426 $(MAKE) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
429 @$(SRCDIR)/solenv/bin/create-ids
431 tags:
432 @$(SRCDIR)/solenv/bin/create-tags
434 etags:
435 @$(SRCDIR)/solenv/bin/create-tags -e
437 docs:
438 @$(SRCDIR)/solenv/bin/mkdocs.sh $(SRCDIR)/docs $(SRCDIR)/solenv/inc/doxygen.cfg
440 findunusedheaders:
441 $(SRCDIR)/bin/find-unusedheaders.py
443 symbols:
444 rm -fr $(WORKDIR)/symbols/
445 mkdir -p $(WORKDIR)/symbols/
446 ifeq ($(OS),WNT)
447 $(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/windows/dump_syms/Release/dump_syms.exe $(WORKDIR)/symbols/ $(INSTDIR)/program/
448 $(SRCDIR)/bin/symstore.sh
449 else
450 $(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/linux/dump_syms/dump_syms $(WORKDIR)/symbols/ $(INSTDIR)/program/*
451 endif
453 cd $(WORKDIR)/symbols/ && zip -r $(WORKDIR)/symbols.zip *
455 create-mar:
456 rm -fr $(WORKDIR)/installation/mar/
457 rm -fr $(WORKDIR)/installation/temp/
458 mkdir -p $(WORKDIR)/installation/temp/
459 mkdir -p $(WORKDIR)/installation/mar/
460 tar -xzf $(WORKDIR)/installation/LibreOfficeDev/archive/install/en-US/LibreOffice* -C $(WORKDIR)/installation/temp/
461 $(SRCDIR)/bin/update/make_full_update.sh $(WORKDIR)/installation/mar/test.mar $(WORKDIR)/installation/temp/*/
463 upload-symbols:
464 $(MAKE) -f $(SRCDIR)/Makefile.gbuild upload-symbols
466 create-update-info:
467 $(MAKE) -f $(SRCDIR)/Makefile.gbuild create-update-info
469 upload-update-info:
470 $(MAKE) -f $(SRCDIR)/Makefile.gbuild upload-update-info
472 create-partial-info:
473 $(MAKE) -f $(SRCDIR)/Makefile.gbuild create-partial-info
475 dump-deps:
476 @$(SRCDIR)/bin/module-deps.pl $(if $(verbose),-v) $(MAKE) $(SRCDIR)/Makefile.gbuild
478 dump-deps-png:
479 @$(SRCDIR)/bin/module-deps.pl $(if $(verbose),-v) $(MAKE) $(SRCDIR)/Makefile.gbuild | dot -Tpng -o lo.png
481 dump-deps-sort:
482 @$(SRCDIR)/bin/module-deps.pl -t $(if $(verbose),-v) $(MAKE) $(SRCDIR)/Makefile.gbuild
484 clang-format-check:
485 @$(SRCDIR)/solenv/clang-format/check-last-commit
487 define gb_Top_GbuildToIdeIntegration
488 $(1)-ide-integration: gbuildtojson $(if $(filter MACOSX,$(OS_FOR_BUILD)),python3.allbuild)
489 cd $(SRCDIR) && \
490 $(if $(filter MACOSX,$(OS_FOR_BUILD)),PATH="$(INSTROOT_FOR_BUILD)/Frameworks/LibreOfficePython.framework/Versions/Current/bin:$(PATH)") \
491 bin/gbuild-to-ide --ide $(1) --make $(MAKE)
493 endef
495 $(foreach ide,\
496 codelite \
497 vs \
498 kdevelop \
499 vim \
500 qtcreator \
501 xcode \
502 eclipsecdt,\
503 $(eval $(call gb_Top_GbuildToIdeIntegration,$(ide))))
505 # vscode integration is based on compile_commands.json, which is generated by vim-ide-integration
506 # the workspace template created by configure doesn't provide advanced/fine grained targets but
507 # rather supplies some useful settings and basic examples for run/debug configurations
508 # this target is provided primarily for consistency with the other ide-integrations
509 vscode-ide-integration: $(BUILDDIR)/vs-code.code-workspace vim-ide-integration
511 $(BUILDDIR)/vs-code.code-workspace: $(BUILDDIR)/vs-code.code-workspace.template
512 @test -e $@ || cp $< $@ && \
513 cmp -s $@ $< || echo "ATTN: $(@F) differs from $(<F), please check yourself for changes"
515 endif # MAKE_RESTARTS
517 # vim: set noet sw=4 ts=4: