summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2011-06-04 14:59:34 +0300
committerTor Lillqvist <tml@iki.fi>2011-06-04 19:08:44 +0300
commitf206336a251e2433110962cfa49c61ed7043bd28 (patch)
tree4ac60d905336d5d5a11ba01cd4f5311c613f7cdd /Makefile.in
parenta7ce3066cd179606584f8a203cbf2d1214732928 (diff)
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)?
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in40
1 files changed, 31 insertions, 9 deletions
diff --git a/Makefile.in b/Makefile.in
index 47d2e593e8e0..24c60a91e051 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -12,11 +12,22 @@ prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
+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.Set.sh && \
cd instsetoo_native && \
build.pl $(GBUILD_OPT) -P@BUILD_NCPUS@ --all -- -P@BUILD_MAX_JOBS@
+ifeq (@CROSS_COMPILING@,YES)
+cross-build-toolset:
+ . ./Env.Build.sh && \
+ (cd idlc && build.pl $(GBUILD_OPT) -P@BUILD_NCPUS@ --all -- -P@BUILD_MAX_JOBS@ && deliver.pl) && \
+ (cd icu && build.pl $(GBUILD_OPT) -P@BUILD_NCPUS@ --all -- -P@BUILD_MAX_JOBS@)
+endif
+
install:
@. ./*Env.Set.sh && \
echo "Installing in $${libdir:-@libdir@}/@INSTALL_DIRNAME@..." && \
@@ -41,18 +52,29 @@ dev-install:
echo "./soffice.bin"; \
fi
-distclean: dmake/dmake@EXEEXT_FOR_BUILD@
- @. ./*Env.Set.sh && \
- dmake distclean
+distclean:
+ -rm config.cache
+ -rm config.log
+ifeq (@BUILD_DMAKE@,YES)
+ -$(GNUMAKE) -C dmake distclean
+endif
-clean: dmake/dmake@EXEEXT_FOR_BUILD@
- @. ./*Env.Set.sh && \
- dmake clean && \
- if [ -n "$$USE_GMAKE" ] ; then make -f GNUmakefile.mk -sr clean ; fi
+clean:
+ . ./*Env.Set.sh && \
+ rm -rf */$$INPATH && \
+ rm -rf solver/*/$$INPATH && \
+ rm -rf install && \
+ $$GNUMAKE -C dmake clean && \
+ rm -f solenv/*/bin/dmake* && \
+ $$GNUMAKE -f GNUmakefile.mk -sr clean
+ifeq (@CROSS_COMPILING@,YES)
+ . ./*Env.Set.sh && \
+ rm -rf */$$INPATH_FOR_BUILD && \
+ rm -rf solver/*/$$INPATH_FOR_BUILD
+endif
dmake/dmake@EXEEXT_FOR_BUILD@:
- @. ./*Env.Set.sh && \
- ./bootstrap
+ ./bootstrap
src.downloaded: ooo.lst download
@. ./*Env.Set.sh && \