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
|
|
|
|
2014-09-05 05:43:34 -05:00
|
|
|
gb_Top_MODULE_CHECK_TARGETS := slowcheck unitcheck subsequentcheck perfcheck
|
|
|
|
|
2016-04-14 01:01:48 -05:00
|
|
|
.PHONY : all 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 findunusedcode get-submodules id install install-strip tags debugrun help showmodules translations packageinfo internal.clean $(gb_Top_MODULE_CHECK_TARGETS)
|
2012-12-23 12:27:28 -06:00
|
|
|
|
2013-11-20 17:34:20 -06:00
|
|
|
MAKECMDGOALS?=all
|
2014-02-08 22:08:33 -06:00
|
|
|
build_goal:=$(if $(filter build check,$(MAKECMDGOALS)),all)\
|
|
|
|
$(if $(filter build-nocheck,$(MAKECMDGOALS)),build)\
|
|
|
|
$(if $(filter check,$(MAKECMDGOALS)),subsequentcheck)\
|
2014-09-08 13:52:03 -05:00
|
|
|
$(filter all build-l10n-only build-non-l10n-only debugrun help showmodules translations $(gb_Top_MODULE_CHECK_TARGETS) check packageinfo,$(MAKECMDGOALS))
|
2012-01-26 16:29:26 -06:00
|
|
|
|
2012-12-23 12:27:28 -06:00
|
|
|
SRCDIR := @SRC_ROOT@
|
|
|
|
BUILDDIR := @BUILDDIR@
|
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
|
|
|
|
2012-12-23 12:27:28 -06:00
|
|
|
.PHONY : force-restart
|
2015-03-26 03:19:01 -05:00
|
|
|
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
|
2013-11-20 17:02:18 -06:00
|
|
|
$(BUILDDIR)/config_host.mk : $(wildcard \
|
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 \
|
|
|
|
$(BUILDDIR)/autogen.input \
|
|
|
|
$(BUILDDIR)/autogen.lastrun \
|
2015-03-08 10:58:35 -05:00
|
|
|
$(BUILDDIR)/autogen.sh \
|
2013-11-20 17:02:18 -06:00
|
|
|
)
|
2014-06-01 17:18:08 -05:00
|
|
|
sh -c $(SRCDIR)/autogen.sh
|
2012-01-26 14:26:49 -06:00
|
|
|
|
2012-12-23 12:27:28 -06:00
|
|
|
else # MAKE_RESTARTS
|
|
|
|
|
2016-04-14 01:01:48 -05:00
|
|
|
all: check-if-root build
|
|
|
|
|
|
|
|
check-if-root:
|
|
|
|
@if test `id -u` = 0; then \
|
|
|
|
echo; \
|
|
|
|
echo 'No. You make ME a sandwich.'; \
|
|
|
|
echo; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
2012-12-23 12:27:28 -06:00
|
|
|
|
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),)
|
|
|
|
|
2014-11-17 10:27:03 -06:00
|
|
|
IWYU_OPTION := $(if $(IWYU_PATH),-k CC=$(IWYU_PATH) CXX=$(IWYU_PATH),)
|
2014-11-04 09:26:45 -06:00
|
|
|
|
2014-11-24 08:17:26 -06:00
|
|
|
# don't want to have a dependency to iwyudummy.generate because it's
|
|
|
|
# useful to manually edit the generated StaticLibrary_iwyudummy.mk
|
2014-11-14 11:54:06 -06:00
|
|
|
iwyudummy: bootstrap fetch
|
2014-11-24 08:17:26 -06:00
|
|
|
$(if $(wildcard $(BUILDDIR)/iwyudummy),,$(error first call "make iwyudummy.generate"))
|
2014-11-14 11:54:06 -06:00
|
|
|
cd $(BUILDDIR)/iwyudummy && $(MAKE) $(IWYU_OPTION) $(GMAKE_OPTIONS)
|
|
|
|
|
2014-11-20 01:47:17 -06:00
|
|
|
iwyudummy.generate:
|
|
|
|
$(SRCDIR)/bin/gen-iwyu-dummy-lib
|
|
|
|
|
2013-02-27 11:40:36 -06:00
|
|
|
#
|
|
|
|
# Partial Build
|
|
|
|
#
|
2013-11-20 12:21:34 -06:00
|
|
|
define gb_Top_GbuildModuleRules
|
2014-09-05 05:43:34 -05:00
|
|
|
.PHONY: $(1) $(1).all $(1).build $(1).check $(1).clean $(1).showdeliverables $(foreach target,$(gb_Top_MODULE_CHECK_TARGETS),$(1).$(target))
|
2012-12-23 12:27:28 -06:00
|
|
|
|
|
|
|
$(1): bootstrap fetch
|
2014-11-04 09:26:45 -06:00
|
|
|
cd $(SRCDIR)/$(2) && $$(MAKE) $(IWYU_OPTION) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS)
|
2012-12-23 12:27:28 -06:00
|
|
|
|
2014-09-05 05:43:34 -05:00
|
|
|
$(1).build $(1).check $(1).clean $(1).showdeliverables $(foreach target,$(gb_Top_MODULE_CHECK_TARGETS),$(1).$(target)):
|
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
|
|
|
|
2013-02-26 08:15:22 -06:00
|
|
|
$(1).all: bootstrap fetch
|
2014-11-04 09:26:45 -06:00
|
|
|
$$(MAKE) $(PARALLELISM_OPTION) $(IWYU_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(WORKDIR)/Module/$(1) $(if $(CROSS_COMPILING),,$(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1))
|
2013-02-26 08:15:22 -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 \
|
2013-05-07 05:29:34 -05:00
|
|
|
AllLangPackage \
|
2013-03-02 12:06:22 -06:00
|
|
|
AllLangResTarget \
|
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 \
|
2013-03-02 12:06:22 -06:00
|
|
|
Configuration \
|
|
|
|
CppunitTest \
|
|
|
|
CustomTarget \
|
|
|
|
Dictionary \
|
|
|
|
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 \
|
|
|
|
StaticLibrary \
|
2013-04-06 06:10:54 -05:00
|
|
|
UIConfig \
|
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
|
2014-06-18 06:27:47 -05:00
|
|
|
$(foreach target,$(gbuild_TARGETS),$(target)_% $(foreach module,$(gbuild_modules),$(target)_$(module)/%)) %.genpatch: bootstrap fetch
|
2014-03-23 11:46:23 -05:00
|
|
|
$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
|
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)
|
2012-12-23 12:27:28 -06:00
|
|
|
endif
|
|
|
|
|
|
|
|
include $(SRCDIR)/compilerplugins/Makefile.mk
|
|
|
|
|
|
|
|
#
|
|
|
|
# Distclean
|
|
|
|
#
|
|
|
|
distclean : clean compilerplugins-clean
|
|
|
|
rm -fr \
|
|
|
|
$(BUILDDIR)/Makefile \
|
|
|
|
$(BUILDDIR)/aclocal.m4 \
|
|
|
|
$(BUILDDIR)/autom4te.cache \
|
|
|
|
$(BUILDDIR)/config.log \
|
2013-12-17 07:06:42 -06:00
|
|
|
$(BUILDDIR)/config.Build.log \
|
2012-12-23 12:27:28 -06:00
|
|
|
$(BUILDDIR)/config.status \
|
|
|
|
$(BUILDDIR)/config_build.mk \
|
2016-01-22 10:47:43 -06:00
|
|
|
$(BUILDDIR)/config_build_lang.mk \
|
|
|
|
$(BUILDDIR)/config_build/*.h \
|
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 \
|
2013-01-14 04:05:50 -06:00
|
|
|
$(BUILDDIR)/instsetoo_native/util/openoffice.lst \
|
2013-10-17 16:37:29 -05:00
|
|
|
$(BUILDDIR)/ios/lo.xcconfig \
|
2013-10-02 14:19:01 -05:00
|
|
|
$(BUILDDIR)/lo.xcent \
|
2014-09-17 09:39:10 -05:00
|
|
|
$(BUILDDIR)/sysui/desktop/macosx/Info.plist
|
2016-02-24 04:59:53 -06:00
|
|
|
$(FIND) $(SRCDIR)/solenv/gdb -name \*.pyc -exec rm {} \;
|
2012-12-23 12:27:28 -06:00
|
|
|
|
|
|
|
#
|
|
|
|
# custom command
|
|
|
|
#
|
|
|
|
cmd:
|
|
|
|
echo "custom cmd" && ( $(cmd) )
|
|
|
|
|
|
|
|
#
|
|
|
|
# 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:
|
|
|
|
ifneq ($(foreach i,$(GIT_NEEDED_SUBMODULES),$(i)/.git),$(wildcard $(foreach i,$(GIT_NEEDED_SUBMODULES),$(i)/.git)))
|
|
|
|
cd $(SRCDIR) && ./g -f clone
|
|
|
|
endif
|
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
|
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)),\
|
2014-08-04 12:34:03 -05:00
|
|
|
$(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))
|
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
|
|
|
|
|
|
|
|
#
|
|
|
|
# Bootstap
|
|
|
|
#
|
2013-02-25 04:56:21 -06:00
|
|
|
bootstrap: 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
|
|
|
|
# with some translations like "build"->"all" for historic reasons
|
2013-10-03 11:49:25 -05:00
|
|
|
#
|
2013-11-06 09:36:04 -06:00
|
|
|
build: bootstrap fetch $(if $(CROSS_COMPILING),cross-toolset)
|
2015-02-20 08:52:23 -06:00
|
|
|
ifneq ($(filter-out WNT MACOSX IOS,$(OS)),)
|
2014-11-20 07:30:27 -06:00
|
|
|
mkdir -p $(INSTDIR)
|
|
|
|
$(SRCDIR)/solenv/bin/install-gdb-printers -a $(INSTDIR) -c
|
2013-09-10 04:37:16 -05:00
|
|
|
endif
|
2014-11-04 09:26:45 -06:00
|
|
|
$(MAKE) $(PARALLELISM_OPTION) $(IWYU_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(build_goal)
|
2013-04-19 01:27:44 -05:00
|
|
|
ifeq ($(OS),IOS)
|
2014-03-23 11:46:23 -05:00
|
|
|
$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) ios
|
2013-04-19 01:27:44 -05:00
|
|
|
endif
|
2012-12-23 12:27:28 -06:00
|
|
|
|
2014-09-08 13:52:03 -05:00
|
|
|
build-non-l10n-only build-l10n-only build-nocheck check debugrun translations packageinfo $(gb_Top_MODULE_CHECK_TARGETS): build
|
|
|
|
|
|
|
|
help showmodules:
|
|
|
|
$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
|
2013-11-12 19:12:48 -06:00
|
|
|
|
2012-12-23 12:27:28 -06:00
|
|
|
cross-toolset: bootstrap fetch
|
2014-03-23 11:46:23 -05:00
|
|
|
$(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild build-tools
|
2012-12-23 12:27:28 -06:00
|
|
|
|
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) ..." && \
|
2014-11-21 04:45:16 -06:00
|
|
|
$(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
|
2014-11-21 04:45:16 -06:00
|
|
|
@$(SRCDIR)/solenv/bin/ooinstall $(TESTINSTALLDIR)
|
2013-02-01 06:48:15 -06:00
|
|
|
ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
|
2015-05-11 15:26:29 -05:00
|
|
|
#
|
|
|
|
# Create Resources/*.lproj directories for languages supported by OS X
|
|
|
|
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 \
|
2014-09-19 04:47:02 -05:00
|
|
|
lproj=$(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/Resources/$$lang.lproj; \
|
|
|
|
mkdir $$lproj; \
|
|
|
|
done
|
2015-05-11 15:26:29 -05:00
|
|
|
#
|
2014-09-19 04:47:02 -05:00
|
|
|
# And remove the "bin" folder which should not be there
|
2014-09-15 13:50:35 -05:00
|
|
|
rm -rf $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/bin
|
2014-09-19 17:01:09 -05:00
|
|
|
#
|
|
|
|
# Remove unnecessary executables in the LibreOfficePython framework
|
|
|
|
rm -rf $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/bin
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
rm -rf $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/Frameworks/LibreOfficePython.framework/Versions/[1-9]*/lib/python[1-9]*/config-[1-9]*
|
|
|
|
#
|
|
|
|
ifneq ($ENABLE_MACOSX_SANDBOX),)
|
2015-05-17 04:43:08 -05:00
|
|
|
# Remove the gengal.bin binary and unopkg script that we don't want
|
2014-09-19 17:01:09 -05:00
|
|
|
rm $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/MacOS/gengal.bin
|
2015-05-17 04:43:08 -05:00
|
|
|
rm $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app/Contents/MacOS/unopkg
|
2014-09-19 17:01:09 -05:00
|
|
|
endif
|
|
|
|
#
|
|
|
|
# Then use the macosx-codesign-app-bundle script
|
2014-11-21 04:45:16 -06:00
|
|
|
@$(SRCDIR)/solenv/bin/macosx-codesign-app-bundle $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app
|
2013-01-31 15:22:35 -06: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
|
|
|
|
2014-06-06 10:51:48 -05:00
|
|
|
mac-app-store-package: test-install
|
|
|
|
ifneq ($(MACOSX_PACKAGE_SIGNING_IDENTITY),)
|
2014-09-09 02:35:51 -05:00
|
|
|
rm -rf "$(MACOSX_APP_NAME).app"
|
2014-06-06 10:51:48 -05:00
|
|
|
mv "$(TESTINSTALLDIR)/$(PRODUCTNAME).app" "$(MACOSX_APP_NAME).app"
|
|
|
|
productbuild --component "$(MACOSX_APP_NAME).app" /Applications --sign $(MACOSX_PACKAGE_SIGNING_IDENTITY) $(shell echo "$(MACOSX_APP_NAME)" | tr ' ' '-').pkg
|
|
|
|
else
|
|
|
|
@echo You did not provide an installer signing identity with --enable-macosx-package-signing
|
|
|
|
@exit 1
|
|
|
|
endif
|
|
|
|
|
2012-12-23 12:27:28 -06:00
|
|
|
distro-pack-install: install
|
|
|
|
$(SRCDIR)/bin/distro-install-clean-up
|
|
|
|
$(SRCDIR)/bin/distro-install-desktop-integration
|
|
|
|
$(SRCDIR)/bin/distro-install-sdk
|
|
|
|
$(SRCDIR)/bin/distro-install-file-lists
|
|
|
|
|
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
|
|
|
|
|
|
|
findunusedcode:
|
2014-03-23 11:46:23 -05:00
|
|
|
@$(SRCDIR)/bin/findunusedcode $(SRCDIR) $(MAKE)
|
2012-12-23 12:27:28 -06:00
|
|
|
|
2013-10-15 03:18:29 -05:00
|
|
|
findunusedheaders:
|
|
|
|
$(SRCDIR)/bin/find-unusedheaders.pl
|
|
|
|
|
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/
|
|
|
|
$(SRCDIR)/bin/symbolstore.py $(WORKDIR)/UnpackedTarball/breakpad/src/tools/linux/dump_syms/dump_syms $(WORKDIR)/symbols/ $(INSTDIR)/program/*
|
2016-05-23 17:33:32 -05:00
|
|
|
cd $(WORKDIR)/symbols/ && zip -r $(WORKDIR)/symbols.zip *
|
2012-12-23 12:27:28 -06:00
|
|
|
|
2013-03-04 12:01:19 -06:00
|
|
|
dump-deps:
|
2014-03-23 11:46:23 -05:00
|
|
|
@$(SRCDIR)/bin/module-deps.pl $(MAKE) $(SRCDIR)/Makefile.gbuild
|
2013-03-04 12:01:19 -06:00
|
|
|
|
2013-03-09 09:08:47 -06:00
|
|
|
dump-deps-png:
|
2014-03-23 11:46:23 -05:00
|
|
|
@$(SRCDIR)/bin/module-deps.pl $(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:
|
2014-03-23 11:46:23 -05:00
|
|
|
@$(SRCDIR)/bin/module-deps.pl -t $(MAKE) $(SRCDIR)/Makefile.gbuild
|
2014-02-17 11:03:44 -06:00
|
|
|
|
2013-11-20 12:21:34 -06:00
|
|
|
define gb_Top_GbuildToIdeIntegration
|
2013-11-15 11:39:46 -06:00
|
|
|
$(1)-ide-integration:
|
2014-03-23 11:46:23 -05:00
|
|
|
cd $(SRCDIR) && (LC_MESSAGES=C $(MAKE) cmd="$(MAKE) -npf Makefile.gbuild all" cmd || true) | $(SRCDIR)/bin/gbuild-to-ide --ide $(1)
|
2013-11-15 11:39:46 -06:00
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
$(foreach ide,\
|
2014-08-07 15:11:50 -05:00
|
|
|
debug \
|
2013-11-26 13:39:58 -06:00
|
|
|
kdevelop \
|
2014-02-09 13:58:46 -06:00
|
|
|
vs2012 \
|
2014-09-30 18:44:20 -05:00
|
|
|
vs2013 \
|
2014-08-07 15:11:50 -05:00
|
|
|
vim \
|
2015-05-19 09:30:41 -05:00
|
|
|
xcode \
|
2015-11-27 12:28:10 -06:00
|
|
|
qtcreator \
|
|
|
|
eclipsecdt,\
|
2013-11-20 12:21:34 -06:00
|
|
|
$(eval $(call gb_Top_GbuildToIdeIntegration,$(ide))))
|
2013-11-15 11:39:46 -06:00
|
|
|
|
2012-12-23 12:27:28 -06:00
|
|
|
endif # MAKE_RESTARTS
|
|
|
|
|
|
|
|
# vim: set noet sw=4 ts=4:
|