blob: aec7ea6751ce4aea16e08da2f57296909350378a [file] [log] [blame]
Takeshi Abeb2bd33e2011-08-10 02:12:48 +09001# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
Michael Stahlb0b92d12012-05-15 14:47:37 +02002#
Michael Meeks72e5d0c2013-04-24 17:14:03 +01003# This file is part of the LibreOffice project.
Michael Stahlb0b92d12012-05-15 14:47:37 +02004#
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/.
8#
Norbert Thiebaudc857dff2012-01-24 15:48:30 -06009
Matúš Kukan14443162014-09-05 12:43:34 +020010gb_Top_MODULE_CHECK_TARGETS := slowcheck unitcheck subsequentcheck perfcheck
11
Takeshi Abe775d99c2014-11-07 21:14:50 +090012.PHONY : all 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)
Matúš Kukan0e6212c2012-12-23 19:27:28 +010013
Bjoern Michaelsen4a016d12013-11-21 00:34:20 +010014MAKECMDGOALS?=all
Norbert Thiebaud3047ac52014-02-08 22:08:33 -060015build_goal:=$(if $(filter build check,$(MAKECMDGOALS)),all)\
16 $(if $(filter build-nocheck,$(MAKECMDGOALS)),build)\
17 $(if $(filter check,$(MAKECMDGOALS)),subsequentcheck)\
Peter Foley7abf6862014-09-08 14:52:03 -040018 $(filter all build-l10n-only build-non-l10n-only debugrun help showmodules translations $(gb_Top_MODULE_CHECK_TARGETS) check packageinfo,$(MAKECMDGOALS))
Norbert Thiebaude48d33b2012-01-26 16:29:26 -060019
Matúš Kukan0e6212c2012-12-23 19:27:28 +010020SRCDIR := @SRC_ROOT@
21BUILDDIR := @BUILDDIR@
David Tardon40ae8f32013-05-30 16:12:22 +020022GIT_BUILD := $(if $(wildcard $(SRCDIR)/.git),T)
Norbert Thiebaudc857dff2012-01-24 15:48:30 -060023
David Tardon40ae8f32013-05-30 16:12:22 +020024# 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
Peter Foley7abf6862014-09-08 14:52:03 -040031ifeq (,$(MAKE_RESTARTS)$(if $(GIT_BUILD),,T)$(if $(filter-out help showmodules clean distclean,$(MAKECMDGOALS)),,T))
Norbert Thiebaudc857dff2012-01-24 15:48:30 -060032
Matúš Kukan0e6212c2012-12-23 19:27:28 +010033.PHONY : force-restart
David Tardonc8708f32015-03-26 09:19:01 +010034Makefile: $(BUILDDIR)/config_host.mk $(BUILDDIR)/config_host_lang.mk force-restart
Matúš Kukan0e6212c2012-12-23 19:27:28 +010035 @touch $@
Norbert Thiebaudc857dff2012-01-24 15:48:30 -060036
Michael Stahlb0b92d12012-05-15 14:47:37 +020037# run configure in an environment not polluted by config_host.mk
Matúš Kukan38a22f562013-11-21 00:02:18 +010038$(BUILDDIR)/config_host.mk : $(wildcard \
Michael Stahlb0b92d12012-05-15 14:47:37 +020039 $(SRCDIR)/config_host.mk.in \
David Tardonc8708f32015-03-26 09:19:01 +010040 $(SRCDIR)/config_host_lang.mk.in \
Norbert Thiebaudae4e3272012-12-11 07:49:24 -060041 $(SRCDIR)/Makefile.in \
Michael Stahl2a9ecb82013-01-18 22:11:53 +010042 $(SRCDIR)/instsetoo_native/util/openoffice.lst.in \
Peter Foley39558762012-10-19 16:59:21 -040043 $(SRCDIR)/configure.ac \
Matúš Kukan38a22f562013-11-21 00:02:18 +010044 $(SRCDIR)/config_host/*.h.in \
45 $(BUILDDIR)/autogen.input \
46 $(BUILDDIR)/autogen.lastrun \
Miklos Vajnaaefc43b2015-03-08 16:58:35 +010047 $(BUILDDIR)/autogen.sh \
Matúš Kukan38a22f562013-11-21 00:02:18 +010048 )
Michael Stahlfe8c5f62014-06-02 00:18:08 +020049 sh -c $(SRCDIR)/autogen.sh
Norbert Thiebaud84399902012-01-26 14:26:49 -060050
Matúš Kukan0e6212c2012-12-23 19:27:28 +010051else # MAKE_RESTARTS
52
53all: build
54
Bjoern Michaelsen4a016d12013-11-21 00:34:20 +010055gb_Side ?= host
Matúš Kukan0e6212c2012-12-23 19:27:28 +010056
57include $(BUILDDIR)/config_$(gb_Side).mk
Matúš Kukan0e6212c2012-12-23 19:27:28 +010058
Stephan Bergmann5067d312015-10-02 11:30:40 +020059export GMAKE_OPTIONS?=-r$(if $(verbose),,s)$(value $(MAKEFLAGS))
Matúš Kukan0e6212c2012-12-23 19:27:28 +010060
Luboš Luňákf605cfc2014-03-23 15:58:00 +010061PARALLELISM_OPTION := $(if $(filter-out 0,$(PARALLELISM)),-j $(PARALLELISM),)
62
Michael Stahl886452b2014-11-17 17:27:03 +010063IWYU_OPTION := $(if $(IWYU_PATH),-k CC=$(IWYU_PATH) CXX=$(IWYU_PATH),)
Riccardo Magliocchettic716b382014-11-04 16:26:45 +010064
Michael Stahlfea3ca32014-11-24 15:17:26 +010065# don't want to have a dependency to iwyudummy.generate because it's
66# useful to manually edit the generated StaticLibrary_iwyudummy.mk
Michael Stahl096c7e82014-11-14 18:54:06 +010067iwyudummy: bootstrap fetch
Michael Stahlfea3ca32014-11-24 15:17:26 +010068 $(if $(wildcard $(BUILDDIR)/iwyudummy),,$(error first call "make iwyudummy.generate"))
Michael Stahl096c7e82014-11-14 18:54:06 +010069 cd $(BUILDDIR)/iwyudummy && $(MAKE) $(IWYU_OPTION) $(GMAKE_OPTIONS)
70
Noel Grandin460deba2014-11-20 09:47:17 +020071iwyudummy.generate:
72 $(SRCDIR)/bin/gen-iwyu-dummy-lib
73
Matúš Kukanf2e73652013-02-27 18:40:36 +010074#
75# Partial Build
76#
Bjoern Michaelsen60c64b42013-11-20 19:21:34 +010077define gb_Top_GbuildModuleRules
Matúš Kukan14443162014-09-05 12:43:34 +020078.PHONY: $(1) $(1).all $(1).build $(1).check $(1).clean $(1).showdeliverables $(foreach target,$(gb_Top_MODULE_CHECK_TARGETS),$(1).$(target))
Matúš Kukan0e6212c2012-12-23 19:27:28 +010079
80$(1): bootstrap fetch
Riccardo Magliocchettic716b382014-11-04 16:26:45 +010081 cd $(SRCDIR)/$(2) && $$(MAKE) $(IWYU_OPTION) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS)
Matúš Kukan0e6212c2012-12-23 19:27:28 +010082
Matúš Kukan14443162014-09-05 12:43:34 +020083$(1).build $(1).check $(1).clean $(1).showdeliverables $(foreach target,$(gb_Top_MODULE_CHECK_TARGETS),$(1).$(target)):
Luboš Luňák35720ea2014-03-23 21:20:00 +010084 cd $(SRCDIR)/$(2) && $$(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) $$(patsubst $(1).%,%,$$@)
Matúš Kukan0e6212c2012-12-23 19:27:28 +010085
Matúš Kukanbdd92142013-02-26 15:15:22 +010086$(1).all: bootstrap fetch
Riccardo Magliocchettic716b382014-11-04 16:26:45 +010087 $$(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))
Matúš Kukanbdd92142013-02-26 15:15:22 +010088
Matúš Kukan0e6212c2012-12-23 19:27:28 +010089endef
Norbert Thiebaudae4e3272012-12-11 07:49:24 -060090
Bjoern Michaelsen60c64b42013-11-20 19:21:34 +010091define gb_Top_GbuildModulesRules
92$(foreach m,$(1),$(call gb_Top_GbuildModuleRules,$(notdir $(m)),$(m)))
Matúš Kukan0e6212c2012-12-23 19:27:28 +010093endef
94
Michael Stahldddff6e2013-10-23 16:33:50 +020095gbuild_modules := $(patsubst $(SRCDIR)/%/,%,$(dir $(wildcard $(SRCDIR)/*/Module_*.mk $(SRCDIR)/external/*/Module_*.mk)))
Peter Foley96f94302013-03-24 09:34:55 -040096
Noel Grandin065d6cc2014-07-07 14:29:05 +020097gbuild_internal_modules := $(filter-out odk external,$(patsubst $(SRCDIR)/%/,%,$(dir $(wildcard $(SRCDIR)/*/Module_*.mk))))
98
99internal.clean: $(addsuffix .clean,$(gbuild_internal_modules))
100
101
Bjoern Michaelsen60c64b42013-11-20 19:21:34 +0100102$(eval $(call gb_Top_GbuildModulesRules,$(gbuild_modules)))
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100103
Peter Foleyac3e90b2013-03-02 13:06:22 -0500104gbuild_TARGETS := AllLangHelp \
David Tardone78646e2013-05-07 12:29:34 +0200105 AllLangPackage \
Peter Foleyac3e90b2013-03-02 13:06:22 -0500106 AllLangResTarget \
Matúš Kukan7a878f92013-06-10 00:56:28 +0200107 AutoInstall \
Peter Foleyac3e90b2013-03-02 13:06:22 -0500108 CliLibrary \
109 CliNativeLibrary \
Michael Stahl6bd0f9b2013-10-28 10:32:03 +0100110 CliUnoApi \
Peter Foleyac3e90b2013-03-02 13:06:22 -0500111 Configuration \
112 CppunitTest \
113 CustomTarget \
114 Dictionary \
115 Executable \
116 Extension \
Michael Stahl704451d2013-10-31 00:15:51 +0100117 ExtensionPackage \
Michael Stahl60211132013-10-31 00:58:46 +0100118 ExtensionPackageSet \
Peter Foleyac3e90b2013-03-02 13:06:22 -0500119 ExternalPackage \
120 ExternalProject \
Stephan Bergmann514baf72015-01-07 13:45:56 +0100121 Gallery \
David Tardon0fd330e2013-05-04 13:21:33 +0200122 GeneratedPackage \
Peter Foleyac3e90b2013-03-02 13:06:22 -0500123 InstallModule \
124 InstallScript \
125 InternalUnoApi \
126 Jar \
127 JunitTest \
128 Library \
129 Module \
130 Package \
David Tardon9d54f0e2013-04-07 09:45:19 +0200131 PackageSet \
Peter Foleyac3e90b2013-03-02 13:06:22 -0500132 Pagein \
David Tardondf7b8632013-05-24 15:49:11 +0200133 Postprocess \
Peter Foleyac3e90b2013-03-02 13:06:22 -0500134 Pyuno \
Michael Stahl3094d722013-04-18 22:59:25 +0200135 PythonTest \
Peter Foleyac3e90b2013-03-02 13:06:22 -0500136 Rdb \
137 StaticLibrary \
David Tardoned729832013-04-06 13:10:54 +0200138 UIConfig \
Peter Foleyac3e90b2013-03-02 13:06:22 -0500139 UnoApi \
Peter Foleyac3e90b2013-03-02 13:06:22 -0500140 UnpackedTarball \
141 WinResTarget \
David Tardonea18ca02013-03-31 11:34:10 +0200142 Zip \
David Tardon3d50cfa2013-04-14 08:18:27 +0200143
Peter Foleyac3e90b2013-03-02 13:06:22 -0500144# build a generic gbuild target
Stephan Bergmannb3046282014-06-18 13:27:47 +0200145$(foreach target,$(gbuild_TARGETS),$(target)_% $(foreach module,$(gbuild_modules),$(target)_$(module)/%)) %.genpatch: bootstrap fetch
Luboš Luňákf8062812014-03-23 17:46:23 +0100146 $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100147
148#
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100149# Clean
150#
151clean: clean-host clean-build
152
153clean-host:
Michael Stahlf1d08892013-10-01 15:30:08 +0200154 rm -fr $(TESTINSTALLDIR)
David Tardonbba6e9e2013-04-03 17:13:32 +0200155 rm -fr $(INSTDIR)
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100156 rm -fr $(WORKDIR)
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100157
158clean-build:
Michael Stahld729d162014-02-27 16:19:43 +0100159ifneq ($(CROSS_COMPILING),)
Matúš Kukan58ff5d52013-09-25 09:44:35 +0200160 rm -fr $(INSTDIR_FOR_BUILD)
Matúš Kukanf2e73652013-02-27 18:40:36 +0100161 rm -fr $(WORKDIR_FOR_BUILD)
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100162endif
163
164include $(SRCDIR)/compilerplugins/Makefile.mk
165
166#
167# Distclean
168#
169distclean : clean compilerplugins-clean
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100170 rm -fr \
171 $(BUILDDIR)/Makefile \
172 $(BUILDDIR)/aclocal.m4 \
173 $(BUILDDIR)/autom4te.cache \
174 $(BUILDDIR)/config.log \
Stephan Bergmann16b48022013-12-17 14:06:42 +0100175 $(BUILDDIR)/config.Build.log \
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100176 $(BUILDDIR)/config.status \
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100177 $(BUILDDIR)/config_build.mk \
178 $(BUILDDIR)/config_host.mk \
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100179 $(BUILDDIR)/config_host.mk.stamp \
David Tardonc8708f32015-03-26 09:19:01 +0100180 $(BUILDDIR)/config_host_lang.mk \
181 $(BUILDDIR)/config_host_lang.mk.stamp \
Stephan Bergmann353e1772013-02-04 08:39:08 +0100182 $(BUILDDIR)/config_host/*.h \
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100183 $(BUILDDIR)/configure \
Stephan Bergmanncb50efb2013-01-14 11:05:50 +0100184 $(BUILDDIR)/instsetoo_native/util/openoffice.lst \
Stephan Bergmann9e973322013-10-17 23:37:29 +0200185 $(BUILDDIR)/ios/lo.xcconfig \
Stephan Bergmanna3267252013-10-02 21:19:01 +0200186 $(BUILDDIR)/lo.xcent \
Tor Lillqvist332f6a52014-09-17 17:39:10 +0300187 $(BUILDDIR)/sysui/desktop/macosx/Info.plist
Michael Stahle9cd5082016-01-06 21:28:17 +0100188 $(FIND) $(SRCDIR)/solenv/gdb -name "*.pyc" -exec rm {} \;
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100189
190#
191# custom command
192#
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100193cmd:
194 echo "custom cmd" && ( $(cmd) )
195
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100196#
197# Fetch
198#
Michael Stahle3ba7642014-03-10 23:42:26 +0100199ifneq ($(DO_FETCH_TARBALLS),)
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100200include $(SRCDIR)/Makefile.fetch
201fetch: download
202fetch: get-submodules
203
204ifneq (,$(wildcard $(SRCDIR)/.git))
205get-submodules:
206ifneq ($(foreach i,$(GIT_NEEDED_SUBMODULES),$(i)/.git),$(wildcard $(foreach i,$(GIT_NEEDED_SUBMODULES),$(i)/.git)))
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100207 cd $(SRCDIR) && ./g -f clone
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100208endif
Andrea Gelminifbec6ac2016-01-04 12:22:58 +0100209 @cd $(SRCDIR) && ./g -z # make sure the git hooks are in place even if no submodules are needed
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100210
211else # these sources are from a tarball, so get the other source tarballs
212gb_LO_VER := $(shell . $(SRCDIR)/sources.ver && echo $$lo_sources_ver)
213$(if $(gb_LO_VER),,$(error Error while retrieving $$lo_sources_ver from $(SRCDIR)/sources.ver))
214
215get-submodules: | download
216ifneq ($(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))))
217 $(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),\
David Tardon922b03f02014-08-04 19:34:03 +0200218 $(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))
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100219 $(SRCDIR)/bin/unpack-sources $(SRCDIR) $(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),\
220 $(TARFILE_LOCATION)/libreoffice-$(i)-$(gb_LO_VER).tar.xz)
221endif
222
223endif
224
225else
226fetch:
227 @echo "Automatic fetching of external tarballs is disabled."
228
229endif
230
231#
232# Bootstap
233#
Bjoern Michaelsen2b791f12013-02-25 11:56:21 +0100234bootstrap: compilerplugins
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100235
236#
237# Build
238#
Bjoern Michaelsen4eebd652013-11-19 14:25:45 +0100239# Note: this will pipe through all gbuild targets to ... gbuild
240# with some translations like "build"->"all" for historic reasons
Michael Stahlbbadfca2013-10-03 18:49:25 +0200241#
Michael Stahlb8002162013-11-06 16:36:04 +0100242build: bootstrap fetch $(if $(CROSS_COMPILING),cross-toolset)
Miklos Vajna49137ed2015-02-20 15:52:23 +0100243ifneq ($(filter-out WNT MACOSX IOS,$(OS)),)
Stephan Bergmann45fffdb2014-11-20 14:30:27 +0100244 mkdir -p $(INSTDIR)
245 $(SRCDIR)/solenv/bin/install-gdb-printers -a $(INSTDIR) -c
Michael Stahl2cb380b2013-10-29 17:51:06 +0100246endif
Riccardo Magliocchettic716b382014-11-04 16:26:45 +0100247 $(MAKE) $(PARALLELISM_OPTION) $(IWYU_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $(build_goal)
Tor Lillqvist685a12a2013-04-19 09:27:44 +0300248ifeq ($(OS),IOS)
Luboš Luňákf8062812014-03-23 17:46:23 +0100249 $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) ios
Tor Lillqvist685a12a2013-04-19 09:27:44 +0300250endif
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100251
Peter Foley7abf6862014-09-08 14:52:03 -0400252build-non-l10n-only build-l10n-only build-nocheck check debugrun translations packageinfo $(gb_Top_MODULE_CHECK_TARGETS): build
253
254help showmodules:
255 $(MAKE) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
Bjoern Michaelsen04dead12013-11-13 02:12:48 +0100256
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100257cross-toolset: bootstrap fetch
Luboš Luňákf8062812014-03-23 17:46:23 +0100258 $(MAKE) gb_Side=build $(PARALLELISM_OPTION) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild build-tools
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100259
Tor Lillqvist18041132013-08-16 11:06:51 +0300260
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100261#
262# Install
263#
264
Bjoern Michaelsenac32aaf2013-11-20 19:36:03 +0100265define gb_Top_DoInstall
266echo "$(1) in $(INSTALLDIR) ..." && \
Stephan Bergmannb02fe062014-11-21 11:45:16 +0100267$(SRCDIR)/solenv/bin/ooinstall $(2) "$(INSTALLDIR)"
Bjoern Michaelsenac32aaf2013-11-20 19:36:03 +0100268
269endef
270
271ifneq ($(OS),MACOSX)
272define gb_Top_InstallFinished
273echo && echo "If you want to edit the .ui files with glade first execute:" && \
274echo && echo "export GLADE_CATALOG_SEARCH_PATH=$(2)/share/glade" && \
275echo && echo "$(1) finished, you can now execute:" && \
276echo "$(2)/program/soffice"
277
278endef
279else
280define gb_Top_InstallFinished
281echo && echo "$(1) finished, you can now run: " && \
282echo "open $(2)/$(PRODUCTNAME).app" && \
283echo "" && \
284echo "To debug: gdb $(2)/$(PRODUCTNAME).app/Contents/MacOS/soffice"
285
286endef
287endif
288
289ifneq ($(OS),MACOSX)
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100290install:
Bjoern Michaelsenac32aaf2013-11-20 19:36:03 +0100291 @$(call gb_Top_DoInstall,Installing,)
292 @$(call gb_Top_InstallFinished,Installation,$(INSTALLDIR))
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100293
294install-strip:
Bjoern Michaelsenac32aaf2013-11-20 19:36:03 +0100295 @$(call gb_Top_DoInstall,Installing and stripping binaries,--strip)
296 @$(call gb_Top_InstallFinished,Installation,$(INSTALLDIR))
Tor Lillqvist18041132013-08-16 11:06:51 +0300297endif # !MACOSX
298
Michael Stahlbe592882013-10-01 15:08:15 +0200299test-install: build
Michael Stahlf1d08892013-10-01 15:30:08 +0200300 @rm -rf $(TESTINSTALLDIR)
Michael Stahlb81f49c2013-10-01 17:39:52 +0200301 @mkdir -p $(TESTINSTALLDIR)
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100302ifeq ($(OS_FOR_BUILD),WNT)
Luboš Luňákf8062812014-03-23 17:46:23 +0100303 cd $(SRCDIR)/instsetoo_native && $(MAKE) LIBO_TEST_INSTALL=TRUE $(GMAKE_OPTIONS)
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100304else
Stephan Bergmannb02fe062014-11-21 11:45:16 +0100305 @$(SRCDIR)/solenv/bin/ooinstall $(TESTINSTALLDIR)
Tor Lillqvistebdd6162013-02-01 14:48:15 +0200306ifneq ($(MACOSX_CODESIGNING_IDENTITY),)
Stephan Bergmannb02fe062014-11-21 11:45:16 +0100307 @$(SRCDIR)/solenv/bin/macosx-codesign-app-bundle $(TESTINSTALLDIR)/LibreOffice$(if $(ENABLE_RELEASE_BUILD),,Dev).app
Tor Lillqvist2b71c1a2013-01-31 23:22:35 +0200308endif
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100309endif
Bjoern Michaelsenac32aaf2013-11-20 19:36:03 +0100310 @$(call gb_Top_InstallFinished,Test Installation,$(TESTINSTALLDIR))
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100311
Tor Lillqvist8ff6bfb2014-06-06 18:51:48 +0300312mac-app-store-package: test-install
313ifneq ($(MACOSX_PACKAGE_SIGNING_IDENTITY),)
314 mv "$(TESTINSTALLDIR)/$(PRODUCTNAME).app" "$(MACOSX_APP_NAME).app"
315 productbuild --component "$(MACOSX_APP_NAME).app" /Applications --sign $(MACOSX_PACKAGE_SIGNING_IDENTITY) $(shell echo "$(MACOSX_APP_NAME)" | tr ' ' '-').pkg
316else
317 @echo You did not provide an installer signing identity with --enable-macosx-package-signing
318 @exit 1
319endif
320
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100321distro-pack-install: install
322 $(SRCDIR)/bin/distro-install-clean-up
323 $(SRCDIR)/bin/distro-install-desktop-integration
324 $(SRCDIR)/bin/distro-install-sdk
325 $(SRCDIR)/bin/distro-install-file-lists
326
Bjoern Michaelsenc6fe5c62013-12-08 03:39:37 +0100327install-package-%:
Luboš Luňákf8062812014-03-23 17:46:23 +0100328 $(MAKE) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.gbuild $@
Bjoern Michaelsenc6fe5c62013-12-08 03:39:37 +0100329
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100330id:
Stephan Bergmannb02fe062014-11-21 11:45:16 +0100331 @$(SRCDIR)/solenv/bin/create-ids
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100332
333tags:
Stephan Bergmannb02fe062014-11-21 11:45:16 +0100334 @$(SRCDIR)/solenv/bin/create-tags
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100335
Takeshi Abe775d99c2014-11-07 21:14:50 +0900336etags:
Stephan Bergmannb02fe062014-11-21 11:45:16 +0100337 @$(SRCDIR)/solenv/bin/create-tags -e
Takeshi Abe775d99c2014-11-07 21:14:50 +0900338
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100339docs:
Stephan Bergmannb02fe062014-11-21 11:45:16 +0100340 @$(SRCDIR)/solenv/bin/mkdocs.sh $(SRCDIR)/docs $(SRCDIR)/solenv/inc/doxygen.cfg
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100341
342findunusedcode:
Luboš Luňákf8062812014-03-23 17:46:23 +0100343 @$(SRCDIR)/bin/findunusedcode $(SRCDIR) $(MAKE)
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100344
Bjoern Michaelsene4fbcc52013-10-15 10:18:29 +0200345findunusedheaders:
346 $(SRCDIR)/bin/find-unusedheaders.pl
347
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100348
Michael Meeksd614ca72013-03-04 18:01:19 +0000349dump-deps:
Luboš Luňákf8062812014-03-23 17:46:23 +0100350 @$(SRCDIR)/bin/module-deps.pl $(MAKE) $(SRCDIR)/Makefile.gbuild
Michael Meeksd614ca72013-03-04 18:01:19 +0000351
David Ostrovsky0670c3f2013-03-09 16:08:47 +0100352dump-deps-png:
Luboš Luňákf8062812014-03-23 17:46:23 +0100353 @$(SRCDIR)/bin/module-deps.pl $(MAKE) $(SRCDIR)/Makefile.gbuild | dot -Tpng -o lo.png
David Ostrovsky0670c3f2013-03-09 16:08:47 +0100354
Stephan Bergmanna19440b2014-02-17 18:03:44 +0100355dump-deps-sort:
Luboš Luňákf8062812014-03-23 17:46:23 +0100356 @$(SRCDIR)/bin/module-deps.pl -t $(MAKE) $(SRCDIR)/Makefile.gbuild
Stephan Bergmanna19440b2014-02-17 18:03:44 +0100357
Bjoern Michaelsen60c64b42013-11-20 19:21:34 +0100358define gb_Top_GbuildToIdeIntegration
Bjoern Michaelsenba99e292013-11-15 18:39:46 +0100359$(1)-ide-integration:
Luboš Luňákf8062812014-03-23 17:46:23 +0100360 cd $(SRCDIR) && (LC_MESSAGES=C $(MAKE) cmd="$(MAKE) -npf Makefile.gbuild all" cmd || true) | $(SRCDIR)/bin/gbuild-to-ide --ide $(1)
Bjoern Michaelsenba99e292013-11-15 18:39:46 +0100361
362endef
363
364$(foreach ide,\
Markus Mohrhard071c09d2014-08-07 22:11:50 +0200365 debug \
Tor Lillqvist61e66d72013-11-26 21:39:58 +0200366 kdevelop \
Honza Havlíček2e2303a2014-02-09 20:58:46 +0100367 vs2012 \
David Ostrovskyfc24ead2014-10-01 01:44:20 +0200368 vs2013 \
Markus Mohrhard071c09d2014-08-07 22:11:50 +0200369 vim \
Michel Renon237a1b72015-05-19 16:30:41 +0200370 xcode \
Gulsah Kosebc7a4902015-11-27 20:28:10 +0200371 qtcreator \
372 eclipsecdt,\
Bjoern Michaelsen60c64b42013-11-20 19:21:34 +0100373$(eval $(call gb_Top_GbuildToIdeIntegration,$(ide))))
Bjoern Michaelsenba99e292013-11-15 18:39:46 +0100374
Matúš Kukan0e6212c2012-12-23 19:27:28 +0100375endif # MAKE_RESTARTS
376
377# vim: set noet sw=4 ts=4: