lxml: fix --enable-python=fully-internal
[LibreOffice.git] / Makefile.in
blobac3e8aafb529b1c70c46702695b61853046ae014
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 coverage 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 ifneq ($(MSYSTEM),)
42 WSL:=@WSL@
43 # wsl needs unix-style path into windows realm
44 $(BUILDDIR)/config_host.mk : SRCDIR:=/$(shell $(WSL) wslpath -u $(SRCDIR))
45 endif
46 $(BUILDDIR)/config_host.mk : $(wildcard \
47 $(SRCDIR)/autogen.sh \
48 $(SRCDIR)/config_host.mk.in \
49 $(SRCDIR)/config_host_lang.mk.in \
50 $(SRCDIR)/Makefile.in \
51 $(SRCDIR)/instsetoo_native/util/openoffice.lst.in \
52 $(SRCDIR)/configure.ac \
53 $(SRCDIR)/config_host/*.h.in \
54 $(SRCDIR)/download.lst \
55 $(SRCDIR)/m4/*.m4 \
56 $(BUILDDIR)/autogen.input \
57 $(BUILDDIR)/autogen.lastrun \
58 ) \
59 $(shell if test -n '$(JAVA_HOME)' -a ! -d '$(JAVA_HOME)'; then echo force-restart; fi)
60 sh -c "$(if $(MSYSTEM),$(WSL) )$(SRCDIR)/autogen.sh"
62 else # MAKE_RESTARTS
64 .DEFAULT_GOAL := build
66 # Nested test is to check if the systemd-detect-virt command doesn't exist or it reports we're not
67 # in a container:
68 check-if-root:
69 @if test ! `uname` = 'Haiku' -a `id -u` = 0; then \
70 if test ! -x "$$(command -v systemd-detect-virt)" || ! systemd-detect-virt -c -q; then \
71 echo; \
72 echo 'Building LibreOffice as root is a very bad idea, use a regular user.'; \
73 echo; \
74 exit 1; \
75 fi \
78 gb_Side ?= host
80 include $(BUILDDIR)/config_$(gb_Side).mk
82 export GMAKE_OPTIONS?=-r$(if $(verbose),,s)$(value $(MAKEFLAGS))
84 PARALLELISM_OPTION := $(if $(filter-out 0,$(PARALLELISM)),-j $(PARALLELISM),)
87 # Partial Build
89 define gb_Top_GbuildModuleRules
90 .PHONY: $(1) $(1).build $(1).all $(1).check $(1).clean $(1).showdeliverables $(1).coverage $(foreach target,$(gb_Top_MODULE_CHECK_TARGETS),$(1).$(target))
91 .PHONY: $(1).allbuild $(1).buildall $(1).allcheck $(1).checkall
93 $(1): bootstrap fetch
94 $(KEEP_AWAKE_CMD) cd $(SRCDIR)/$(2) && $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS)
96 $(1).build $(1).check $(1).coverage $(foreach target,$(gb_Top_MODULE_CHECK_TARGETS),$(1).$(target)): bootstrap fetch
97 $(KEEP_AWAKE_CMD) cd $(SRCDIR)/$(2) && $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) $$(patsubst $(1).%,%,$$@)
99 $(1).clean $(1).showdeliverables:
100 cd $(SRCDIR)/$(2) && $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) $$(patsubst $(1).%,%,$$@)
102 $(1).allbuild $(1).buildall: bootstrap fetch
103 $(KEEP_AWAKE_CMD) $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1)
105 $(1).allcheck $(1).checkall: bootstrap fetch
106 $(KEEP_AWAKE_CMD) $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) $(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1)
108 $(1).all:
109 @echo "'make $(1).all' was renamed to 'make $(1).allcheck' (or use 'make $(1).allbuild' to build without unit tests)"
110 @exit 42
112 endef
114 define gb_Top_GbuildModulesRules
115 $(foreach m,$(1),$(call gb_Top_GbuildModuleRules,$(notdir $(m)),$(m)))
116 endef
118 gbuild_modules := $(patsubst $(SRCDIR)/%/,%,$(dir $(wildcard $(SRCDIR)/*/Module_*.mk $(SRCDIR)/external/*/Module_*.mk)))
120 gbuild_internal_modules := $(filter-out odk external,$(patsubst $(SRCDIR)/%/,%,$(dir $(wildcard $(SRCDIR)/*/Module_*.mk))))
122 internal.clean: $(addsuffix .clean,$(gbuild_internal_modules))
125 $(eval $(call gb_Top_GbuildModulesRules,$(gbuild_modules)))
127 gbuild_TARGETS := AllLangHelp \
128 AllLangMoTarget \
129 AllLangPackage \
130 AutoInstall \
131 CliLibrary \
132 CliNativeLibrary \
133 CliUnoApi \
134 CompilerTest \
135 ComponentTarget \
136 Configuration \
137 CppunitTest \
138 CustomTarget \
139 Dictionary \
140 Executable \
141 Extension \
142 ExtensionPackage \
143 ExtensionPackageSet \
144 ExternalPackage \
145 ExternalProject \
146 Gallery \
147 GeneratedPackage \
148 InstallModule \
149 InstallScript \
150 InternalUnoApi \
151 Jar \
152 JunitTest \
153 Library \
154 Module \
155 Package \
156 PackageSet \
157 Pagein \
158 Postprocess \
159 Pyuno \
160 PythonTest \
161 Rdb \
162 SdiTarget \
163 StaticLibrary \
164 UIConfig \
165 UITest \
166 UnoApi \
167 UnpackedTarball \
168 WinResTarget \
169 Zip \
171 # build a generic gbuild target
172 $(foreach target,$(gbuild_TARGETS),$(target)_% $(foreach module,$(gbuild_modules),$(target)_$(module)/%)) UIConfig_modules/% %.genpatch: bootstrap fetch
173 $(KEEP_AWAKE_CMD) $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
175 $(gbuild_TARGETS):
176 $(KEEP_AWAKE_CMD) $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
179 # Clean
181 clean: clean-host clean-build
183 clean-host:
184 rm -fr $(TESTINSTALLDIR)
185 rm -fr $(INSTDIR)
186 rm -fr $(WORKDIR)
188 clean-build:
189 ifneq ($(CROSS_COMPILING),)
190 rm -fr $(INSTDIR_FOR_BUILD)
191 rm -fr $(WORKDIR_FOR_BUILD)
192 ifeq ($(OS),ANDROID)
193 rm -fr $(BUILDDIR)/android/obj
194 rm -fr $(BUILDDIR)/android/jniLibs
195 rm -fr $(SRCDIR)/android/source/build
196 rm -fr $(SRCDIR)/android/source/assets
197 rm -fr $(SRCDIR)/android/source/assets_fullUI
198 rm -fr $(SRCDIR)/android/source/assets_strippedUI
199 rm -fr $(SRCDIR)/android/source/res_generated
200 endif
201 endif
203 include $(SRCDIR)/compilerplugins/Makefile.mk
206 # Distclean
208 distclean : clean compilerplugins-clean mac-app-store-package.clean
209 rm -fr \
210 $(BUILDDIR)/Makefile \
211 $(BUILDDIR)/aclocal.m4 \
212 $(BUILDDIR)/autom4te.cache \
213 $(BUILDDIR)/bin/bffvalidator.sh \
214 $(BUILDDIR)/bin/odfvalidator.sh \
215 $(BUILDDIR)/bin/officeotron.sh \
216 $(BUILDDIR)/config.Build.log \
217 $(BUILDDIR)/config.Build.warn \
218 $(BUILDDIR)/config.log \
219 $(BUILDDIR)/config.status \
220 $(BUILDDIR)/config.warn \
221 $(BUILDDIR)/config_build.mk \
222 $(BUILDDIR)/config_build_lang.mk \
223 $(BUILDDIR)/config_build \
224 $(BUILDDIR)/config_host.mk \
225 $(BUILDDIR)/config_host.mk.stamp \
226 $(BUILDDIR)/config_host_lang.mk \
227 $(BUILDDIR)/config_host_lang.mk.stamp \
228 $(BUILDDIR)/config_host/*.h \
229 $(BUILDDIR)/configure \
230 $(BUILDDIR)/hardened_runtime.xcent \
231 $(BUILDDIR)/instsetoo_native/util/openoffice.lst \
232 $(BUILDDIR)/solenv/lockfile/autoconf.h \
233 $(BUILDDIR)/lo.xcent \
234 $(BUILDDIR)/sysui/desktop/macosx/Info.plist \
235 $(BUILDDIR)/vs-code*.code-workspace*
236 $(if $(filter WNT,$(OS)),env -i PATH="$$PATH") $(FIND) $(SRCDIR)/solenv/gdb -name \*.pyc -exec rm -f {} \;
239 # custom command
241 cmd:
242 $(if $(verbose),echo "custom cmd" &&) ( $(cmd) )
245 # Fetch
247 ifneq ($(DO_FETCH_TARBALLS),)
248 include $(SRCDIR)/Makefile.fetch
249 fetch: download
250 fetch: get-submodules
252 ifneq (,$(wildcard $(SRCDIR)/.git))
253 get-submodules:
254 ifneq ($(foreach i,$(GIT_NEEDED_SUBMODULES),$(SRCDIR)/$(i)/.git),$(wildcard $(foreach i,$(GIT_NEEDED_SUBMODULES),$(SRCDIR)/$(i)/.git)))
255 cd $(SRCDIR) && ./g -f clone
256 endif
257 ifeq ($(shell test -d $(SRCDIR)/.git; echo $$?),0)
258 @cd $(SRCDIR) && ./g -z # make sure the git hooks are in place even if no submodules are needed
259 endif
261 else # these sources are from a tarball, so get the other source tarballs
262 gb_LO_VER := $(shell . $(SRCDIR)/sources.ver && echo $$lo_sources_ver)
263 $(if $(gb_LO_VER),,$(error Error while retrieving $$lo_sources_ver from $(SRCDIR)/sources.ver))
265 get-submodules: | download
266 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))))
267 $(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),\
268 $(call fetch_Download_item_unchecked,https://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))
269 $(SRCDIR)/bin/unpack-sources $(SRCDIR) $(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),\
270 $(TARFILE_LOCATION)/libreoffice-$(i)-$(gb_LO_VER).tar.xz)
271 endif
273 endif
275 else
276 fetch:
277 @echo "Automatic fetching of external tarballs is disabled."
279 endif
282 # Bootstrap
284 bootstrap: check-if-root compilerplugins
287 # Build
289 # Note: this will pipe through all gbuild targets to ... gbuild
290 # with some translations like "check"->"unitcheck subsequentcheck uicheck" for historic reasons
292 build: bootstrap fetch $(if $(CROSS_COMPILING),cross-toolset,install-gdb-printers) \
293 $(if $(filter check,$(MAKECMDGOALS)),$(if $(COMPILER_PLUGINS),$(if $(LODE_HOME),clang-format-check)))
294 $(KEEP_AWAKE_CMD) $(MAKE) $(PARALLELISM_OPTION) $(IWYU_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(build_goal)
295 ifeq ($(OS),iOS)
296 $(KEEP_AWAKE_CMD) $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) ios
297 endif
299 build-non-l10n-only build-l10n-only check debugrun translations packageinfo coverage $(gb_Top_MODULE_CHECK_TARGETS): build
301 help showmodules gbuildtojson pocheck:
302 $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
304 cross-toolset: bootstrap fetch install-gdb-printers
305 # fetch again in case there are externals only needed on build platform
306 ifneq ($(OS),iOS)
307 $(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(BUILDDIR)/Makefile fetch
308 endif
309 $(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild build-tools
311 install-gdb-printers:
312 ifneq ($(filter-out WNT MACOSX iOS,$(OS)),)
313 ifneq ($(INSTDIR_FOR_BUILD),$(INSTDIR))
314 mkdir -p $(INSTDIR_FOR_BUILD)
315 $(SRCDIR)/solenv/bin/install-gdb-printers -a $(INSTDIR_FOR_BUILD) -c
316 endif
317 mkdir -p $(INSTDIR)
318 $(SRCDIR)/solenv/bin/install-gdb-printers -a $(INSTDIR) -c
319 endif
323 # Install
326 define gb_Top_DoInstall
327 echo "$(1) in $(INSTALLDIR) ..." && \
328 WITH_LANG_LIST="$(WITH_LANG_LIST)" $(SRCDIR)/solenv/bin/ooinstall $(2) "$(INSTALLDIR)"
330 endef
332 ifneq ($(OS),MACOSX)
333 define gb_Top_InstallFinished
334 echo && echo "If you want to edit the .ui files with glade first execute:" && \
335 echo && echo "export GLADE_CATALOG_SEARCH_PATH=$(2)/share/glade" && \
336 echo && echo "$(1) finished, you can now execute:" && \
337 echo "$(2)/program/soffice"
339 endef
340 else
341 define gb_Top_InstallFinished
342 echo && echo "$(1) finished, you can now run: " && \
343 echo "open $(2)/$(PRODUCTNAME).app" && \
344 echo "" && \
345 echo "To debug: gdb $(2)/$(PRODUCTNAME).app/Contents/MacOS/soffice"
347 endef
348 endif
350 ifneq ($(OS),MACOSX)
351 install:
352 @$(call gb_Top_DoInstall,Installing,)
353 @$(call gb_Top_InstallFinished,Installation,$(INSTALLDIR))
355 install-strip:
356 @$(call gb_Top_DoInstall,Installing and stripping binaries,--strip)
357 @$(call gb_Top_InstallFinished,Installation,$(INSTALLDIR))
358 endif # !MACOSX
360 test-install: build
361 @rm -rf $(TESTINSTALLDIR)
362 @mkdir -p $(TESTINSTALLDIR)
363 ifeq ($(OS_FOR_BUILD),WNT)
364 cd $(SRCDIR)/instsetoo_native && $(MAKE) LIBO_TEST_INSTALL=TRUE $(GMAKE_OPTIONS)
365 else
366 @WITH_LANG_LIST="$(WITH_LANG_LIST)" $(SRCDIR)/solenv/bin/ooinstall $(TESTINSTALLDIR)
367 ifeq ($(OS),MACOSX)
369 # Create Resources/*.lproj directories for languages supported by macOS
370 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 \
371 lproj=$(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/Resources/$$lang.lproj; \
372 mkdir "$$lproj"; \
373 done
375 # Remove unnecessary executables in the LibreOfficePython framework
376 rm -rf $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/bin
378 # Remove the python.o object file which is weird and interferes with app store uploading
379 # And with it removed, presumably the other stuff in the Python lib/python3.3/config-3.3m probably does not make sense either.
380 rm -rf $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/lib/python[1-9]*/config-[1-9]*
382 ifneq ($(ENABLE_MACOSX_SANDBOX),)
384 # Remove the gengal binary that we hardly need and the shell scripts
385 # for which code signatures (stored as extended attributes) won't
386 # survive upload to the App Store anyway. See
387 # https://developer.apple.com/library/content/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-TNTAG201
388 # We could put the shell scripts somewhere in Resources instead, but
389 # no 3rd-party code that would be interested in them would look there
390 # anyway.
391 rm $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/gengal
392 rm $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/unopkg
393 rm $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/unoinfo
394 endif
395 ifneq ($(MACOSX_PROVISIONING_PROFILE),)
396 cp "$(MACOSX_PROVISIONING_PROFILE)" $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/embedded.provisionprofile
397 endif
398 ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
399 # Then use the macosx-codesign-app-bundle script
400 @$(SRCDIR)/solenv/bin/macosx-codesign-app-bundle $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app
401 endif
402 endif
403 endif
404 @$(call gb_Top_InstallFinished,Test Installation,$(TESTINSTALLDIR))
406 # target to bypass the packaging steps/to only assemble the package
407 mac-app-store-package.prepare: $(BUILDDIR)/$(PLATFORMID)/done
409 # shorthand target to build a complete package for the currently building architecture
410 mac-app-store-package: mac-app-store-package.$(PLATFORMID)
412 # recipe/targets to do the actual packaging
413 # the symbolication switch to productbuild unfortunately is undocumented, but that is what XCode
414 # uses when it creates a package with symbols for uploading to the appstore
415 mac-app-store-package.$(PLATFORMID) mac-app-store-package.universal: mac-app-store-package.%: $(BUILDDIR)/%/done
416 ifneq ($(MACOSX_PACKAGE_SIGNING_IDENTITY),)
417 $(SRCDIR)/solenv/bin/macosx-codesign-app-bundle $*/"$(PRODUCTNAME)".app
418 productbuild $(if $(ENABLE_SYMBOLS_FOR),--symbolication $*/Symbols) --component $*/"$(PRODUCTNAME)".app /Applications --sign $(MACOSX_PACKAGE_SIGNING_IDENTITY) $(PRODUCTNAME_WITHOUT_SPACES).pkg
419 else
420 @echo You did not provide an installer signing identity with --enable-macosx-package-signing
421 @exit 1
422 endif
424 # the builds need to persist a standard "make clean" to be able to combine them into a universal
425 # binary, so provide an additional target that can be used standalone or via make distclean
426 mac-app-store-package.clean:
427 rm -rf \
428 $(BUILDDIR)/macosx_x86_64 \
429 $(BUILDDIR)/macosx_aarch64 \
430 $(BUILDDIR)/universal \
431 $(BUILDDIR)/$(PRODUCTNAME_WITHOUT_SPACES).pkg
433 # used by the mac-app-store targets
434 $(BUILDDIR)/$(PLATFORMID)/done: test-install
435 rm -rf $(PLATFORMID)
436 mkdir -p $(PLATFORMID)/Symbols
437 mv $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app $(PLATFORMID)/"$(PRODUCTNAME)".app
438 ifneq ($(ENABLE_SYMBOLS_FOR),)
439 symbols -arch all -symbolsPackageDir $(PLATFORMID)/Symbols $(PLATFORMID)/"$(PRODUCTNAME)".app/Contents/Frameworks/[^L]* $(PLATFORMID)/"$(PRODUCTNAME)".app/Contents/MacOS/*
440 strip -S $(PLATFORMID)/"$(PRODUCTNAME)".app/Contents/Frameworks/[^L]* $(PLATFORMID)/"$(PRODUCTNAME)".app/Contents/MacOS/*
441 endif
442 touch $@
444 # build one arch using the mac-app-store-package.prepare target, make clean and change the autogen.input
445 # to build for the other target, then use mac-app-store-package.universal to build for the other arch and
446 # combine the two into a universal binary
447 $(BUILDDIR)/universal/done: $(BUILDDIR)/macosx_x86_64/done $(BUILDDIR)/macosx_aarch64/done
448 rm -rf universal
449 mkdir -p universal/Symbols
450 ifneq ($(ENABLE_SYMBOLS_FOR),)
451 cp -a macosx_x86_64/Symbols/* macosx_aarch64/Symbols/* universal/Symbols/
452 endif
453 $(SRCDIR)/bin/merge-app-bundles macosx_x86_64/"$(PRODUCTNAME)".app macosx_aarch64/"$(PRODUCTNAME)".app universal/"$(PRODUCTNAME)".app
454 touch $@
456 distro-pack-install: install
457 WITH_LANG_LIST="$(WITH_LANG_LIST)" WITH_POOR_HELP_LOCALIZATIONS="$(WITH_POOR_HELP_LOCALIZATIONS)" $(SRCDIR)/bin/distro-install-clean-up
458 $(SRCDIR)/bin/distro-install-desktop-integration
459 $(SRCDIR)/bin/distro-install-sdk
460 WITH_LANG_LIST="$(WITH_LANG_LIST)" $(SRCDIR)/bin/distro-install-file-lists
462 install-package-%:
463 $(MAKE) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
466 @$(SRCDIR)/solenv/bin/create-ids
468 tags:
469 @$(SRCDIR)/solenv/bin/create-tags
471 etags:
472 @$(SRCDIR)/solenv/bin/create-tags -e
474 docs:
475 @$(SRCDIR)/solenv/bin/mkdocs.sh $(SRCDIR)/docs $(SRCDIR)/solenv/inc/doxygen.cfg
477 findunusedheaders:
478 $(SRCDIR)/bin/find-unusedheaders.py
480 symbols:
481 rm -fr $(WORKDIR)/symbols/
482 mkdir -p $(WORKDIR)/symbols/
483 ifeq ($(OS),WNT)
484 $(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/windows/dump_syms/Release/dump_syms.exe $(WORKDIR)/symbols/ $(INSTDIR)/program/
485 $(SRCDIR)/bin/symstore.sh
486 else
487 $(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/linux/dump_syms/dump_syms $(WORKDIR)/symbols/ $(INSTDIR)/program/*
488 endif
490 cd $(WORKDIR)/symbols/ && zip -r $(WORKDIR)/symbols.zip *
492 create-mar:
493 rm -fr $(WORKDIR)/installation/mar/
494 rm -fr $(WORKDIR)/installation/temp/
495 mkdir -p $(WORKDIR)/installation/temp/
496 mkdir -p $(WORKDIR)/installation/mar/
497 tar -xzf $(WORKDIR)/installation/LibreOfficeDev/archive/install/en-US/LibreOffice* -C $(WORKDIR)/installation/temp/
498 $(SRCDIR)/bin/update/make_full_update.sh $(WORKDIR)/installation/mar/test.mar $(WORKDIR)/installation/temp/*/
500 upload-symbols:
501 $(MAKE) -f $(SRCDIR)/Makefile.gbuild upload-symbols
503 create-update-info:
504 $(MAKE) -f $(SRCDIR)/Makefile.gbuild create-update-info
506 create-partial-info:
507 $(MAKE) -f $(SRCDIR)/Makefile.gbuild create-partial-info
509 dump-deps:
510 @$(SRCDIR)/bin/module-deps.pl $(if $(verbose),-v) $(MAKE) $(SRCDIR)/Makefile.gbuild
512 dump-deps-png:
513 @$(SRCDIR)/bin/module-deps.pl $(if $(verbose),-v) $(MAKE) $(SRCDIR)/Makefile.gbuild | dot -Tpng -o lo.png
515 dump-deps-sort:
516 @$(SRCDIR)/bin/module-deps.pl -t $(if $(verbose),-v) $(MAKE) $(SRCDIR)/Makefile.gbuild
518 clang-format-check:
519 @$(SRCDIR)/solenv/clang-format/check-last-commit
521 define gb_Top_GbuildToIdeIntegration
522 $(1)-ide-integration: gbuildtojson $(if $(filter MACOSX,$(OS_FOR_BUILD)),python3.allbuild)
523 cd $(SRCDIR) && \
524 $(if $(filter MACOSX,$(OS_FOR_BUILD)),PATH="$(INSTROOT_FOR_BUILD)/Frameworks/LibreOfficePython.framework/Versions/Current/bin:$(PATH)") \
525 bin/gbuild-to-ide --ide $(1) --make $(MAKE)
527 endef
529 $(foreach ide,\
530 codelite \
531 vs \
532 kdevelop \
533 vim \
534 qtcreator \
535 xcode \
536 eclipsecdt,\
537 $(eval $(call gb_Top_GbuildToIdeIntegration,$(ide))))
539 # vscode integration is based on compile_commands.json, which is generated by vim-ide-integration
540 # the workspace template created by configure doesn't provide advanced/fine grained targets but
541 # rather supplies some useful settings and basic examples for run/debug configurations
542 # this target is provided primarily for consistency with the other ide-integrations
543 vscode-ide-integration: $(BUILDDIR)/vs-code.code-workspace vim-ide-integration
545 # ToDo: there probably is a way to have it at least create the compile-commands.json file
546 # for the vim/vs-code integration without building the registry stuff
547 Rdb:| fetch
548 gbuildtojson: Rdb
550 $(BUILDDIR)/vs-code.code-workspace: $(BUILDDIR)/vs-code.code-workspace.template
551 @test -e $@ || cp $< $@ && \
552 cmp -s $@ $< || echo "ATTN: $(@F) differs from $(<F), please check yourself for changes"
554 endif # MAKE_RESTARTS
556 # vim: set noet sw=4 ts=4: