office-gobmx/Makefile.in

177 lines
5.2 KiB
Makefile
Raw Normal View History

# @configure_input@
2010-08-18 10:48:07 -05:00
SHELL=/usr/bin/env bash
2010-08-18 10:48:07 -05:00
ifeq (@CROSS_COMPILING@,YES)
CROSS_TOOLSET_RULE:=cross-build-toolset
else
CROSS_TOOLSET_RULE:=
endif
ifeq ($(filter all check unitcheck,$(MAKECMDGOALS)),)
gb_MAKETARGET=build
else
# fail early
gb_MAKETARGET=all
endif
.PHONY : build dev-install all cross-build-toolset install distro-pack-install clean clean-host clean-build distclean findunusedcode
2011-09-16 11:48:08 -05:00
all: build unitcheck
@echo
@echo "LibreOffice build succesfully finished :-)"
@echo
ifeq (@CROSS_COMPILING@,YES)
@echo "Please consult README.cross how to install it."
else
@echo "To install, issue: @GNUMAKE@ install"
@echo "Developers might prefer this way: @GNUMAKE@ dev-install -o build"
@echo "To run smoketest, issue: @GNUMAKE@ check"
endif
@echo
build: Makefile dmake/dmake@EXEEXT_FOR_BUILD@ src.downloaded $(CROSS_TOOLSET_RULE)
2011-07-24 17:02:17 -05:00
@. ./Env.Host.sh && \
cd instsetoo_native && \
gb_MAKETARGET=$(gb_MAKETARGET) build.pl -P@BUILD_NCPUS@ --all -- -P@BUILD_MAX_JOBS@
2011-09-16 11:48:08 -05:00
dev-install: build
@. ./Env.Host.sh && \
cd smoketestoo_native && \
build.pl -P@BUILD_NCPUS@ -- -P@BUILD_MAX_JOBS@ && \
rm -f "@abs_builddir@"/install && \
ln -s "$$SOLARVER/$$INPATH"/installation/opt/ \
"@abs_builddir@"/install && \
printf '\n' && \
printf \
'\nDeveloper installation finished, you can now execute:\n\n' \
&& \
2011-11-25 08:14:09 -06:00
if test `uname -s` = Linux; then \
printf 'make debugrun\n'; \
elif test `uname -s` = Darwin; then \
printf 'open %s/install/LibreOffice.app\n' "@abs_builddir@"; \
else \
printf 'cd %s/install/program\n. ./ooenv\n./soffice.bin\n' \
"@abs_builddir@"; \
fi
2011-09-16 11:48:08 -05:00
debugrun:
2011-11-25 09:41:28 -06:00
@ @GNUMAKE@ -f $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/GNUmakefile.mk debugrun
2011-11-25 08:14:09 -06:00
2011-09-16 11:48:08 -05:00
check : allcheck
@true
2011-09-16 11:48:08 -05:00
%check:
2011-11-25 10:17:19 -06:00
@ @GNUMAKE@ -f $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/GNUmakefile.mk -r \
2011-11-25 09:41:28 -06:00
$(if @VERBOSE@,,-s) --jobs="$(if \
$(CHECK_PARALLELISM),$(CHECK_PARALLELISM),@GMAKE_PARALLELISM@)" \
$(patsubst allcheck,check,$@)
2011-09-16 11:48:08 -05:00
cross-build-toolset:
@. ./Env.Build.sh && \
cd cross_toolset && \
build.pl -P@BUILD_NCPUS@ --all -- -P@BUILD_MAX_JOBS@
Rehash of cross-compilation ideas Like in my previous plan, when cross-compiling we run the same configure script separately for a native build configuration on the build platform, in a temporary subdirectory. Now use a fixed name "CONF-FOR-BUILD" for that subdirectory, so that it is easy to edit out that path component from those build environment variables that contain it. Pass more of the native build environment variables up to the main configure and propagate those to the build environment suffixed with _FOR_BUILD: INPATH, OUTPATH OUTDIR, PATH, SOLARINC, SOLARLIB, WORKDIR. Whether these all will actually be needed remains to be seen, the set can be reduced later. The environment setting file (*Env.Set.sh) for the native build is copied here to the top directory under the name Env.Build.sh, and the environment variables set in it that contain pathnames are modified to point directly to this top directory, not the temporary CONF-FOR-BUILD subdirectory. When doing a cross-compiling build, we first do a build of the necessary build-time tools for the build platform. This is done in the same source tree. As the directories where build results are stored include the platform specification (OUTPATH or in some cases INPATH), there should be no clashes. Don't run the download script from ./bootstrap(.1). We are running it from Makefile already anyway often enough. This could also do with some clean-up; the ./g -f clone phase is a bit slow, I am not sure if it really is necessary every time? Also, we should not overwrite ooo.lst if its contents isn't changing. Use INPATH_FOR_BUILD in SOLARBINDIR so that the self-built tools like idlc that we run are for the build platform, not the host platform. Attempt to get rid of the makefile.rc and makefile.mk files. Surely it should be enough with just Makefile(.in) (and then GNUmakefile.mk for its own so far special gbuild purposes). Instead of invoking dmake to do "clean" or "distclean" from Makefile(.in), we already just do the same directly in Makefile(.in). This way we don't need to first build dmake in order to be able to do a make clean, which will then finally clean out dmake again;) Ideally I would like to get rid of bootstrap(.1), too. It should be possible to merge its tasks into configure(.in) or Makefile(.in) as appropriate. And actually, maybe also what set_soenv(.in) does could well be merged into configure(.in)?
2011-06-04 06:59:34 -05:00
2011-09-16 11:48:08 -05:00
install: build
2011-07-24 17:02:17 -05:00
@. ./Env.Host.sh && \
echo "Installing in @INSTALLDIR@..." && \
ooinstall "@INSTALLDIR@" && \
echo "" && \
echo "Installation finished, you can now execute:" && \
2011-09-20 11:12:13 -05:00
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
distclean: clean
Rehash of cross-compilation ideas Like in my previous plan, when cross-compiling we run the same configure script separately for a native build configuration on the build platform, in a temporary subdirectory. Now use a fixed name "CONF-FOR-BUILD" for that subdirectory, so that it is easy to edit out that path component from those build environment variables that contain it. Pass more of the native build environment variables up to the main configure and propagate those to the build environment suffixed with _FOR_BUILD: INPATH, OUTPATH OUTDIR, PATH, SOLARINC, SOLARLIB, WORKDIR. Whether these all will actually be needed remains to be seen, the set can be reduced later. The environment setting file (*Env.Set.sh) for the native build is copied here to the top directory under the name Env.Build.sh, and the environment variables set in it that contain pathnames are modified to point directly to this top directory, not the temporary CONF-FOR-BUILD subdirectory. When doing a cross-compiling build, we first do a build of the necessary build-time tools for the build platform. This is done in the same source tree. As the directories where build results are stored include the platform specification (OUTPATH or in some cases INPATH), there should be no clashes. Don't run the download script from ./bootstrap(.1). We are running it from Makefile already anyway often enough. This could also do with some clean-up; the ./g -f clone phase is a bit slow, I am not sure if it really is necessary every time? Also, we should not overwrite ooo.lst if its contents isn't changing. Use INPATH_FOR_BUILD in SOLARBINDIR so that the self-built tools like idlc that we run are for the build platform, not the host platform. Attempt to get rid of the makefile.rc and makefile.mk files. Surely it should be enough with just Makefile(.in) (and then GNUmakefile.mk for its own so far special gbuild purposes). Instead of invoking dmake to do "clean" or "distclean" from Makefile(.in), we already just do the same directly in Makefile(.in). This way we don't need to first build dmake in order to be able to do a make clean, which will then finally clean out dmake again;) Ideally I would like to get rid of bootstrap(.1), too. It should be possible to merge its tasks into configure(.in) or Makefile(.in) as appropriate. And actually, maybe also what set_soenv(.in) does could well be merged into configure(.in)?
2011-06-04 06:59:34 -05:00
ifeq (@BUILD_DMAKE@,YES)
-test -f dmake/Makefile && $(MAKE) -C dmake distclean
Rehash of cross-compilation ideas Like in my previous plan, when cross-compiling we run the same configure script separately for a native build configuration on the build platform, in a temporary subdirectory. Now use a fixed name "CONF-FOR-BUILD" for that subdirectory, so that it is easy to edit out that path component from those build environment variables that contain it. Pass more of the native build environment variables up to the main configure and propagate those to the build environment suffixed with _FOR_BUILD: INPATH, OUTPATH OUTDIR, PATH, SOLARINC, SOLARLIB, WORKDIR. Whether these all will actually be needed remains to be seen, the set can be reduced later. The environment setting file (*Env.Set.sh) for the native build is copied here to the top directory under the name Env.Build.sh, and the environment variables set in it that contain pathnames are modified to point directly to this top directory, not the temporary CONF-FOR-BUILD subdirectory. When doing a cross-compiling build, we first do a build of the necessary build-time tools for the build platform. This is done in the same source tree. As the directories where build results are stored include the platform specification (OUTPATH or in some cases INPATH), there should be no clashes. Don't run the download script from ./bootstrap(.1). We are running it from Makefile already anyway often enough. This could also do with some clean-up; the ./g -f clone phase is a bit slow, I am not sure if it really is necessary every time? Also, we should not overwrite ooo.lst if its contents isn't changing. Use INPATH_FOR_BUILD in SOLARBINDIR so that the self-built tools like idlc that we run are for the build platform, not the host platform. Attempt to get rid of the makefile.rc and makefile.mk files. Surely it should be enough with just Makefile(.in) (and then GNUmakefile.mk for its own so far special gbuild purposes). Instead of invoking dmake to do "clean" or "distclean" from Makefile(.in), we already just do the same directly in Makefile(.in). This way we don't need to first build dmake in order to be able to do a make clean, which will then finally clean out dmake again;) Ideally I would like to get rid of bootstrap(.1), too. It should be possible to merge its tasks into configure(.in) or Makefile(.in) as appropriate. And actually, maybe also what set_soenv(.in) does could well be merged into configure(.in)?
2011-06-04 06:59:34 -05:00
endif
rm -rf Env.Host.sh Makefile aclocal.m4 autogen.lastrun autom4te.cache \
bin/repo-list build_env config.log config.status configure \
desktop/scripts/soffice.sh ooo.lst post_download post_download.log \
set_soenv set_soenv.last set_soenv.stamp src.downloaded warn
clean: clean-host clean-build
clean-host:
2011-07-24 17:02:17 -05:00
. ./Env.Host.sh && \
Rehash of cross-compilation ideas Like in my previous plan, when cross-compiling we run the same configure script separately for a native build configuration on the build platform, in a temporary subdirectory. Now use a fixed name "CONF-FOR-BUILD" for that subdirectory, so that it is easy to edit out that path component from those build environment variables that contain it. Pass more of the native build environment variables up to the main configure and propagate those to the build environment suffixed with _FOR_BUILD: INPATH, OUTPATH OUTDIR, PATH, SOLARINC, SOLARLIB, WORKDIR. Whether these all will actually be needed remains to be seen, the set can be reduced later. The environment setting file (*Env.Set.sh) for the native build is copied here to the top directory under the name Env.Build.sh, and the environment variables set in it that contain pathnames are modified to point directly to this top directory, not the temporary CONF-FOR-BUILD subdirectory. When doing a cross-compiling build, we first do a build of the necessary build-time tools for the build platform. This is done in the same source tree. As the directories where build results are stored include the platform specification (OUTPATH or in some cases INPATH), there should be no clashes. Don't run the download script from ./bootstrap(.1). We are running it from Makefile already anyway often enough. This could also do with some clean-up; the ./g -f clone phase is a bit slow, I am not sure if it really is necessary every time? Also, we should not overwrite ooo.lst if its contents isn't changing. Use INPATH_FOR_BUILD in SOLARBINDIR so that the self-built tools like idlc that we run are for the build platform, not the host platform. Attempt to get rid of the makefile.rc and makefile.mk files. Surely it should be enough with just Makefile(.in) (and then GNUmakefile.mk for its own so far special gbuild purposes). Instead of invoking dmake to do "clean" or "distclean" from Makefile(.in), we already just do the same directly in Makefile(.in). This way we don't need to first build dmake in order to be able to do a make clean, which will then finally clean out dmake again;) Ideally I would like to get rid of bootstrap(.1), too. It should be possible to merge its tasks into configure(.in) or Makefile(.in) as appropriate. And actually, maybe also what set_soenv(.in) does could well be merged into configure(.in)?
2011-06-04 06:59:34 -05:00
rm -rf */$$INPATH && \
rm -rf install
clean-build:
ifeq (@BUILD_DMAKE@,YES)
2011-07-24 17:02:17 -05:00
. ./Env.Host.sh && \
(if [ -f dmake/Makefile ] ; then $$GNUMAKE -C dmake clean; fi) && \
rm -f solenv/*/bin/dmake*
endif
Rehash of cross-compilation ideas Like in my previous plan, when cross-compiling we run the same configure script separately for a native build configuration on the build platform, in a temporary subdirectory. Now use a fixed name "CONF-FOR-BUILD" for that subdirectory, so that it is easy to edit out that path component from those build environment variables that contain it. Pass more of the native build environment variables up to the main configure and propagate those to the build environment suffixed with _FOR_BUILD: INPATH, OUTPATH OUTDIR, PATH, SOLARINC, SOLARLIB, WORKDIR. Whether these all will actually be needed remains to be seen, the set can be reduced later. The environment setting file (*Env.Set.sh) for the native build is copied here to the top directory under the name Env.Build.sh, and the environment variables set in it that contain pathnames are modified to point directly to this top directory, not the temporary CONF-FOR-BUILD subdirectory. When doing a cross-compiling build, we first do a build of the necessary build-time tools for the build platform. This is done in the same source tree. As the directories where build results are stored include the platform specification (OUTPATH or in some cases INPATH), there should be no clashes. Don't run the download script from ./bootstrap(.1). We are running it from Makefile already anyway often enough. This could also do with some clean-up; the ./g -f clone phase is a bit slow, I am not sure if it really is necessary every time? Also, we should not overwrite ooo.lst if its contents isn't changing. Use INPATH_FOR_BUILD in SOLARBINDIR so that the self-built tools like idlc that we run are for the build platform, not the host platform. Attempt to get rid of the makefile.rc and makefile.mk files. Surely it should be enough with just Makefile(.in) (and then GNUmakefile.mk for its own so far special gbuild purposes). Instead of invoking dmake to do "clean" or "distclean" from Makefile(.in), we already just do the same directly in Makefile(.in). This way we don't need to first build dmake in order to be able to do a make clean, which will then finally clean out dmake again;) Ideally I would like to get rid of bootstrap(.1), too. It should be possible to merge its tasks into configure(.in) or Makefile(.in) as appropriate. And actually, maybe also what set_soenv(.in) does could well be merged into configure(.in)?
2011-06-04 06:59:34 -05:00
ifeq (@CROSS_COMPILING@,YES)
2011-07-24 17:02:17 -05:00
. ./Env.Host.sh && \
rm -rf */$$INPATH_FOR_BUILD
Rehash of cross-compilation ideas Like in my previous plan, when cross-compiling we run the same configure script separately for a native build configuration on the build platform, in a temporary subdirectory. Now use a fixed name "CONF-FOR-BUILD" for that subdirectory, so that it is easy to edit out that path component from those build environment variables that contain it. Pass more of the native build environment variables up to the main configure and propagate those to the build environment suffixed with _FOR_BUILD: INPATH, OUTPATH OUTDIR, PATH, SOLARINC, SOLARLIB, WORKDIR. Whether these all will actually be needed remains to be seen, the set can be reduced later. The environment setting file (*Env.Set.sh) for the native build is copied here to the top directory under the name Env.Build.sh, and the environment variables set in it that contain pathnames are modified to point directly to this top directory, not the temporary CONF-FOR-BUILD subdirectory. When doing a cross-compiling build, we first do a build of the necessary build-time tools for the build platform. This is done in the same source tree. As the directories where build results are stored include the platform specification (OUTPATH or in some cases INPATH), there should be no clashes. Don't run the download script from ./bootstrap(.1). We are running it from Makefile already anyway often enough. This could also do with some clean-up; the ./g -f clone phase is a bit slow, I am not sure if it really is necessary every time? Also, we should not overwrite ooo.lst if its contents isn't changing. Use INPATH_FOR_BUILD in SOLARBINDIR so that the self-built tools like idlc that we run are for the build platform, not the host platform. Attempt to get rid of the makefile.rc and makefile.mk files. Surely it should be enough with just Makefile(.in) (and then GNUmakefile.mk for its own so far special gbuild purposes). Instead of invoking dmake to do "clean" or "distclean" from Makefile(.in), we already just do the same directly in Makefile(.in). This way we don't need to first build dmake in order to be able to do a make clean, which will then finally clean out dmake again;) Ideally I would like to get rid of bootstrap(.1), too. It should be possible to merge its tasks into configure(.in) or Makefile(.in) as appropriate. And actually, maybe also what set_soenv(.in) does could well be merged into configure(.in)?
2011-06-04 06:59:34 -05:00
endif
dmake/dmake@EXEEXT_FOR_BUILD@:
Rehash of cross-compilation ideas Like in my previous plan, when cross-compiling we run the same configure script separately for a native build configuration on the build platform, in a temporary subdirectory. Now use a fixed name "CONF-FOR-BUILD" for that subdirectory, so that it is easy to edit out that path component from those build environment variables that contain it. Pass more of the native build environment variables up to the main configure and propagate those to the build environment suffixed with _FOR_BUILD: INPATH, OUTPATH OUTDIR, PATH, SOLARINC, SOLARLIB, WORKDIR. Whether these all will actually be needed remains to be seen, the set can be reduced later. The environment setting file (*Env.Set.sh) for the native build is copied here to the top directory under the name Env.Build.sh, and the environment variables set in it that contain pathnames are modified to point directly to this top directory, not the temporary CONF-FOR-BUILD subdirectory. When doing a cross-compiling build, we first do a build of the necessary build-time tools for the build platform. This is done in the same source tree. As the directories where build results are stored include the platform specification (OUTPATH or in some cases INPATH), there should be no clashes. Don't run the download script from ./bootstrap(.1). We are running it from Makefile already anyway often enough. This could also do with some clean-up; the ./g -f clone phase is a bit slow, I am not sure if it really is necessary every time? Also, we should not overwrite ooo.lst if its contents isn't changing. Use INPATH_FOR_BUILD in SOLARBINDIR so that the self-built tools like idlc that we run are for the build platform, not the host platform. Attempt to get rid of the makefile.rc and makefile.mk files. Surely it should be enough with just Makefile(.in) (and then GNUmakefile.mk for its own so far special gbuild purposes). Instead of invoking dmake to do "clean" or "distclean" from Makefile(.in), we already just do the same directly in Makefile(.in). This way we don't need to first build dmake in order to be able to do a make clean, which will then finally clean out dmake again;) Ideally I would like to get rid of bootstrap(.1), too. It should be possible to merge its tasks into configure(.in) or Makefile(.in) as appropriate. And actually, maybe also what set_soenv(.in) does could well be merged into configure(.in)?
2011-06-04 06:59:34 -05:00
./bootstrap
src.downloaded: ooo.lst download
ifeq (@DO_FETCH_TARBALLS@,YES)
2011-07-24 17:02:17 -05:00
@. ./Env.Host.sh && \
$$SRC_ROOT/download $$SRC_ROOT/ooo.lst && touch $@
else
2011-06-16 00:08:35 -05:00
@echo "Automatic fetching of external tarballs is disabled."
endif
fetch: src.downloaded
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean)
Makefile: autogen.lastrun configure.in ooo.lst.in set_soenv.in Makefile.in
./autogen.sh
endif
endif
id:
2011-07-24 17:02:17 -05:00
@. ./Env.Host.sh && \
create-ids
tags:
2011-07-24 17:02:17 -05:00
@. ./Env.Host.sh && \
create-tags
docs:
2011-07-24 17:02:17 -05:00
@. ./Env.Host.sh && \
mkdocs.sh $$SRC_ROOT/docs $$SOLARENV/inc/doxygen.cfg
2011-06-16 03:11:06 -05:00
findunusedcode:
# experimental callcatcher target
# http://www.skynet.ie/~caolan/Packages/callcatcher.html
@which callcatcher > /dev/null 2>&1 || \
2011-06-30 05:01:43 -05:00
(echo "callcatcher not installed" && false)
2011-07-24 17:02:17 -05:00
@. ./Env.Host.sh && \
2011-09-28 17:47:40 -05:00
mkdir -p $$SRC_ROOT/solenv/callcatcher/bin && \
2011-09-20 16:39:32 -05:00
ln -sf $$SRC_ROOT/solenv/$$INPATH/bin/dmake \
$$SRC_ROOT/solenv/callcatcher/bin/dmake && \
2011-07-24 17:02:17 -05:00
source <(sed -e s,$$INPATH,callcatcher,g ./Env.Host.sh) && \
2011-06-30 05:01:43 -05:00
. ./solenv/bin/callcatchEnv.Set.sh && \
cd instsetoo_native && \
build.pl -P@BUILD_NCPUS@ --all -- -P@BUILD_MAX_JOBS@
2011-07-24 17:02:17 -05:00
@. ./Env.Host.sh && \
source <(sed -e s,$$INPATH,callcatcher,g ./Env.Host.sh) && \
2011-06-30 05:01:43 -05:00
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
2011-09-13 09:37:32 -05:00
@grep ::.*\( unusedcode.all | grep -v ^cppu:: > unusedcode.easy
2011-09-16 11:48:08 -05:00
#as long as we are not completely gbuildified we need to explicitly depend on the build/install
unitcheck: build
subsequentcheck: dev-install
allcheck : dev-install
2011-11-25 09:44:45 -06:00
#debugrun : dev-install # disabled for now, this dep seems to poison the debugrun !?