2011-08-09 12:12:48 -05:00
|
|
|
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
2012-05-15 07:47:37 -05:00
|
|
|
#
|
2013-04-24 11:14:03 -05:00
|
|
|
# This file is part of the LibreOffice project.
|
2012-05-15 07:47:37 -05:00
|
|
|
#
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
#
|
2012-01-24 15:48:30 -06:00
|
|
|
|
2016-08-17 19:43:14 -05:00
|
|
|
gb_Top_MODULE_CHECK_TARGETS := slowcheck unitcheck subsequentcheck perfcheck uicheck screenshot
|
2014-09-05 05:43:34 -05:00
|
|
|
|
2022-09-11 05:21:22 -05:00
|
|
|
.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)
|
2012-12-23 12:27:28 -06:00
|
|
|
|
2020-03-02 04:45:24 -06:00
|
|
|
MAKECMDGOALS?=build
|
2021-12-04 11:21:04 -06:00
|
|
|
build_goal:=$(if $(filter build uicheck,$(MAKECMDGOALS)),build)\
|
2020-03-02 04:45:24 -06:00
|
|
|
$(if $(filter check,$(MAKECMDGOALS)),unitcheck slowcheck subsequentcheck $(if $(filter Linux, $(shell uname)), uicheck))\
|
|
|
|
$(filter build-l10n-only build-non-l10n-only debugrun help showmodules translations $(gb_Top_MODULE_CHECK_TARGETS) check packageinfo gbuildtojson,$(MAKECMDGOALS))
|
2012-01-26 16:29:26 -06:00
|
|
|
|
2012-12-23 12:27:28 -06:00
|
|
|
SRCDIR := @SRC_ROOT@
|
|
|
|
BUILDDIR := @BUILDDIR@
|
clang-format: enforce coding style via Jenkins
- factor out common code to a shared module, and quote path to the
clang-format binary, just in case.
- add a new check-last-commit script that is the CI equivalent of the
exiting git pre-commit hook, but this one handles lack of clang-format
as an error, not as a warning.
- $LODE_HOME/opt/bin is supposed to be in PATH already, so not
mentioning LODE_HOME in ClangFormat::find() explicitly.
- if both COMPILER_PLUGINS and LODE_HOME is set, invoke
solenv/clang-format/check-last-commit as part of 'make check'
To test these changes as part of CI, fix a single style violation in an
already committed, non-blacklisted file.
This depends on the lode.git commit
496123bcae28e06c6d6aeda39a5afd1e1fb1fd98 (utils_Linux: install
clang-format in the Jenkins case, 2017-11-16), otherwise erroring out on
a not installed clang-format as part of the build would be a problem.
Change-Id: Ib3110826194ff78a7f1bed1c3796147e92ccb3ba
Reviewed-on: https://gerrit.libreoffice.org/44939
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-20 02:04:51 -06:00
|
|
|
COMPILER_PLUGINS := @COMPILER_PLUGINS@
|
2013-05-30 09:12:22 -05:00
|
|
|
GIT_BUILD := $(if $(wildcard $(SRCDIR)/.git),T)
|
2012-01-24 15:48:30 -06:00
|
|
|
|
2013-05-30 09:12:22 -05:00
|
|
|
# Run autogen.sh if needed and force make to restart itself.
|
|
|
|
# ... but there are several cases where we do not want to run
|
|
|
|
# autogen.sh:
|
|
|
|
# 1. if we are building from tarballs, not git checkout (I do not
|
|
|
|
# think packagers would ever want that. I certainly do not.)
|
|
|
|
# 2. if we are making help, clean or distclean, because they do not
|
|
|
|
# need updated configuration
|
2014-09-08 13:52:03 -05:00
|
|
|
ifeq (,$(MAKE_RESTARTS)$(if $(GIT_BUILD),,T)$(if $(filter-out help showmodules clean distclean,$(MAKECMDGOALS)),,T))
|
2012-03-06 16:43:07 -06:00
|
|
|
|
2017-07-27 06:18:11 -05:00
|
|
|
# note: this must touch both Makefile and $(BUILDDIR)/Makefile, because make
|
|
|
|
# may be invoked using either of these paths, and it will restart itself only
|
|
|
|
# if the updated target is exactly the same path as the Makefile it is using
|
2012-12-23 12:27:28 -06:00
|
|
|
.PHONY : force-restart
|
2017-07-27 06:18:11 -05:00
|
|
|
Makefile $(BUILDDIR)/Makefile: $(BUILDDIR)/config_host.mk $(BUILDDIR)/config_host_lang.mk force-restart
|
2012-12-23 12:27:28 -06:00
|
|
|
@touch $@
|
2012-01-26 14:26:49 -06:00
|
|
|
|
2012-05-15 07:47:37 -05:00
|
|
|
# run configure in an environment not polluted by config_host.mk
|
2024-04-18 05:45:01 -05:00
|
|
|
ifneq ($(MSYSTEM),)
|
|
|
|
WSL:=@WSL@
|
|
|
|
# wsl needs unix-style path into windows realm
|
|
|
|
$(BUILDDIR)/config_host.mk : SRCDIR:=/$(shell $(WSL) wslpath -u $(SRCDIR))
|
|
|
|
endif
|
2013-11-20 17:02:18 -06:00
|
|
|
$(BUILDDIR)/config_host.mk : $(wildcard \
|
2021-12-24 06:47:46 -06:00
|
|
|
$(SRCDIR)/autogen.sh \
|
2012-05-15 07:47:37 -05:00
|
|
|
$(SRCDIR)/config_host.mk.in \
|
2015-03-26 03:19:01 -05:00
|
|
|
$(SRCDIR)/config_host_lang.mk.in \
|
2012-12-11 07:49:24 -06:00
|
|
|
$(SRCDIR)/Makefile.in \
|
2013-01-18 15:11:53 -06:00
|
|
|
$(SRCDIR)/instsetoo_native/util/openoffice.lst.in \
|
2012-10-19 15:59:21 -05:00
|
|
|
$(SRCDIR)/configure.ac \
|
2013-11-20 17:02:18 -06:00
|
|
|
$(SRCDIR)/config_host/*.h.in \
|
2018-05-08 10:24:15 -05:00
|
|
|
$(SRCDIR)/download.lst \
|
2021-12-24 06:45:47 -06:00
|
|
|
$(SRCDIR)/m4/*.m4 \
|
2013-11-20 17:02:18 -06:00
|
|
|
$(BUILDDIR)/autogen.input \
|
2017-09-22 08:51:22 -05:00
|
|
|
$(BUILDDIR)/autogen.lastrun \
|
2016-07-20 06:28:24 -05:00
|
|
|
) \
|
2024-04-18 05:45:01 -05:00
|
|
|
$(shell if test -n '$(JAVA_HOME)' -a ! -d '$(JAVA_HOME)'; then echo force-restart; fi)
|
|
|
|
sh -c "$(if $(MSYSTEM),$(WSL) )$(SRCDIR)/autogen.sh"
|
2012-01-26 14:26:49 -06:00
|
|
|
|
2012-12-23 12:27:28 -06:00
|
|
|
else # MAKE_RESTARTS
|
|
|
|
|
2020-03-02 04:45:24 -06:00
|
|
|
.DEFAULT_GOAL := build
|
2016-04-14 01:01:48 -05:00
|
|
|
|
2021-07-19 10:32:06 -05:00
|
|
|
# Nested test is to check if the systemd-detect-virt command doesn't exist or it reports we're not
|
|
|
|
# in a container:
|
2017-02-22 08:01:12 -06:00
|
|
|
check-if-root:
|
2021-04-07 09:12:39 -05:00
|
|
|
@if test ! `uname` = 'Haiku' -a `id -u` = 0; then \
|
|
|
|
if test ! -x "$$(command -v systemd-detect-virt)" || ! systemd-detect-virt -c -q; then \
|
|
|
|
echo; \
|
|
|
|
echo 'Building LibreOffice as root is a very bad idea, use a regular user.'; \
|
|
|
|
echo; \
|
|
|
|
exit 1; \
|
|
|
|
fi \
|
2017-02-22 08:01:12 -06:00
|
|
|
fi
|
|
|
|
|
2013-11-20 17:34:20 -06:00
|
|
|
gb_Side ?= host
|
2012-12-23 12:27:28 -06:00
|
|
|
|
|
|
|
include $(BUILDDIR)/config_$(gb_Side).mk
|
|
|
|
|
2015-10-02 04:30:40 -05:00
|
|
|
export GMAKE_OPTIONS?=-r$(if $(verbose),,s)$(value $(MAKEFLAGS))
|
2012-12-23 12:27:28 -06:00
|
|
|
|
2014-03-23 09:58:00 -05:00
|
|
|
PARALLELISM_OPTION := $(if $(filter-out 0,$(PARALLELISM)),-j $(PARALLELISM),)
|
|
|
|
|
2013-02-27 11:40:36 -06:00
|
|
|
#
|
|
|
|
# Partial Build
|
|
|
|
#
|
2013-11-20 12:21:34 -06:00
|
|
|
define gb_Top_GbuildModuleRules
|
2022-09-11 05:21:22 -05:00
|
|
|
.PHONY: $(1) $(1).build $(1).all $(1).check $(1).clean $(1).showdeliverables $(1).coverage $(foreach target,$(gb_Top_MODULE_CHECK_TARGETS),$(1).$(target))
|
2022-01-16 13:08:19 -06:00
|
|
|
.PHONY: $(1).allbuild $(1).buildall $(1).allcheck $(1).checkall
|
2012-12-23 12:27:28 -06:00
|
|
|
|
|
|
|
$(1): bootstrap fetch
|
2024-04-26 07:49:59 -05:00
|
|
|
$(KEEP_AWAKE_CMD) cd $(SRCDIR)/$(2) && $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS)
|
2012-12-23 12:27:28 -06:00
|
|
|
|
2022-09-11 05:21:22 -05:00
|
|
|
$(1).build $(1).check $(1).coverage $(foreach target,$(gb_Top_MODULE_CHECK_TARGETS),$(1).$(target)): bootstrap fetch
|
2024-04-26 07:49:59 -05:00
|
|
|
$(KEEP_AWAKE_CMD) cd $(SRCDIR)/$(2) && $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) $$(patsubst $(1).%,%,$$@)
|
2016-06-29 08:03:13 -05:00
|
|
|
|
|
|
|
$(1).clean $(1).showdeliverables:
|
2014-03-23 15:20:00 -05:00
|
|
|
cd $(SRCDIR)/$(2) && $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) $$(patsubst $(1).%,%,$$@)
|
2012-12-23 12:27:28 -06:00
|
|
|
|
2022-01-16 13:08:19 -06:00
|
|
|
$(1).allbuild $(1).buildall: bootstrap fetch
|
2024-04-26 07:49:59 -05:00
|
|
|
$(KEEP_AWAKE_CMD) $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1)
|
2022-01-12 09:21:26 -06:00
|
|
|
|
2022-01-16 13:08:19 -06:00
|
|
|
$(1).allcheck $(1).checkall: bootstrap fetch
|
2024-04-26 07:49:59 -05:00
|
|
|
$(KEEP_AWAKE_CMD) $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) $(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1)
|
2013-02-26 08:15:22 -06:00
|
|
|
|
2022-01-16 13:08:19 -06:00
|
|
|
$(1).all:
|
|
|
|
@echo "'make $(1).all' was renamed to 'make $(1).allcheck' (or use 'make $(1).allbuild' to build without unit tests)"
|
|
|
|
@exit 42
|
2022-01-12 09:21:26 -06:00
|
|
|
|
2012-12-23 12:27:28 -06:00
|
|
|
endef
|
|
|
|
|
2013-11-20 12:21:34 -06:00
|
|
|
define gb_Top_GbuildModulesRules
|
|
|
|
$(foreach m,$(1),$(call gb_Top_GbuildModuleRules,$(notdir $(m)),$(m)))
|
2012-12-23 12:27:28 -06:00
|
|
|
endef
|
|
|
|
|
2013-10-23 09:33:50 -05:00
|
|
|
gbuild_modules := $(patsubst $(SRCDIR)/%/,%,$(dir $(wildcard $(SRCDIR)/*/Module_*.mk $(SRCDIR)/external/*/Module_*.mk)))
|
2013-03-24 08:34:55 -05:00
|
|
|
|
2014-07-07 07:29:05 -05:00
|
|
|
gbuild_internal_modules := $(filter-out odk external,$(patsubst $(SRCDIR)/%/,%,$(dir $(wildcard $(SRCDIR)/*/Module_*.mk))))
|
|
|
|
|
|
|
|
internal.clean: $(addsuffix .clean,$(gbuild_internal_modules))
|
|
|
|
|
|
|
|
|
2013-11-20 12:21:34 -06:00
|
|
|
$(eval $(call gb_Top_GbuildModulesRules,$(gbuild_modules)))
|
2012-12-23 12:27:28 -06:00
|
|
|
|
2013-03-02 12:06:22 -06:00
|
|
|
gbuild_TARGETS := AllLangHelp \
|
2017-10-20 06:46:49 -05:00
|
|
|
AllLangMoTarget \
|
2013-05-07 05:29:34 -05:00
|
|
|
AllLangPackage \
|
2013-06-09 17:56:28 -05:00
|
|
|
AutoInstall \
|
2013-03-02 12:06:22 -06:00
|
|
|
CliLibrary \
|
|
|
|
CliNativeLibrary \
|
2013-10-28 04:32:03 -05:00
|
|
|
CliUnoApi \
|
2016-12-16 03:09:45 -06:00
|
|
|
CompilerTest \
|
2021-12-15 08:54:44 -06:00
|
|
|
ComponentTarget \
|
2013-03-02 12:06:22 -06:00
|
|
|
Configuration \
|
|
|
|
CppunitTest \
|
|
|
|
CustomTarget \
|
|
|
|
Dictionary \
|
2024-05-30 03:58:57 -05:00
|
|
|
DotnetLibrary \
|
2024-07-27 09:36:56 -05:00
|
|
|
DotnetTest \
|
2013-03-02 12:06:22 -06:00
|
|
|
Executable \
|
|
|
|
Extension \
|
2013-10-30 18:15:51 -05:00
|
|
|
ExtensionPackage \
|
2013-10-30 18:58:46 -05:00
|
|
|
ExtensionPackageSet \
|
2013-03-02 12:06:22 -06:00
|
|
|
ExternalPackage \
|
|
|
|
ExternalProject \
|
2015-01-07 06:45:56 -06:00
|
|
|
Gallery \
|
2013-05-04 06:21:33 -05:00
|
|
|
GeneratedPackage \
|
2013-03-02 12:06:22 -06:00
|
|
|
InstallModule \
|
|
|
|
InstallScript \
|
|
|
|
InternalUnoApi \
|
|
|
|
Jar \
|
|
|
|
JunitTest \
|
|
|
|
Library \
|
|
|
|
Module \
|
|
|
|
Package \
|
2013-04-07 02:45:19 -05:00
|
|
|
PackageSet \
|
2013-03-02 12:06:22 -06:00
|
|
|
Pagein \
|
2013-05-24 08:49:11 -05:00
|
|
|
Postprocess \
|
2013-03-02 12:06:22 -06:00
|
|
|
Pyuno \
|
2013-04-18 15:59:25 -05:00
|
|
|
PythonTest \
|
2013-03-02 12:06:22 -06:00
|
|
|
Rdb \
|
2018-01-12 03:03:55 -06:00
|
|
|
SdiTarget \
|
2013-03-02 12:06:22 -06:00
|
|
|
StaticLibrary \
|
2013-04-06 06:10:54 -05:00
|
|
|
UIConfig \
|
2016-05-09 03:05:14 -05:00
|
|
|
UITest \
|
2013-03-02 12:06:22 -06:00
|
|
|
UnoApi \
|
|
|
|
UnpackedTarball \
|
|
|
|
WinResTarget \
|
2013-03-31 04:34:10 -05:00
|
|
|
Zip \
|
2013-04-14 01:18:27 -05:00
|
|
|
|
2013-03-02 12:06:22 -06:00
|
|
|
# build a generic gbuild target
|
2018-02-15 08:08:03 -06:00
|
|
|
$(foreach target,$(gbuild_TARGETS),$(target)_% $(foreach module,$(gbuild_modules),$(target)_$(module)/%)) UIConfig_modules/% %.genpatch: bootstrap fetch
|
2024-04-26 07:49:59 -05:00
|
|
|
$(KEEP_AWAKE_CMD) $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
|
2012-12-23 12:27:28 -06:00
|
|
|
|
2018-03-14 07:37:31 -05:00
|
|
|
$(gbuild_TARGETS):
|
2024-04-26 07:49:59 -05:00
|
|
|
$(KEEP_AWAKE_CMD) $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
|
2018-03-14 07:37:31 -05:00
|
|
|
|
2012-12-23 12:27:28 -06:00
|
|
|
#
|
|
|
|
# Clean
|
|
|
|
#
|
|
|
|
clean: clean-host clean-build
|
|
|
|
|
|
|
|
clean-host:
|
2013-10-01 08:30:08 -05:00
|
|
|
rm -fr $(TESTINSTALLDIR)
|
2013-04-03 10:13:32 -05:00
|
|
|
rm -fr $(INSTDIR)
|
2012-12-23 12:27:28 -06:00
|
|
|
rm -fr $(WORKDIR)
|
|
|
|
|
|
|
|
clean-build:
|
2014-02-27 09:19:43 -06:00
|
|
|
ifneq ($(CROSS_COMPILING),)
|
2013-09-25 02:44:35 -05:00
|
|
|
rm -fr $(INSTDIR_FOR_BUILD)
|
2013-02-27 11:40:36 -06:00
|
|
|
rm -fr $(WORKDIR_FOR_BUILD)
|
2017-11-30 06:52:40 -06:00
|
|
|
ifeq ($(OS),ANDROID)
|
2020-07-17 02:33:31 -05:00
|
|
|
rm -fr $(BUILDDIR)/android/obj
|
|
|
|
rm -fr $(BUILDDIR)/android/jniLibs
|
2017-11-30 06:52:40 -06:00
|
|
|
rm -fr $(SRCDIR)/android/source/build
|
|
|
|
rm -fr $(SRCDIR)/android/source/assets
|
|
|
|
rm -fr $(SRCDIR)/android/source/assets_fullUI
|
|
|
|
rm -fr $(SRCDIR)/android/source/assets_strippedUI
|
android: Remove generated resources in "clean" make targets
Since these are produced by the build, they should also
be removed in the "clean" target.
Without this, Jenkins CI builds for the upcoming
Change-Id: Iddbe432519ab3040c83c0e977a584b51d3ef1e5b
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Dec 8 14:57:14 2023 +0100
android: Make the build fail on new lint warnings
were seen failing, despite the example file no longer being
part of the generated resources since
commit 1d7b1e2d4099aac15e695696e6a0640d6e01e23f
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Nov 15 13:16:26 2023 +0100
android: Drop "More Info" item in "About" dialog
, but apparently the file was still lingering around
from previous builds.
Build failure/Lint error from CI build [1]:
> Task :lintReportStrippedUIEditingDebug
Wrote HTML report to file:///home/tdf/lode/jenkins/workspace/android_arm/android/source/build/reports/lint-results-strippedUIEditingDebug.html
> Task :lintStrippedUIEditingDebug FAILED
/home/tdf/lode/jenkins/workspace/android_arm/android/source/lint-baseline.xml: Information: 237 errors and 11 warnings were filtered out because they are listed in the baseline file, lint-baseline.xml
[LintBaseline]
/home/tdf/lode/jenkins/workspace/android_arm/android/source/res_generated/raw/example.odt: Error: The resource R.raw.example appears to be unused [UnusedResources]
Explanation for issues of type "UnusedResources":
Unused resources make applications larger and slow down builds.
The unused resource check can ignore tests. If you want to include
resources that are only referenced from tests, consider packaging them in a
test source set instead.
You can include test sources in the unused resource check by setting the
system property lint.unused-resources.include-tests =true, and to exclude
them (usually for performance reasons), use
lint.unused-resources.exclude-tests =true.
,
1 errors, 0 warnings (237 errors, 11 warnings filtered by baseline lint-baseline.xml)
FAILURE: Build failed with an exception.
This could also be reproduced locally:
After a
$ touch android/source/res_generated/example.odt
, the above error would on build, and neither `make clean`
nor `make android.clean` would remove the file and thus
fix the problem for subsequent builds.
Add removing the directory to the top-level and Android-specific
clean targets, so either of these commands now takes care of this.
[1] https://ci.libreoffice.org/job/gerrit_android_arm/33845/console
Change-Id: I91c83ce4ddb236d87d7c51f4dcce85e99aae0107
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160612
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2023-12-12 05:02:04 -06:00
|
|
|
rm -fr $(SRCDIR)/android/source/res_generated
|
2017-11-30 06:52:40 -06:00
|
|
|
endif
|
2012-12-23 12:27:28 -06:00
|
|
|
endif
|
|
|
|
|
|
|
|
include $(SRCDIR)/compilerplugins/Makefile.mk
|
|
|
|
|
|
|
|
#
|
|
|
|
# Distclean
|
|
|
|
#
|
2022-10-20 06:15:32 -05:00
|
|
|
distclean : clean compilerplugins-clean mac-app-store-package.clean
|
2012-12-23 12:27:28 -06:00
|
|
|
rm -fr \
|
|
|
|
$(BUILDDIR)/Makefile \
|
|
|
|
$(BUILDDIR)/aclocal.m4 \
|
|
|
|
$(BUILDDIR)/autom4te.cache \
|
2016-06-30 04:23:22 -05:00
|
|
|
$(BUILDDIR)/bin/bffvalidator.sh \
|
2016-09-05 05:10:36 -05:00
|
|
|
$(BUILDDIR)/bin/odfvalidator.sh \
|
|
|
|
$(BUILDDIR)/bin/officeotron.sh \
|
2013-12-17 07:06:42 -06:00
|
|
|
$(BUILDDIR)/config.Build.log \
|
2021-06-01 02:11:40 -05:00
|
|
|
$(BUILDDIR)/config.Build.warn \
|
2021-06-01 01:06:05 -05:00
|
|
|
$(BUILDDIR)/config.log \
|
2012-12-23 12:27:28 -06:00
|
|
|
$(BUILDDIR)/config.status \
|
2021-06-01 02:11:40 -05:00
|
|
|
$(BUILDDIR)/config.warn \
|
2012-12-23 12:27:28 -06:00
|
|
|
$(BUILDDIR)/config_build.mk \
|
2016-01-22 10:47:43 -06:00
|
|
|
$(BUILDDIR)/config_build_lang.mk \
|
2018-11-28 06:07:03 -06:00
|
|
|
$(BUILDDIR)/config_build \
|
2012-12-23 12:27:28 -06:00
|
|
|
$(BUILDDIR)/config_host.mk \
|
|
|
|
$(BUILDDIR)/config_host.mk.stamp \
|
2015-03-26 03:19:01 -05:00
|
|
|
$(BUILDDIR)/config_host_lang.mk \
|
|
|
|
$(BUILDDIR)/config_host_lang.mk.stamp \
|
2013-02-04 01:39:08 -06:00
|
|
|
$(BUILDDIR)/config_host/*.h \
|
2012-12-23 12:27:28 -06:00
|
|
|
$(BUILDDIR)/configure \
|
2020-05-04 10:31:12 -05:00
|
|
|
$(BUILDDIR)/hardened_runtime.xcent \
|
2013-01-14 04:05:50 -06:00
|
|
|
$(BUILDDIR)/instsetoo_native/util/openoffice.lst \
|
2021-12-02 16:11:52 -06:00
|
|
|
$(BUILDDIR)/solenv/lockfile/autoconf.h \
|
2022-06-29 06:17:14 -05:00
|
|
|
$(BUILDDIR)/lo.xcent \
|
2020-12-16 04:30:33 -06:00
|
|
|
$(BUILDDIR)/sysui/desktop/macosx/Info.plist \
|
2021-12-15 07:21:36 -06:00
|
|
|
$(BUILDDIR)/vs-code*.code-workspace*
|
2022-02-09 05:59:34 -06:00
|
|
|
$(if $(filter WNT,$(OS)),env -i PATH="$$PATH") $(FIND) $(SRCDIR)/solenv/gdb -name \*.pyc -exec rm -f {} \;
|
2012-12-23 12:27:28 -06:00
|
|
|
|
|
|
|
#
|
|
|
|
# custom command
|
|
|
|
#
|
|
|
|
cmd:
|
2021-11-08 14:29:05 -06:00
|
|
|
$(if $(verbose),echo "custom cmd" &&) ( $(cmd) )
|
2012-12-23 12:27:28 -06:00
|
|
|
|
|
|
|
#
|
|
|
|
# Fetch
|
|
|
|
#
|
2014-03-10 17:42:26 -05:00
|
|
|
ifneq ($(DO_FETCH_TARBALLS),)
|
2012-12-23 12:27:28 -06:00
|
|
|
include $(SRCDIR)/Makefile.fetch
|
|
|
|
fetch: download
|
|
|
|
fetch: get-submodules
|
|
|
|
|
|
|
|
ifneq (,$(wildcard $(SRCDIR)/.git))
|
|
|
|
get-submodules:
|
2018-03-27 09:38:07 -05:00
|
|
|
ifneq ($(foreach i,$(GIT_NEEDED_SUBMODULES),$(SRCDIR)/$(i)/.git),$(wildcard $(foreach i,$(GIT_NEEDED_SUBMODULES),$(SRCDIR)/$(i)/.git)))
|
2012-12-23 12:27:28 -06:00
|
|
|
cd $(SRCDIR) && ./g -f clone
|
|
|
|
endif
|
2018-03-11 06:27:43 -05:00
|
|
|
ifeq ($(shell test -d $(SRCDIR)/.git; echo $$?),0)
|
2016-01-04 05:22:58 -06:00
|
|
|
@cd $(SRCDIR) && ./g -z # make sure the git hooks are in place even if no submodules are needed
|
2018-03-11 06:27:43 -05:00
|
|
|
endif
|
2012-12-23 12:27:28 -06:00
|
|
|
|
|
|
|
else # these sources are from a tarball, so get the other source tarballs
|
|
|
|
gb_LO_VER := $(shell . $(SRCDIR)/sources.ver && echo $$lo_sources_ver)
|
|
|
|
$(if $(gb_LO_VER),,$(error Error while retrieving $$lo_sources_ver from $(SRCDIR)/sources.ver))
|
|
|
|
|
|
|
|
get-submodules: | download
|
|
|
|
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))))
|
|
|
|
$(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),\
|
2022-10-29 13:24:33 -05:00
|
|
|
$(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))
|
2012-12-23 12:27:28 -06:00
|
|
|
$(SRCDIR)/bin/unpack-sources $(SRCDIR) $(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),\
|
|
|
|
$(TARFILE_LOCATION)/libreoffice-$(i)-$(gb_LO_VER).tar.xz)
|
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
else
|
|
|
|
fetch:
|
|
|
|
@echo "Automatic fetching of external tarballs is disabled."
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
2016-06-23 07:34:15 -05:00
|
|
|
# Bootstrap
|
2012-12-23 12:27:28 -06:00
|
|
|
#
|
2017-02-22 08:01:12 -06:00
|
|
|
bootstrap: check-if-root compilerplugins
|
2012-12-23 12:27:28 -06:00
|
|
|
|
|
|
|
#
|
|
|
|
# Build
|
|
|
|
#
|
2013-11-19 07:25:45 -06:00
|
|
|
# Note: this will pipe through all gbuild targets to ... gbuild
|
2020-03-02 04:45:24 -06:00
|
|
|
# with some translations like "check"->"unitcheck subsequentcheck uicheck" for historic reasons
|
2013-10-03 11:49:25 -05:00
|
|
|
#
|
2021-05-20 08:51:21 -05:00
|
|
|
build: bootstrap fetch $(if $(CROSS_COMPILING),cross-toolset,install-gdb-printers) \
|
|
|
|
$(if $(filter check,$(MAKECMDGOALS)),$(if $(COMPILER_PLUGINS),$(if $(LODE_HOME),clang-format-check)))
|
2024-04-26 07:49:59 -05:00
|
|
|
$(KEEP_AWAKE_CMD) $(MAKE) $(PARALLELISM_OPTION) $(IWYU_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(build_goal)
|
2018-10-31 13:06:30 -05:00
|
|
|
ifeq ($(OS),iOS)
|
2024-04-26 07:49:59 -05:00
|
|
|
$(KEEP_AWAKE_CMD) $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) ios
|
2013-04-19 01:27:44 -05:00
|
|
|
endif
|
2012-12-23 12:27:28 -06:00
|
|
|
|
2022-09-11 05:21:22 -05:00
|
|
|
build-non-l10n-only build-l10n-only check debugrun translations packageinfo coverage $(gb_Top_MODULE_CHECK_TARGETS): build
|
2014-09-08 13:52:03 -05:00
|
|
|
|
2022-12-15 11:38:35 -06:00
|
|
|
help showmodules gbuildtojson pocheck:
|
2014-09-08 13:52:03 -05:00
|
|
|
$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
|
2013-11-12 19:12:48 -06:00
|
|
|
|
2021-05-20 08:51:21 -05:00
|
|
|
cross-toolset: bootstrap fetch install-gdb-printers
|
2019-09-20 08:45:46 -05:00
|
|
|
# fetch again in case there are externals only needed on build platform
|
2018-10-31 13:06:30 -05:00
|
|
|
ifneq ($(OS),iOS)
|
2017-05-28 07:25:54 -05:00
|
|
|
$(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(BUILDDIR)/Makefile fetch
|
2017-05-24 00:38:58 -05:00
|
|
|
endif
|
2020-07-17 15:14:39 -05:00
|
|
|
$(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild build-tools
|
2012-12-23 12:27:28 -06:00
|
|
|
|
2017-09-07 10:01:43 -05:00
|
|
|
install-gdb-printers:
|
2018-10-31 13:06:30 -05:00
|
|
|
ifneq ($(filter-out WNT MACOSX iOS,$(OS)),)
|
2021-05-20 08:51:21 -05:00
|
|
|
ifneq ($(INSTDIR_FOR_BUILD),$(INSTDIR))
|
|
|
|
mkdir -p $(INSTDIR_FOR_BUILD)
|
|
|
|
$(SRCDIR)/solenv/bin/install-gdb-printers -a $(INSTDIR_FOR_BUILD) -c
|
|
|
|
endif
|
2017-09-07 10:01:43 -05:00
|
|
|
mkdir -p $(INSTDIR)
|
|
|
|
$(SRCDIR)/solenv/bin/install-gdb-printers -a $(INSTDIR) -c
|
|
|
|
endif
|
|
|
|
|
2013-08-16 03:06:51 -05:00
|
|
|
|
2012-12-23 12:27:28 -06:00
|
|
|
#
|
|
|
|
# Install
|
|
|
|
#
|
|
|
|
|
2013-11-20 12:36:03 -06:00
|
|
|
define gb_Top_DoInstall
|
|
|
|
echo "$(1) in $(INSTALLDIR) ..." && \
|
2022-12-15 09:26:11 -06:00
|
|
|
WITH_LANG_LIST="$(WITH_LANG_LIST)" $(SRCDIR)/solenv/bin/ooinstall $(2) "$(INSTALLDIR)"
|
2013-11-20 12:36:03 -06:00
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
ifneq ($(OS),MACOSX)
|
|
|
|
define gb_Top_InstallFinished
|
|
|
|
echo && echo "If you want to edit the .ui files with glade first execute:" && \
|
|
|
|
echo && echo "export GLADE_CATALOG_SEARCH_PATH=$(2)/share/glade" && \
|
|
|
|
echo && echo "$(1) finished, you can now execute:" && \
|
|
|
|
echo "$(2)/program/soffice"
|
|
|
|
|
|
|
|
endef
|
|
|
|
else
|
|
|
|
define gb_Top_InstallFinished
|
|
|
|
echo && echo "$(1) finished, you can now run: " && \
|
|
|
|
echo "open $(2)/$(PRODUCTNAME).app" && \
|
|
|
|
echo "" && \
|
|
|
|
echo "To debug: gdb $(2)/$(PRODUCTNAME).app/Contents/MacOS/soffice"
|
|
|
|
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(OS),MACOSX)
|
2012-12-23 12:27:28 -06:00
|
|
|
install:
|
2013-11-20 12:36:03 -06:00
|
|
|
@$(call gb_Top_DoInstall,Installing,)
|
|
|
|
@$(call gb_Top_InstallFinished,Installation,$(INSTALLDIR))
|
2012-12-23 12:27:28 -06:00
|
|
|
|
|
|
|
install-strip:
|
2013-11-20 12:36:03 -06:00
|
|
|
@$(call gb_Top_DoInstall,Installing and stripping binaries,--strip)
|
|
|
|
@$(call gb_Top_InstallFinished,Installation,$(INSTALLDIR))
|
2013-08-16 03:06:51 -05:00
|
|
|
endif # !MACOSX
|
|
|
|
|
2013-10-01 08:08:15 -05:00
|
|
|
test-install: build
|
2013-10-01 08:30:08 -05:00
|
|
|
@rm -rf $(TESTINSTALLDIR)
|
2013-10-01 10:39:52 -05:00
|
|
|
@mkdir -p $(TESTINSTALLDIR)
|
2012-12-23 12:27:28 -06:00
|
|
|
ifeq ($(OS_FOR_BUILD),WNT)
|
2014-03-23 11:46:23 -05:00
|
|
|
cd $(SRCDIR)/instsetoo_native && $(MAKE) LIBO_TEST_INSTALL=TRUE $(GMAKE_OPTIONS)
|
2012-12-23 12:27:28 -06:00
|
|
|
else
|
2022-12-15 09:26:11 -06:00
|
|
|
@WITH_LANG_LIST="$(WITH_LANG_LIST)" $(SRCDIR)/solenv/bin/ooinstall $(TESTINSTALLDIR)
|
2021-08-02 14:02:15 -05:00
|
|
|
ifeq ($(OS),MACOSX)
|
2015-05-11 15:26:29 -05:00
|
|
|
#
|
2018-11-27 04:40:49 -06:00
|
|
|
# Create Resources/*.lproj directories for languages supported by macOS
|
2015-05-11 15:26:29 -05:00
|
|
|
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 \
|
2016-08-04 01:17:20 -05:00
|
|
|
lproj=$(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/Resources/$$lang.lproj; \
|
|
|
|
mkdir "$$lproj"; \
|
2014-09-19 04:47:02 -05:00
|
|
|
done
|
2015-05-11 15:26:29 -05:00
|
|
|
#
|
2014-09-19 17:01:09 -05:00
|
|
|
# Remove unnecessary executables in the LibreOfficePython framework
|
2016-08-04 01:17:20 -05:00
|
|
|
rm -rf $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/bin
|
2014-09-19 17:01:09 -05:00
|
|
|
#
|
|
|
|
# Remove the python.o object file which is weird and interferes with app store uploading
|
|
|
|
# And with it removed, presumably the other stuff in the Python lib/python3.3/config-3.3m probably does not make sense either.
|
2016-08-04 01:17:20 -05:00
|
|
|
rm -rf $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/lib/python[1-9]*/config-[1-9]*
|
2014-09-19 17:01:09 -05:00
|
|
|
#
|
2017-05-10 08:21:02 -05:00
|
|
|
ifneq ($(ENABLE_MACOSX_SANDBOX),)
|
2017-11-14 10:54:27 -06:00
|
|
|
|
|
|
|
# Remove the gengal binary that we hardly need and the shell scripts
|
|
|
|
# for which code signatures (stored as extended attributes) won't
|
2017-11-15 08:26:16 -06:00
|
|
|
# survive upload to the App Store anyway. See
|
2017-11-14 10:54:27 -06:00
|
|
|
# https://developer.apple.com/library/content/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-TNTAG201
|
|
|
|
# We could put the shell scripts somewhere in Resources instead, but
|
|
|
|
# no 3rd-party code that would be interested in them would look there
|
|
|
|
# anyway.
|
2016-08-04 01:17:20 -05:00
|
|
|
rm $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/gengal
|
|
|
|
rm $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/unopkg
|
2017-11-14 09:13:48 -06:00
|
|
|
rm $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/MacOS/unoinfo
|
2014-09-19 17:01:09 -05:00
|
|
|
endif
|
2022-06-29 06:35:01 -05:00
|
|
|
ifneq ($(MACOSX_PROVISIONING_PROFILE),)
|
|
|
|
cp "$(MACOSX_PROVISIONING_PROFILE)" $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app/Contents/embedded.provisionprofile
|
|
|
|
endif
|
2020-11-19 14:04:21 -06:00
|
|
|
ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
|
2014-09-19 17:01:09 -05:00
|
|
|
# Then use the macosx-codesign-app-bundle script
|
2016-08-04 01:17:20 -05:00
|
|
|
@$(SRCDIR)/solenv/bin/macosx-codesign-app-bundle $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app
|
2013-01-31 15:22:35 -06:00
|
|
|
endif
|
2021-08-02 14:02:15 -05:00
|
|
|
endif
|
2012-12-23 12:27:28 -06:00
|
|
|
endif
|
2013-11-20 12:36:03 -06:00
|
|
|
@$(call gb_Top_InstallFinished,Test Installation,$(TESTINSTALLDIR))
|
2012-12-23 12:27:28 -06:00
|
|
|
|
2022-10-20 06:15:32 -05:00
|
|
|
# target to bypass the packaging steps/to only assemble the package
|
|
|
|
mac-app-store-package.prepare: $(BUILDDIR)/$(PLATFORMID)/done
|
|
|
|
|
|
|
|
# shorthand target to build a complete package for the currently building architecture
|
|
|
|
mac-app-store-package: mac-app-store-package.$(PLATFORMID)
|
|
|
|
|
|
|
|
# recipe/targets to do the actual packaging
|
2022-10-24 02:48:39 -05:00
|
|
|
# the symbolication switch to productbuild unfortunately is undocumented, but that is what XCode
|
2022-10-20 06:15:32 -05:00
|
|
|
# uses when it creates a package with symbols for uploading to the appstore
|
|
|
|
mac-app-store-package.$(PLATFORMID) mac-app-store-package.universal: mac-app-store-package.%: $(BUILDDIR)/%/done
|
2014-06-06 10:51:48 -05:00
|
|
|
ifneq ($(MACOSX_PACKAGE_SIGNING_IDENTITY),)
|
2022-10-20 06:15:32 -05:00
|
|
|
$(SRCDIR)/solenv/bin/macosx-codesign-app-bundle $*/"$(PRODUCTNAME)".app
|
|
|
|
productbuild $(if $(ENABLE_SYMBOLS_FOR),--symbolication $*/Symbols) --component $*/"$(PRODUCTNAME)".app /Applications --sign $(MACOSX_PACKAGE_SIGNING_IDENTITY) $(PRODUCTNAME_WITHOUT_SPACES).pkg
|
2014-06-06 10:51:48 -05:00
|
|
|
else
|
|
|
|
@echo You did not provide an installer signing identity with --enable-macosx-package-signing
|
|
|
|
@exit 1
|
|
|
|
endif
|
|
|
|
|
2022-10-24 02:49:01 -05:00
|
|
|
# the builds need to persist a standard "make clean" to be able to combine them into a universal
|
2022-10-20 06:15:32 -05:00
|
|
|
# binary, so provide an additional target that can be used standalone or via make distclean
|
|
|
|
mac-app-store-package.clean:
|
|
|
|
rm -rf \
|
|
|
|
$(BUILDDIR)/macosx_x86_64 \
|
|
|
|
$(BUILDDIR)/macosx_aarch64 \
|
|
|
|
$(BUILDDIR)/universal \
|
|
|
|
$(BUILDDIR)/$(PRODUCTNAME_WITHOUT_SPACES).pkg
|
|
|
|
|
|
|
|
# used by the mac-app-store targets
|
|
|
|
$(BUILDDIR)/$(PLATFORMID)/done: test-install
|
|
|
|
rm -rf $(PLATFORMID)
|
|
|
|
mkdir -p $(PLATFORMID)/Symbols
|
|
|
|
mv $(TESTINSTALLDIR)/$(PRODUCTNAME_WITHOUT_SPACES).app $(PLATFORMID)/"$(PRODUCTNAME)".app
|
|
|
|
ifneq ($(ENABLE_SYMBOLS_FOR),)
|
2024-12-01 10:00:51 -06:00
|
|
|
symbols -arch all -symbolsPackageDir $(PLATFORMID)/Symbols $(PLATFORMID)/"$(PRODUCTNAME)".app/Contents/Frameworks/[^Li]* $(PLATFORMID)/"$(PRODUCTNAME)".app/Contents/Frameworks/intl/l* $(PLATFORMID)/"$(PRODUCTNAME)".app/Contents/MacOS/*
|
|
|
|
strip -S $(PLATFORMID)/"$(PRODUCTNAME)".app/Contents/Frameworks/[^Li]* $(PLATFORMID)/"$(PRODUCTNAME)".app/Contents/Frameworks/intl/l* $(PLATFORMID)/"$(PRODUCTNAME)".app/Contents/MacOS/*
|
2022-10-20 06:15:32 -05:00
|
|
|
endif
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
# build one arch using the mac-app-store-package.prepare target, make clean and change the autogen.input
|
2022-10-24 02:48:39 -05:00
|
|
|
# to build for the other target, then use mac-app-store-package.universal to build for the other arch and
|
2022-10-20 06:15:32 -05:00
|
|
|
# combine the two into a universal binary
|
|
|
|
$(BUILDDIR)/universal/done: $(BUILDDIR)/macosx_x86_64/done $(BUILDDIR)/macosx_aarch64/done
|
|
|
|
rm -rf universal
|
|
|
|
mkdir -p universal/Symbols
|
|
|
|
ifneq ($(ENABLE_SYMBOLS_FOR),)
|
|
|
|
cp -a macosx_x86_64/Symbols/* macosx_aarch64/Symbols/* universal/Symbols/
|
|
|
|
endif
|
|
|
|
$(SRCDIR)/bin/merge-app-bundles macosx_x86_64/"$(PRODUCTNAME)".app macosx_aarch64/"$(PRODUCTNAME)".app universal/"$(PRODUCTNAME)".app
|
|
|
|
touch $@
|
|
|
|
|
2012-12-23 12:27:28 -06:00
|
|
|
distro-pack-install: install
|
2022-12-15 09:26:11 -06:00
|
|
|
WITH_LANG_LIST="$(WITH_LANG_LIST)" WITH_POOR_HELP_LOCALIZATIONS="$(WITH_POOR_HELP_LOCALIZATIONS)" $(SRCDIR)/bin/distro-install-clean-up
|
2018-01-08 03:40:32 -06:00
|
|
|
$(SRCDIR)/bin/distro-install-desktop-integration
|
|
|
|
$(SRCDIR)/bin/distro-install-sdk
|
2022-12-15 09:26:11 -06:00
|
|
|
WITH_LANG_LIST="$(WITH_LANG_LIST)" $(SRCDIR)/bin/distro-install-file-lists
|
2012-12-23 12:27:28 -06:00
|
|
|
|
2013-12-07 20:39:37 -06:00
|
|
|
install-package-%:
|
2014-03-23 11:46:23 -05:00
|
|
|
$(MAKE) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
|
2013-12-07 20:39:37 -06:00
|
|
|
|
2012-12-23 12:27:28 -06:00
|
|
|
id:
|
2014-11-21 04:45:16 -06:00
|
|
|
@$(SRCDIR)/solenv/bin/create-ids
|
2012-12-23 12:27:28 -06:00
|
|
|
|
|
|
|
tags:
|
2014-11-21 04:45:16 -06:00
|
|
|
@$(SRCDIR)/solenv/bin/create-tags
|
2012-12-23 12:27:28 -06:00
|
|
|
|
2014-11-07 06:14:50 -06:00
|
|
|
etags:
|
2014-11-21 04:45:16 -06:00
|
|
|
@$(SRCDIR)/solenv/bin/create-tags -e
|
2014-11-07 06:14:50 -06:00
|
|
|
|
2012-12-23 12:27:28 -06:00
|
|
|
docs:
|
2014-11-21 04:45:16 -06:00
|
|
|
@$(SRCDIR)/solenv/bin/mkdocs.sh $(SRCDIR)/docs $(SRCDIR)/solenv/inc/doxygen.cfg
|
2012-12-23 12:27:28 -06:00
|
|
|
|
2013-10-15 03:18:29 -05:00
|
|
|
findunusedheaders:
|
2017-06-10 14:24:32 -05:00
|
|
|
$(SRCDIR)/bin/find-unusedheaders.py
|
2013-10-15 03:18:29 -05:00
|
|
|
|
2016-05-23 15:57:56 -05:00
|
|
|
symbols:
|
2016-05-23 17:33:10 -05:00
|
|
|
rm -fr $(WORKDIR)/symbols/
|
2016-05-23 15:57:56 -05:00
|
|
|
mkdir -p $(WORKDIR)/symbols/
|
2016-05-24 02:12:41 -05:00
|
|
|
ifeq ($(OS),WNT)
|
2021-06-17 07:46:03 -05:00
|
|
|
$(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/windows/dump_syms/Release/dump_syms.exe $(WORKDIR)/symbols/ $(INSTDIR)/program/
|
2017-01-15 04:50:27 -06:00
|
|
|
$(SRCDIR)/bin/symstore.sh
|
2016-05-24 02:12:41 -05:00
|
|
|
else
|
2016-05-23 15:57:56 -05:00
|
|
|
$(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/linux/dump_syms/dump_syms $(WORKDIR)/symbols/ $(INSTDIR)/program/*
|
2016-05-24 02:12:41 -05:00
|
|
|
endif
|
|
|
|
|
2016-05-23 17:33:32 -05:00
|
|
|
cd $(WORKDIR)/symbols/ && zip -r $(WORKDIR)/symbols.zip *
|
2012-12-23 12:27:28 -06:00
|
|
|
|
2016-08-19 07:34:46 -05:00
|
|
|
create-mar:
|
|
|
|
rm -fr $(WORKDIR)/installation/mar/
|
|
|
|
rm -fr $(WORKDIR)/installation/temp/
|
|
|
|
mkdir -p $(WORKDIR)/installation/temp/
|
|
|
|
mkdir -p $(WORKDIR)/installation/mar/
|
|
|
|
tar -xzf $(WORKDIR)/installation/LibreOfficeDev/archive/install/en-US/LibreOffice* -C $(WORKDIR)/installation/temp/
|
|
|
|
$(SRCDIR)/bin/update/make_full_update.sh $(WORKDIR)/installation/mar/test.mar $(WORKDIR)/installation/temp/*/
|
|
|
|
|
2016-05-23 21:27:18 -05:00
|
|
|
upload-symbols:
|
|
|
|
$(MAKE) -f $(SRCDIR)/Makefile.gbuild upload-symbols
|
|
|
|
|
2016-08-27 19:23:37 -05:00
|
|
|
create-update-info:
|
|
|
|
$(MAKE) -f $(SRCDIR)/Makefile.gbuild create-update-info
|
|
|
|
|
2017-04-25 19:43:25 -05:00
|
|
|
create-partial-info:
|
|
|
|
$(MAKE) -f $(SRCDIR)/Makefile.gbuild create-partial-info
|
|
|
|
|
2013-03-04 12:01:19 -06:00
|
|
|
dump-deps:
|
2021-12-13 05:05:33 -06:00
|
|
|
@$(SRCDIR)/bin/module-deps.pl $(if $(verbose),-v) $(MAKE) $(SRCDIR)/Makefile.gbuild
|
2013-03-04 12:01:19 -06:00
|
|
|
|
2013-03-09 09:08:47 -06:00
|
|
|
dump-deps-png:
|
2021-12-13 05:05:33 -06:00
|
|
|
@$(SRCDIR)/bin/module-deps.pl $(if $(verbose),-v) $(MAKE) $(SRCDIR)/Makefile.gbuild | dot -Tpng -o lo.png
|
2013-03-09 09:08:47 -06:00
|
|
|
|
2014-02-17 11:03:44 -06:00
|
|
|
dump-deps-sort:
|
2021-12-13 05:05:33 -06:00
|
|
|
@$(SRCDIR)/bin/module-deps.pl -t $(if $(verbose),-v) $(MAKE) $(SRCDIR)/Makefile.gbuild
|
2014-02-17 11:03:44 -06:00
|
|
|
|
clang-format: enforce coding style via Jenkins
- factor out common code to a shared module, and quote path to the
clang-format binary, just in case.
- add a new check-last-commit script that is the CI equivalent of the
exiting git pre-commit hook, but this one handles lack of clang-format
as an error, not as a warning.
- $LODE_HOME/opt/bin is supposed to be in PATH already, so not
mentioning LODE_HOME in ClangFormat::find() explicitly.
- if both COMPILER_PLUGINS and LODE_HOME is set, invoke
solenv/clang-format/check-last-commit as part of 'make check'
To test these changes as part of CI, fix a single style violation in an
already committed, non-blacklisted file.
This depends on the lode.git commit
496123bcae28e06c6d6aeda39a5afd1e1fb1fd98 (utils_Linux: install
clang-format in the Jenkins case, 2017-11-16), otherwise erroring out on
a not installed clang-format as part of the build would be a problem.
Change-Id: Ib3110826194ff78a7f1bed1c3796147e92ccb3ba
Reviewed-on: https://gerrit.libreoffice.org/44939
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-20 02:04:51 -06:00
|
|
|
clang-format-check:
|
|
|
|
@$(SRCDIR)/solenv/clang-format/check-last-commit
|
|
|
|
|
2013-11-20 12:21:34 -06:00
|
|
|
define gb_Top_GbuildToIdeIntegration
|
2022-04-23 04:45:28 -05:00
|
|
|
$(1)-ide-integration: gbuildtojson $(if $(filter MACOSX,$(OS_FOR_BUILD)),python3.allbuild)
|
2016-12-15 07:11:05 -06:00
|
|
|
cd $(SRCDIR) && \
|
|
|
|
$(if $(filter MACOSX,$(OS_FOR_BUILD)),PATH="$(INSTROOT_FOR_BUILD)/Frameworks/LibreOfficePython.framework/Versions/Current/bin:$(PATH)") \
|
2024-05-05 11:43:53 -05:00
|
|
|
$(if $(filter WNT,$(OS_FOR_BUILD)$(PYTHON_FOR_BUILD)),$(INSTROOT_FOR_BUILD)/program/python.exe) \
|
2022-02-14 12:19:41 -06:00
|
|
|
bin/gbuild-to-ide --ide $(1) --make $(MAKE)
|
2013-11-15 11:39:46 -06:00
|
|
|
|
|
|
|
endef
|
|
|
|
|
2017-01-30 10:29:08 -06:00
|
|
|
$(foreach ide,\
|
|
|
|
codelite \
|
2021-10-08 02:56:51 -05:00
|
|
|
vs \
|
2017-01-30 10:29:08 -06:00
|
|
|
kdevelop \
|
2014-08-07 15:11:50 -05:00
|
|
|
vim \
|
2015-11-27 12:28:10 -06:00
|
|
|
qtcreator \
|
2017-11-18 09:33:08 -06:00
|
|
|
xcode \
|
|
|
|
eclipsecdt,\
|
2017-11-18 09:07:12 -06:00
|
|
|
$(eval $(call gb_Top_GbuildToIdeIntegration,$(ide))))
|
2013-11-15 11:39:46 -06:00
|
|
|
|
2021-12-15 07:21:36 -06:00
|
|
|
# vscode integration is based on compile_commands.json, which is generated by vim-ide-integration
|
|
|
|
# the workspace template created by configure doesn't provide advanced/fine grained targets but
|
|
|
|
# rather supplies some useful settings and basic examples for run/debug configurations
|
|
|
|
# this target is provided primarily for consistency with the other ide-integrations
|
|
|
|
vscode-ide-integration: $(BUILDDIR)/vs-code.code-workspace vim-ide-integration
|
|
|
|
|
2022-10-15 02:42:52 -05:00
|
|
|
# ToDo: there probably is a way to have it at least create the compile-commands.json file
|
2022-10-12 04:25:35 -05:00
|
|
|
# for the vim/vs-code integration without building the registry stuff
|
2023-04-05 05:41:21 -05:00
|
|
|
Rdb:| fetch
|
2022-10-12 04:25:35 -05:00
|
|
|
gbuildtojson: Rdb
|
|
|
|
|
2021-12-15 07:21:36 -06:00
|
|
|
$(BUILDDIR)/vs-code.code-workspace: $(BUILDDIR)/vs-code.code-workspace.template
|
|
|
|
@test -e $@ || cp $< $@ && \
|
|
|
|
cmp -s $@ $< || echo "ATTN: $(@F) differs from $(<F), please check yourself for changes"
|
|
|
|
|
2012-12-23 12:27:28 -06:00
|
|
|
endif # MAKE_RESTARTS
|
|
|
|
|
|
|
|
# vim: set noet sw=4 ts=4:
|