tdf#163945 present drawable immediately
[LibreOffice.git] / Makefile.in
blob32ee72b2e099d81361e6f6f66313919efe18be1e
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 DotnetLibrary \
141 DotnetTest \
142 Executable \
143 Extension \
144 ExtensionPackage \
145 ExtensionPackageSet \
146 ExternalPackage \
147 ExternalProject \
148 Gallery \
149 GeneratedPackage \
150 InstallModule \
151 InstallScript \
152 InternalUnoApi \
153 Jar \
154 JunitTest \
155 Library \
156 Module \
157 Package \
158 PackageSet \
159 Pagein \
160 Postprocess \
161 Pyuno \
162 PythonTest \
163 Rdb \
164 SdiTarget \
165 StaticLibrary \
166 UIConfig \
167 UITest \
168 UnoApi \
169 UnpackedTarball \
170 WinResTarget \
171 Zip \
173 # build a generic gbuild target
174 $(foreach target,$(gbuild_TARGETS),$(target)_% $(foreach module,$(gbuild_modules),$(target)_$(module)/%)) UIConfig_modules/% %.genpatch: bootstrap fetch
175 $(KEEP_AWAKE_CMD) $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
177 $(gbuild_TARGETS):
178 $(KEEP_AWAKE_CMD) $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
181 # Clean
183 clean: clean-host clean-build
185 clean-host:
186 rm -fr $(TESTINSTALLDIR)
187 rm -fr $(INSTDIR)
188 rm -fr $(WORKDIR)
190 clean-build:
191 ifneq ($(CROSS_COMPILING),)
192 rm -fr $(INSTDIR_FOR_BUILD)
193 rm -fr $(WORKDIR_FOR_BUILD)
194 ifeq ($(OS),ANDROID)
195 rm -fr $(BUILDDIR)/android/obj
196 rm -fr $(BUILDDIR)/android/jniLibs
197 rm -fr $(SRCDIR)/android/source/build
198 rm -fr $(SRCDIR)/android/source/assets
199 rm -fr $(SRCDIR)/android/source/assets_fullUI
200 rm -fr $(SRCDIR)/android/source/assets_strippedUI
201 rm -fr $(SRCDIR)/android/source/res_generated
202 endif
203 endif
205 include $(SRCDIR)/compilerplugins/Makefile.mk
208 # Distclean
210 distclean : clean compilerplugins-clean mac-app-store-package.clean
211 rm -fr \
212 $(BUILDDIR)/Makefile \
213 $(BUILDDIR)/aclocal.m4 \
214 $(BUILDDIR)/autom4te.cache \
215 $(BUILDDIR)/bin/bffvalidator.sh \
216 $(BUILDDIR)/bin/odfvalidator.sh \
217 $(BUILDDIR)/bin/officeotron.sh \
218 $(BUILDDIR)/config.Build.log \
219 $(BUILDDIR)/config.Build.warn \
220 $(BUILDDIR)/config.log \
221 $(BUILDDIR)/config.status \
222 $(BUILDDIR)/config.warn \
223 $(BUILDDIR)/config_build.mk \
224 $(BUILDDIR)/config_build_lang.mk \
225 $(BUILDDIR)/config_build \
226 $(BUILDDIR)/config_host.mk \
227 $(BUILDDIR)/config_host.mk.stamp \
228 $(BUILDDIR)/config_host_lang.mk \
229 $(BUILDDIR)/config_host_lang.mk.stamp \
230 $(BUILDDIR)/config_host/*.h \
231 $(BUILDDIR)/configure \
232 $(BUILDDIR)/hardened_runtime.xcent \
233 $(BUILDDIR)/instsetoo_native/util/openoffice.lst \
234 $(BUILDDIR)/solenv/lockfile/autoconf.h \
235 $(BUILDDIR)/lo.xcent \
236 $(BUILDDIR)/sysui/desktop/macosx/Info.plist \
237 $(BUILDDIR)/vs-code*.code-workspace*
238 $(if $(filter WNT,$(OS)),env -i PATH="$$PATH") $(FIND) $(SRCDIR)/solenv/gdb -name \*.pyc -exec rm -f {} \;
241 # custom command
243 cmd:
244 $(if $(verbose),echo "custom cmd" &&) ( $(cmd) )
247 # Fetch
249 ifneq ($(DO_FETCH_TARBALLS),)
250 include $(SRCDIR)/Makefile.fetch
251 fetch: download
252 fetch: get-submodules
254 ifneq (,$(wildcard $(SRCDIR)/.git))
255 get-submodules:
256 ifneq ($(foreach i,$(GIT_NEEDED_SUBMODULES),$(SRCDIR)/$(i)/.git),$(wildcard $(foreach i,$(GIT_NEEDED_SUBMODULES),$(SRCDIR)/$(i)/.git)))
257 cd $(SRCDIR) && ./g -f clone
258 endif
259 ifeq ($(shell test -d $(SRCDIR)/.git; echo $$?),0)
260 @cd $(SRCDIR) && ./g -z # make sure the git hooks are in place even if no submodules are needed
261 endif
263 else # these sources are from a tarball, so get the other source tarballs
264 gb_LO_VER := $(shell . $(SRCDIR)/sources.ver && echo $$lo_sources_ver)
265 $(if $(gb_LO_VER),,$(error Error while retrieving $$lo_sources_ver from $(SRCDIR)/sources.ver))
267 get-submodules: | download
268 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))))
269 $(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),\
270 $(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))
271 $(SRCDIR)/bin/unpack-sources $(SRCDIR) $(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),\
272 $(TARFILE_LOCATION)/libreoffice-$(i)-$(gb_LO_VER).tar.xz)
273 endif
275 endif
277 else
278 fetch:
279 @echo "Automatic fetching of external tarballs is disabled."
281 endif
284 # Bootstrap
286 bootstrap: check-if-root compilerplugins
289 # Build
291 # Note: this will pipe through all gbuild targets to ... gbuild
292 # with some translations like "check"->"unitcheck subsequentcheck uicheck" for historic reasons
294 build: bootstrap fetch $(if $(CROSS_COMPILING),cross-toolset,install-gdb-printers) \
295 $(if $(filter check,$(MAKECMDGOALS)),$(if $(COMPILER_PLUGINS),$(if $(LODE_HOME),clang-format-check)))
296 $(KEEP_AWAKE_CMD) $(MAKE) $(PARALLELISM_OPTION) $(IWYU_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(build_goal)
297 ifeq ($(OS),iOS)
298 $(KEEP_AWAKE_CMD) $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) ios
299 endif
301 build-non-l10n-only build-l10n-only check debugrun translations packageinfo coverage $(gb_Top_MODULE_CHECK_TARGETS): build
303 help showmodules gbuildtojson pocheck:
304 $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
306 cross-toolset: bootstrap fetch install-gdb-printers
307 # fetch again in case there are externals only needed on build platform
308 ifneq ($(OS),iOS)
309 $(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(BUILDDIR)/Makefile fetch
310 endif
311 $(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild build-tools
313 install-gdb-printers:
314 ifneq ($(filter-out WNT MACOSX iOS,$(OS)),)
315 ifneq ($(INSTDIR_FOR_BUILD),$(INSTDIR))
316 mkdir -p $(INSTDIR_FOR_BUILD)
317 $(SRCDIR)/solenv/bin/install-gdb-printers -a $(INSTDIR_FOR_BUILD) -c
318 endif
319 mkdir -p $(INSTDIR)
320 $(SRCDIR)/solenv/bin/install-gdb-printers -a $(INSTDIR) -c
321 endif
325 # Install
328 define gb_Top_DoInstall
329 echo "$(1) in $(INSTALLDIR) ..." && \
330 WITH_LANG_LIST="$(WITH_LANG_LIST)" $(SRCDIR)/solenv/bin/ooinstall $(2) "$(INSTALLDIR)"
332 endef
334 ifneq ($(OS),MACOSX)
335 define gb_Top_InstallFinished
336 echo && echo "If you want to edit the .ui files with glade first execute:" && \
337 echo && echo "export GLADE_CATALOG_SEARCH_PATH=$(2)/share/glade" && \
338 echo && echo "$(1) finished, you can now execute:" && \
339 echo "$(2)/program/soffice"
341 endef
342 else
343 define gb_Top_InstallFinished
344 echo && echo "$(1) finished, you can now run: " && \
345 echo "open $(2)/$(PRODUCTNAME).app" && \
346 echo "" && \
347 echo "To debug: gdb $(2)/$(PRODUCTNAME).app/Contents/MacOS/soffice"
349 endef
350 endif
352 ifneq ($(OS),MACOSX)
353 install:
354 @$(call gb_Top_DoInstall,Installing,)
355 @$(call gb_Top_InstallFinished,Installation,$(INSTALLDIR))
357 install-strip:
358 @$(call gb_Top_DoInstall,Installing and stripping binaries,--strip)
359 @$(call gb_Top_InstallFinished,Installation,$(INSTALLDIR))
360 endif # !MACOSX
362 test-install: build
363 @rm -rf $(TESTINSTALLDIR)
364 @mkdir -p $(TESTINSTALLDIR)
365 ifeq ($(OS_FOR_BUILD),WNT)
366 cd $(SRCDIR)/instsetoo_native && $(MAKE) LIBO_TEST_INSTALL=TRUE $(GMAKE_OPTIONS)
367 else
368 @WITH_LANG_LIST="$(WITH_LANG_LIST)" $(SRCDIR)/solenv/bin/ooinstall $(TESTINSTALLDIR)
369 ifeq ($(OS),MACOSX)
371 # Create Resources/*.lproj directories for languages supported by macOS
372 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 \
373 lproj=$(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/Resources/$$lang.lproj; \
374 mkdir "$$lproj"; \
375 done
377 # Remove unnecessary executables in the LibreOfficePython framework
378 rm -rf $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/bin
380 # Remove the python.o object file which is weird and interferes with app store uploading
381 # And with it removed, presumably the other stuff in the Python lib/python3.3/config-3.3m probably does not make sense either.
382 rm -rf $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/lib/python[1-9]*/config-[1-9]*
384 ifneq ($(ENABLE_MACOSX_SANDBOX),)
386 # Remove the gengal binary that we hardly need and the shell scripts
387 # for which code signatures (stored as extended attributes) won't
388 # survive upload to the App Store anyway. See
389 # https://developer.apple.com/library/content/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-TNTAG201
390 # We could put the shell scripts somewhere in Resources instead, but
391 # no 3rd-party code that would be interested in them would look there
392 # anyway.
393 rm $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/gengal
394 rm $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/unopkg
395 rm $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/unoinfo
396 endif
397 ifneq ($(MACOSX_PROVISIONING_PROFILE),)
398 cp "$(MACOSX_PROVISIONING_PROFILE)" $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/embedded.provisionprofile
399 endif
400 ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
401 # Then use the macosx-codesign-app-bundle script
402 @$(SRCDIR)/solenv/bin/macosx-codesign-app-bundle $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app
403 endif
404 endif
405 endif
406 @$(call gb_Top_InstallFinished,Test Installation,$(TESTINSTALLDIR))
408 # target to bypass the packaging steps/to only assemble the package
409 mac-app-store-package.prepare: $(BUILDDIR)/$(PLATFORMID)/done
411 # shorthand target to build a complete package for the currently building architecture
412 mac-app-store-package: mac-app-store-package.$(PLATFORMID)
414 # recipe/targets to do the actual packaging
415 # the symbolication switch to productbuild unfortunately is undocumented, but that is what XCode
416 # uses when it creates a package with symbols for uploading to the appstore
417 mac-app-store-package.$(PLATFORMID) mac-app-store-package.universal: mac-app-store-package.%: $(BUILDDIR)/%/done
418 ifneq ($(MACOSX_PACKAGE_SIGNING_IDENTITY),)
419 $(SRCDIR)/solenv/bin/macosx-codesign-app-bundle $*/"$(PRODUCTNAME)".app
420 productbuild $(if $(ENABLE_SYMBOLS_FOR),--symbolication $*/Symbols) --component $*/"$(PRODUCTNAME)".app /Applications --sign $(MACOSX_PACKAGE_SIGNING_IDENTITY) $(PRODUCTNAME_WITHOUT_SPACES).pkg
421 else
422 @echo You did not provide an installer signing identity with --enable-macosx-package-signing
423 @exit 1
424 endif
426 # the builds need to persist a standard "make clean" to be able to combine them into a universal
427 # binary, so provide an additional target that can be used standalone or via make distclean
428 mac-app-store-package.clean:
429 rm -rf \
430 $(BUILDDIR)/macosx_x86_64 \
431 $(BUILDDIR)/macosx_aarch64 \
432 $(BUILDDIR)/universal \
433 $(BUILDDIR)/$(PRODUCTNAME_WITHOUT_SPACES).pkg
435 # used by the mac-app-store targets
436 $(BUILDDIR)/$(PLATFORMID)/done: test-install
437 rm -rf $(PLATFORMID)
438 mkdir -p $(PLATFORMID)/Symbols
439 mv $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app $(PLATFORMID)/"$(PRODUCTNAME)".app
440 ifneq ($(ENABLE_SYMBOLS_FOR),)
441 symbols -arch all -symbolsPackageDir $(PLATFORMID)/Symbols $(PLATFORMID)/"$(PRODUCTNAME)".app/Contents/Frameworks/[^L]* $(PLATFORMID)/"$(PRODUCTNAME)".app/Contents/MacOS/*
442 strip -S $(PLATFORMID)/"$(PRODUCTNAME)".app/Contents/Frameworks/[^L]* $(PLATFORMID)/"$(PRODUCTNAME)".app/Contents/MacOS/*
443 endif
444 touch $@
446 # build one arch using the mac-app-store-package.prepare target, make clean and change the autogen.input
447 # to build for the other target, then use mac-app-store-package.universal to build for the other arch and
448 # combine the two into a universal binary
449 $(BUILDDIR)/universal/done: $(BUILDDIR)/macosx_x86_64/done $(BUILDDIR)/macosx_aarch64/done
450 rm -rf universal
451 mkdir -p universal/Symbols
452 ifneq ($(ENABLE_SYMBOLS_FOR),)
453 cp -a macosx_x86_64/Symbols/* macosx_aarch64/Symbols/* universal/Symbols/
454 endif
455 $(SRCDIR)/bin/merge-app-bundles macosx_x86_64/"$(PRODUCTNAME)".app macosx_aarch64/"$(PRODUCTNAME)".app universal/"$(PRODUCTNAME)".app
456 touch $@
458 distro-pack-install: install
459 WITH_LANG_LIST="$(WITH_LANG_LIST)" WITH_POOR_HELP_LOCALIZATIONS="$(WITH_POOR_HELP_LOCALIZATIONS)" $(SRCDIR)/bin/distro-install-clean-up
460 $(SRCDIR)/bin/distro-install-desktop-integration
461 $(SRCDIR)/bin/distro-install-sdk
462 WITH_LANG_LIST="$(WITH_LANG_LIST)" $(SRCDIR)/bin/distro-install-file-lists
464 install-package-%:
465 $(MAKE) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
468 @$(SRCDIR)/solenv/bin/create-ids
470 tags:
471 @$(SRCDIR)/solenv/bin/create-tags
473 etags:
474 @$(SRCDIR)/solenv/bin/create-tags -e
476 docs:
477 @$(SRCDIR)/solenv/bin/mkdocs.sh $(SRCDIR)/docs $(SRCDIR)/solenv/inc/doxygen.cfg
479 findunusedheaders:
480 $(SRCDIR)/bin/find-unusedheaders.py
482 symbols:
483 rm -fr $(WORKDIR)/symbols/
484 mkdir -p $(WORKDIR)/symbols/
485 ifeq ($(OS),WNT)
486 $(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/windows/dump_syms/Release/dump_syms.exe $(WORKDIR)/symbols/ $(INSTDIR)/program/
487 $(SRCDIR)/bin/symstore.sh
488 else
489 $(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/linux/dump_syms/dump_syms $(WORKDIR)/symbols/ $(INSTDIR)/program/*
490 endif
492 cd $(WORKDIR)/symbols/ && zip -r $(WORKDIR)/symbols.zip *
494 create-mar:
495 rm -fr $(WORKDIR)/installation/mar/
496 rm -fr $(WORKDIR)/installation/temp/
497 mkdir -p $(WORKDIR)/installation/temp/
498 mkdir -p $(WORKDIR)/installation/mar/
499 tar -xzf $(WORKDIR)/installation/LibreOfficeDev/archive/install/en-US/LibreOffice* -C $(WORKDIR)/installation/temp/
500 $(SRCDIR)/bin/update/make_full_update.sh $(WORKDIR)/installation/mar/test.mar $(WORKDIR)/installation/temp/*/
502 upload-symbols:
503 $(MAKE) -f $(SRCDIR)/Makefile.gbuild upload-symbols
505 create-update-info:
506 $(MAKE) -f $(SRCDIR)/Makefile.gbuild create-update-info
508 create-partial-info:
509 $(MAKE) -f $(SRCDIR)/Makefile.gbuild create-partial-info
511 dump-deps:
512 @$(SRCDIR)/bin/module-deps.pl $(if $(verbose),-v) $(MAKE) $(SRCDIR)/Makefile.gbuild
514 dump-deps-png:
515 @$(SRCDIR)/bin/module-deps.pl $(if $(verbose),-v) $(MAKE) $(SRCDIR)/Makefile.gbuild | dot -Tpng -o lo.png
517 dump-deps-sort:
518 @$(SRCDIR)/bin/module-deps.pl -t $(if $(verbose),-v) $(MAKE) $(SRCDIR)/Makefile.gbuild
520 clang-format-check:
521 @$(SRCDIR)/solenv/clang-format/check-last-commit
523 define gb_Top_GbuildToIdeIntegration
524 $(1)-ide-integration: gbuildtojson $(if $(filter MACOSX,$(OS_FOR_BUILD)),python3.allbuild)
525 cd $(SRCDIR) && \
526 $(if $(filter MACOSX,$(OS_FOR_BUILD)),PATH="$(INSTROOT_FOR_BUILD)/Frameworks/LibreOfficePython.framework/Versions/Current/bin:$(PATH)") \
527 $(if $(filter WNT,$(OS_FOR_BUILD)$(PYTHON_FOR_BUILD)),$(INSTROOT_FOR_BUILD)/program/python.exe) \
528 bin/gbuild-to-ide --ide $(1) --make $(MAKE)
530 endef
532 $(foreach ide,\
533 codelite \
534 vs \
535 kdevelop \
536 vim \
537 qtcreator \
538 xcode \
539 eclipsecdt,\
540 $(eval $(call gb_Top_GbuildToIdeIntegration,$(ide))))
542 # vscode integration is based on compile_commands.json, which is generated by vim-ide-integration
543 # the workspace template created by configure doesn't provide advanced/fine grained targets but
544 # rather supplies some useful settings and basic examples for run/debug configurations
545 # this target is provided primarily for consistency with the other ide-integrations
546 vscode-ide-integration: $(BUILDDIR)/vs-code.code-workspace vim-ide-integration
548 # ToDo: there probably is a way to have it at least create the compile-commands.json file
549 # for the vim/vs-code integration without building the registry stuff
550 Rdb:| fetch
551 gbuildtojson: Rdb
553 $(BUILDDIR)/vs-code.code-workspace: $(BUILDDIR)/vs-code.code-workspace.template
554 @test -e $@ || cp $< $@ && \
555 cmp -s $@ $< || echo "ATTN: $(@F) differs from $(<F), please check yourself for changes"
557 endif # MAKE_RESTARTS
559 # vim: set noet sw=4 ts=4: