202 lines
4.9 KiB
Makefile
202 lines
4.9 KiB
Makefile
# @configure_input@
|
|
|
|
SHELL=/usr/bin/env bash
|
|
|
|
ifeq ($(USE_GMAKE),)
|
|
GBUILD_OPT:=
|
|
else
|
|
GBUILD_OPT:=--gmake
|
|
endif
|
|
|
|
ifeq (@CROSS_COMPILING@,YES)
|
|
all: Makefile dmake/dmake@EXEEXT_FOR_BUILD@ src.downloaded cross-build-toolset
|
|
else
|
|
all: Makefile dmake/dmake@EXEEXT_FOR_BUILD@ src.downloaded
|
|
endif
|
|
@. ./Env.Host.sh && \
|
|
cd instsetoo_native && \
|
|
build.pl $(GBUILD_OPT) -P@BUILD_NCPUS@ --all -- -P@BUILD_MAX_JOBS@
|
|
|
|
ifeq (@CROSS_COMPILING@,YES)
|
|
cross-build-toolset:
|
|
# Build necessary modules for the *build* platform, i.e. those needed
|
|
# by tools run at build time. Sure, in many of these modules only a
|
|
# part of the produced binaries are actually used then in the build.
|
|
# Once everything is handled by gbuild, this can hopefully be streamlined.
|
|
. ./Env.Build.sh && \
|
|
for D in \
|
|
solenv \
|
|
soltools \
|
|
boost \
|
|
external \
|
|
cppunit \
|
|
xml2cmp \
|
|
lucene \
|
|
sal \
|
|
cosv \
|
|
udm \
|
|
autodoc \
|
|
store \
|
|
salhelper \
|
|
registry \
|
|
idlc \
|
|
icu \
|
|
codemaker \
|
|
udkapi \
|
|
expat \
|
|
libxml2 \
|
|
xml2cmp \
|
|
libxslt \
|
|
offapi \
|
|
oovbaapi \
|
|
cppu \
|
|
cppuhelper \
|
|
rdbmaker \
|
|
cpputools \
|
|
xmlreader \
|
|
i18nutil \
|
|
ridljar \
|
|
jurt \
|
|
jvmaccess \
|
|
bridges \
|
|
ucbhelper \
|
|
comphelper \
|
|
jvmfwk \
|
|
regexp \
|
|
berkeleydb \
|
|
sax \
|
|
stoc \
|
|
i18npool \
|
|
unodevtools \
|
|
gettext \
|
|
o3tl \
|
|
basegfx \
|
|
tools \
|
|
idl \
|
|
l10ntools \
|
|
rsc \
|
|
setup_native \
|
|
icc \
|
|
unoil \
|
|
javaunohelper \
|
|
unotools \
|
|
xmlhelp \
|
|
shell; do \
|
|
if grep -q gb_Module_add_targets $$D/Module_$$D.mk 2>/dev/null; then \
|
|
(cd $$D && make -sr -j@BUILD_MAX_JOBS@) || exit 1; \
|
|
else \
|
|
(cd $$D && build.pl $(GBUILD_OPT) -P@BUILD_NCPUS@ -- -P@BUILD_MAX_JOBS@ && deliver.pl) || exit 1; \
|
|
fi; \
|
|
done
|
|
endif
|
|
|
|
install:
|
|
@. ./Env.Host.sh && \
|
|
echo "Installing in @INSTALLDIR@..." && \
|
|
ooinstall "@INSTALLDIR@" && \
|
|
echo "" && \
|
|
echo "Installation finished, you can now execute:" && \
|
|
echo "@INSTALLDIR@/program/soffice"
|
|
|
|
distro-pack-install: install
|
|
./bin/distro-install-clean-up
|
|
./bin/distro-install-desktop-integration
|
|
./bin/distro-install-sdk
|
|
./bin/distro-install-file-lists
|
|
|
|
dev-install:
|
|
@. ./Env.Host.sh && \
|
|
cd smoketestoo_native && \
|
|
export SAL_USE_VCLPLUGIN="svp" && \
|
|
build.pl $(GBUILD_OPT) -P@BUILD_NCPUS@ --all:instsetoo_native -- -P@BUILD_MAX_JOBS@ && \
|
|
cd @abs_builddir@ && ln -s $$SOLARVER/$$INPATH/installation/opt/ install && \
|
|
echo "" && \
|
|
$$SOLARENV/bin/linkoo $$SRC_ROOT/install $$SRC_ROOT && \
|
|
echo && echo "Developer installation finished, you can now execute:" && echo && \
|
|
if test `uname -s` = Darwin; then \
|
|
echo open install/LibreOffice.app; \
|
|
else \
|
|
echo "cd @abs_builddir@/install/program" && \
|
|
echo ". ./ooenv" && \
|
|
echo "./soffice.bin"; \
|
|
fi
|
|
|
|
distclean:
|
|
-rm config.cache
|
|
-rm config.log
|
|
ifeq (@BUILD_DMAKE@,YES)
|
|
-$(GNUMAKE) -C dmake distclean
|
|
endif
|
|
|
|
clean:
|
|
. ./Env.Host.sh && \
|
|
rm -rf */$$INPATH && \
|
|
rm -rf solver/*/$$INPATH && \
|
|
rm -rf workdir && \
|
|
rm -rf install
|
|
ifeq (@BUILD_DMAKE@,YES)
|
|
. ./Env.Host.sh && \
|
|
(if [ -f dmake/Makefile ] ; then $$GNUMAKE -C dmake clean; fi) && \
|
|
rm -f solenv/*/bin/dmake*
|
|
endif
|
|
ifeq (@CROSS_COMPILING@,YES)
|
|
. ./Env.Host.sh && \
|
|
rm -rf */$$INPATH_FOR_BUILD && \
|
|
rm -rf solver/*/$$INPATH_FOR_BUILD
|
|
endif
|
|
|
|
dmake/dmake@EXEEXT_FOR_BUILD@:
|
|
./bootstrap
|
|
|
|
src.downloaded: ooo.lst download
|
|
ifeq (@DO_FETCH_TARBALLS@,YES)
|
|
@. ./Env.Host.sh && \
|
|
$$SRC_ROOT/download $$SRC_ROOT/ooo.lst && touch $@
|
|
else
|
|
@echo "Automatic fetching of external tarballs is disabled."
|
|
endif
|
|
|
|
fetch: src.downloaded
|
|
|
|
Makefile: configure.in ooo.lst.in set_soenv.in Makefile.in
|
|
./autogen.sh
|
|
|
|
check: Makefile dmake/dmake@EXEEXT_FOR_BUILD@ fetch
|
|
@. ./Env.Host.sh && \
|
|
cd smoketestoo_native && \
|
|
export SAL_USE_VCLPLUGIN="svp" && \
|
|
build.pl $(GBUILD_OPT) -P@BUILD_NCPUS@ --all -- -P@BUILD_MAX_JOBS@
|
|
@. ./Env.Host.sh && $$SOLARENV/bin/subsequenttests
|
|
|
|
id:
|
|
@. ./Env.Host.sh && \
|
|
create-ids
|
|
|
|
tags:
|
|
@. ./Env.Host.sh && \
|
|
create-tags
|
|
|
|
docs:
|
|
@. ./Env.Host.sh && \
|
|
mkdocs.sh $$SRC_ROOT/docs $$SOLARENV/inc/doxygen.cfg
|
|
|
|
findunusedcode:
|
|
# experimental callcatcher target
|
|
# http://www.skynet.ie/~caolan/Packages/callcatcher.html
|
|
@which callcatcher > /dev/null 2>&1 || \
|
|
(echo "callcatcher not installed" && false)
|
|
@. ./Env.Host.sh && \
|
|
source <(sed -e s,$$INPATH,callcatcher,g ./Env.Host.sh) && \
|
|
. ./solenv/bin/callcatchEnv.Set.sh && \
|
|
cd instsetoo_native && \
|
|
build.pl $(GBUILD_OPT) -P@BUILD_NCPUS@ --all -- -P@BUILD_MAX_JOBS@
|
|
@. ./Env.Host.sh && \
|
|
source <(sed -e s,$$INPATH,callcatcher,g ./Env.Host.sh) && \
|
|
callanalyse \
|
|
$$WORKDIR/LinkTarget/*/* \
|
|
*/$$OUTPATH/bin/* \
|
|
*/$$OUTPATH/lib/* > unusedcode.all
|
|
#because non-c++ symbols could be dlsymed lets make a list of class level
|
|
#unused methods which don't require much effort to determine if they need
|
|
#to be just removed, or put behind appropiate platform or debug level ifdefs
|
|
@grep ::.*\( unusedcode.all | grep -v cppu::bootstrap > unusedcode.easy
|