office-gobmx/Makefile.top
Tor Lillqvist fae45f59b8 Add the android module to gbuild
Just build the sdremote app for now. Note that this is a pure Java
app with no dependencies on (native) code (or Java code, for that
matter) from rest of LO.

Probably should drop the separate android/sdremote/Makfile and just do
what it does in android/CustomTarget_sdremote.mk instead.

Adding other Android apps (well, the LibreOffice4Android one likely)
to gbuild will require more complexity as they bundle native code, and
thus should depend on other modules first having been built. If one
wants to go really fancy, one could of course depend on the specific
libraries (and other files) being bundled. Let's see...

Change-Id: If10761479f348c4993eec40b7f8346edb77f0e0d
2012-08-21 13:58:28 +03:00

531 lines
11 KiB
Text

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
.PHONY : all bootstrap build check clean clean-build clean-host dev-install distclean distro-pack-install docs fetch findunusedcode id install install-strip install-tb subsequentcheck tags
ifeq ($(MAKECMDGOALS),)
MAKECMDGOALS:=all
endif
all: build
SHELL=/usr/bin/env bash
SRCDIR:=$(patsubst %/,%,$(dir $(realpath $(firstword $(MAKEFILE_LIST)))))
ifeq ($(gb_Side),)
gb_Side:=host
endif
include $(SRCDIR)/config_$(gb_Side).mk
ifeq ($(GMAKE_OPTIONS),)
ifeq ($(verbose)$(VERBOSE),)
export GMAKE_OPTIONS:=-rs
else
export GMAKE_OPTIONS:=-r
endif
endif
gbuild_modules:= \
MathMLDTD\
Mesa\
UnoControls\
accessibility\
android\
animations\
apple_remote\
autodoc\
avmedia\
basctl\
basebmp\
basegfx\
basic\
bean\
binaryurp\
canvas\
chart2\
clucene\
codemaker\
comphelper\
configmgr\
connectivity\
cosv\
cppcanvas\
cppu\
cppuhelper\
cpputools\
cui\
dbaccess\
desktop\
dictionaries \
drawinglayer\
dtrans\
editeng\
embeddedobj\
embedserv\
eventattacher\
extensions\
fileaccess\
filter\
forms\
formula\
fpicker\
framework\
hwpfilter\
i18npool\
i18nutil\
idl\
idlc\
io\
javaunohelper\
jurt\
jvmaccess\
jvmfwk\
l10ntools\
lingucomponent\
linguistic\
lotuswordpro\
nlpsolver\
np_sdk\
o3tl\
offapi\
officecfg\
oovbaapi\
oox\
package\
packimages\
padmin\
psprint_config\
pyuno\
qadevOOo\
regexp\
registry\
remotebridges\
reportbuilder\
reportdesign\
rdbmaker\
ridljar\
rsc\
sal\
salhelper\
sane\
sax\
sc\
scaddins\
sccomp\
scp2\
scripting\
sd\
sdext\
sfx2\
shell\
slideshow\
smoketest\
solenv\
sot\
starmath\
stoc\
store\
svl\
svtools\
svx\
sw\
swext\
tail_build\
test\
testtools\
toolkit\
tools\
touch\
translations\
tubes\
twain\
ucb\
ucbhelper\
ucpp\
udkapi\
udm\
unixODBC\
unodevtools\
unoil\
unotest\
unotools\
unoxml\
ure\
uui\
vbahelper\
vcl\
wizards\
writerfilter\
writerperfect\
x11_extensions\
xmerge\
xml2cmp\
xmlhelp\
xmloff\
xmlreader\
xmlscript\
xmlsecurity\
dmake_modules:=\
afms\
apache-commons\
beanshell\
berkeleydb\
binfilter \
boost\
bridges\
cairo\
cli_ure\
cppunit\
crashrep\
ct2n\
curl\
epm\
expat\
external\
extras\
fontconfig\
freetype\
gdk-pixbuf\
gettext\
glib\
graphite\
helpcontent2 \
hsqldb\
hunspell\
hyphen\
icu\
instsetoo_native\
jfreereport\
jpeg\
languagetool\
libcdr\
libcmis\
libcroco\
libexttextcat\
libgsf\
liblangtag\
libmspub\
libpng\
librsvg\
libvisio\
libwpd\
libwpg\
libwps\
libxml2\
libxmlsec\
libxslt\
lcms2\
lpsolve\
mdds\
migrationanalysis\
more_fonts\
moz\
mysqlc\
mysqlcppconn\
mythes\
neon\
nss\
odk\
openldap\
openssl\
pango\
postgresql\
postprocess\
python\
readlicense_oo\
redland\
rhino\
saxon\
setup_native\
soltools\
stax\
stlport\
sysui\
tomcat\
vigra\
xpdf\
xsltml\
zlib\
export gb_TAILBUILDTARGET=all slowcheck
define gbuild_module_rules
.PHONY: $(1) $(1).all $(1).clean $(1).deliver
$(1): bootstrap fetch
cd $(1) && $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) gb_PARTIALBUILD=T
$(1).all: bootstrap fetch
$$(if $$(filter $(1),$$(shell $(GNUMAKE) -r -f $(SRCDIR)/tail_build/Makefile showmodules)), \
cd tail_build && unset MAKEFLAGS && \
export gb_TAILBUILDTARGET="$(WORKDIR)/Module/$(1) $(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1)" && \
, \
cd $(1) && unset MAKEFLAGS && \
) \
$(SOLARENV)/bin/build.pl -P$(BUILD_NCPUS) --all -- -P$(GMAKE_PARALLELISM)
$(1).clean:
cd $(1) && $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) clean gb_PARTIALBUILD=T
$(1).subsequentcheck:
cd $(1) && $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) subsequentcheck gb_PARTIALBUILD=T
$(1).deliver:
@true
endef
define gbuild_modules_rules
$(foreach m,$(1),$(call gbuild_module_rules,$(m)))
endef
define dmake_module_rules
.PHONY: $(1) $(1).all $(1).deliver $(1).clean
$(1): bootstrap fetch
cd $(1) && unset MAKEFLAGS && \
$(SOLARENV)/bin/build.pl -P$(BUILD_NCPUS) -- -P$(GMAKE_PARALLELISM)
$(1).all: bootstrap fetch
cd $(1) && unset MAKEFLAGS && \
$(SOLARENV)/bin/build.pl -P$(BUILD_NCPUS) --all -- -P$(GMAKE_PARALLELISM)
$(1).deliver: $(1)
cd $(1) && $(SOLARENV)/bin/deliver.pl
$(1).clean:
cd $(1) && $(SOLARENV)/bin/deliver.pl -delete
rm -fr $(1)/$(INPATH)
endef
define dmake_modules_rules
$(foreach m,$(1),$(call dmake_module_rules,$(m)))
endef
#
# Partial Build
#
$(eval $(call gbuild_modules_rules,$(gbuild_modules)))
$(eval $(call dmake_modules_rules,$(dmake_modules)))
#
# Clean
#
clean: clean-host clean-build
clean-host:
ifeq ($(BUILD_DMAKE),YES)
if [ -f dmake/Makefile ] ; then $(GNUMAKE) -j $(GMAKE_PARALLELISM) -C dmake clean; fi
endif
rm -fr $(DEVINSTALLDIR)
rm -fr $(OUTDIR)
rm -fr $(WORKDIR)
rm -fr $(SRCDIR)/*/$(INPATH)
rm -fr install
clean-build:
ifeq ($(CROSS_COMPILING),YES)
rm -rf $(SOLARVER)/$(INPATH_FOR_BUILD) # not necessarily below SRCDIR
rm -rf $(SRCDIR)/*/$(INPATH_FOR_BUILD)
endif
#
# Distclean
#
distclean : clean
ifeq ($(BUILD_DMAKE),YES)
(if [ -f dmake/Makefile ] ; then $(GNUMAKE) -j $(GMAKE_PARALLELISM) -C dmake distclean; fi) && \
rm -f solenv/*/bin/dmake*
endif
rm -fr config_host.mk config_build.mk aclocal.m4 autom4te.cache \
bin/repo-list config.log config.status configure \
ooo.lst post_download post_download.log \
config_host.mk.last set_soenv.stamp src.downloaded warn
find $(SOLARENV)/gdb -name "*.pyc" -exec rm {} \;
#
# custom command
#
ifneq ( $(MAKECMDGOALS),cmd)
cmd:
echo "custom cmd" && ( $(cmd) )
endif
ifneq ($(filter-out clean distclean,$(MAKECMDGOALS)),)
#
# Fetch
#
fetch: src.downloaded
src.downloaded : Makefile.top download ooo.lst bin/repo-list
ifeq ($(DO_FETCH_TARBALLS),YES)
@./download $(SRCDIR)/ooo.lst && touch $@
else
@echo "Automatic fetching of external tarballs is disabled."
endif
#
# Bootstap
#
bootstrap: $(WORKDIR)/bootstrap
$(WORKDIR)/bootstrap: solenv/bin/concat-deps.c
@cd $(SRCDIR) && ./bootstrap
@mkdir -p $(dir $@) && touch $@
#
# Build
#
build-packimages: bootstrap fetch $(if $(filter $(INPATH),$(INPATH_FOR_BUILD)),,cross-toolset)
ifeq ($(DISABLE_SCRIPTING),TRUE)
# We must get the headers from vbahelper "delivered" because
# as we don't link to any libs from there they won't otherwise be, or
# something. And we still do include those headers always even if the
# libs aren't built in the --disable-scripting case. (Ifdefs for
# DISABLE_SCRIPTING will be added to the code later as necessary.)
$(GNUMAKE) vbahelper
endif
ifeq ($(DISABLE_DBCONNECTIVITY),TRUE)
# Ditto for dbconnectivity in the --disable-database-connectivity case
cd connectivity && sed -e 's/^\(export [A-Z0-9_]*=\)\(.*\)$$/\1"\2"/' <../config_host.mk >conftmp.sh && . conftmp.sh && rm conftmp.sh && $(SOLARENV)/bin/deliver.pl
endif
cd packimages && unset MAKEFLAGS && \
$(SOLARENV)/bin/build.pl -P$(BUILD_NCPUS) --all -- -P$(GMAKE_PARALLELISM) && \
$(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS)
build: build-packimages
ifeq ($(OS_FOR_BUILD),WNT)
cd instsetoo_native && unset MAKEFLAGS && $(SOLARENV)/bin/build.pl
else
cd instsetoo_native && unset MAKEFLAGS && \
$(SOLARENV)/bin/build.pl -P$(BUILD_NCPUS) -- -P$(GMAKE_PARALLELISM)
endif
cross-toolset: bootstrap fetch
cd cross_toolset && $(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS)
#
# Install
#
install:
echo "Installing in $(INSTALLDIR)..." && \
ooinstall "$(INSTALLDIR)" && \
echo "" && \
echo "Installation finished, you can now execute:" && \
echo "$(INSTALLDIR)/program/soffice"
install-strip:
echo "Installing and stripping binaries in $(INSTALLDIR)..." && \
ooinstall --strip "$(INSTALLDIR)" && \
echo "" && \
echo "Installation finished, you can now execute:" && \
echo "$(INSTALLDIR)/program/soffice"
dev-install: build
@rm -rf $(DEVINSTALLDIR)
@mkdir $(DEVINSTALLDIR)
ifeq ($(OS_FOR_BUILD),WNT)
cd instsetoo_native && unset MAKEFLAGS && $(SOLARENV)/bin/build.pl LIBO_DEV_INSTALL=TRUE
unzip -q -d "$(DEVINSTALLDIR)" "$(SRCDIR)/instsetoo_native/$(INPATH)/LibreOffice/archive/install/en-US/LibO*_install-arc_en-US.zip"
mv "$(DEVINSTALLDIR)"/LibO*_install-arc_en-US/* "$(DEVINSTALLDIR)"/opt
else
ifeq ($(DISABLE_LINKOO),TRUE)
@ooinstall $(DEVINSTALLDIR)/opt
@install-gdb-printers -L
else
@ooinstall -l $(DEVINSTALLDIR)/opt
endif
endif
@rm -f $(SRCDIR)/install && ln -s $(DEVINSTALLDIR)/opt/ $(SRCDIR)/install
install-tb:
@rm -rf $(DEVINSTALLDIR)
@mkdir $(DEVINSTALLDIR)
ifeq ($(OS_FOR_BUILD),WNT)
cd instsetoo_native && unset MAKEFLAGS && $(SOLARENV)/bin/build.pl LIBO_DEV_INSTALL=TRUE
unzip -q -d "$(DEVINSTALLDIR)" "$(SRCDIR)/instsetoo_native/$(INPATH)/LibreOffice/archive/install/en-US/LibO*_install-arc_en-US.zip"
mv "$(DEVINSTALLDIR)"/LibO*_install-arc_en-US/* "$(DEVINSTALLDIR)"/opt
else
@ooinstall $(DEVINSTALLDIR)/opt
@install-gdb-printers
endif
@rm -f $(SRCDIR)/install && ln -s $(DEVINSTALLDIR)/opt/ $(SRCDIR)/install
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
id:
@create-ids
tags:
@create-tags
docs:
@mkdocs.sh $(SRCDIR)/docs $(SOLARENV)/inc/doxygen.cfg
findunusedcode:
@which callcatcher > /dev/null 2>&1 || \
(echo "callcatcher not installed" && false)
@sed -e s,$$INPATH,callcatcher,g $(SRCDIR)/config_host.mk | sed -e s,"export OOO_JUNIT_JAR=.*","export OOO_JUNIT_JAR=",g > $(SRCDIR)/config_host_callcatcher.mk
@echo unexport ARCH_FLAGS >> $(SRCDIR)/config_host_callcatcher.mk
@echo unexport CFLAGS >> $(SRCDIR)/config_host_callcatcher.mk
@echo unexport CXXFLAGS >> $(SRCDIR)/config_host_callcatcher.mk
@mkdir -p $(SRCDIR)/solenv/callcatcher/bin && \
ln -sf $(SRCDIR)/solenv/$(INPATH)/bin/dmake \
$(SRCDIR)/solenv/callcatcher/bin/dmake
@$(GNUMAKE) -f $(SOLARENV)/bin/callcatcher.Makefile findunusedcode
@grep ::.*\( unusedcode.all \
| grep -v ^Atom \
| grep -v ^atom:: \
| grep -v ^boost:: \
| grep -v ^CIcc \
| grep -v ^CLuceneError:: \
| grep -v ^cppu:: \
| grep -v ^Dde \
| grep -v ^graphite2:: \
| grep -v ^jvmaccess:: \
| grep -v ^libcdr:: \
| grep -v ^libcmis:: \
| grep -v ^libmspub:: \
| grep -v ^libvisio:: \
| grep -v ^libwpg:: \
| grep -v ^libwps_tools_win:: \
| grep -v ^lucene:: \
| grep -v ^Matrix3d:: \
| grep -v ^salhelper:: \
| grep -v ^VSDInternalStream:: \
| grep -v ^WP1 \
| grep -v ^WP3 \
| grep -v ^WP42 \
| grep -v ^WP6 \
| grep -v ^WPG \
| grep -v ^WPS \
| grep -v WPX \
> unusedcode.easy
check: dev-install subsequentcheck
subsequentcheck :| $(if $(filter-out subsequentcheck,$(MAKECMDGOALS)),dev-install)
$(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) -f Makefile.post $@
unitcheck:
$(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) -f Makefile.post $@
slowcheck:
$(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) -f Makefile.post $@
debugrun:
$(GNUMAKE) -j $(GMAKE_PARALLELISM) $(GMAKE_OPTIONS) -f Makefile.post $@
endif # not clean or distclean
# vim: set noet sw=4 ts=4: