summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2009-06-30 10:31:37 +0200
committerJan Holesovsky <kendy@suse.cz>2009-06-30 10:31:37 +0200
commit4a5d2f4396b359c7a06b7535af14a3e7cfb5641e (patch)
treedb92fa08e637fd40212ef3402b2c7198d748d7dd
parentf2f76777c03d9b290ff64cd4c960b41b5122b169 (diff)
Split build: Changes to make URE building.
The most important is the introduction of 'BUILDSOLVER' environment variable that sets a 'local' solver - local to the repository that is being built. * Makefile.am: Cosmetic improvements. * build/src/buildenv-common: A script with environment common to all the repositories (but bootstrap itself). * set_soenv.in: Add possibility to force SOLARVERSION and SOLENV. * solenv/bin/deliver.pl: Honor BUILDSOLVER. * solenv/inc/settings.mk: -"- * solenv/inc/target.mk: -"-
-rw-r--r--Makefile.am11
-rw-r--r--build/src/buildenv-common23
-rw-r--r--set_soenv.in10
-rwxr-xr-xsolenv/bin/deliver.pl7
-rw-r--r--solenv/inc/settings.mk14
-rw-r--r--solenv/inc/target.mk12
6 files changed, 63 insertions, 14 deletions
diff --git a/Makefile.am b/Makefile.am
index bbb982d21..4f3136dc3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -30,11 +30,12 @@ distclean-local:
( . ./Linux*Env.Set.sh ; dmake distclean )
install-data-local: $(stampdir)/all
- mkdir -p $(DESTDIR)$(ooo_prefix)
- mkdir -p $(DESTDIR)$(pkgconfigdir)
- cp -a $(top_builddir)/solenv $(DESTDIR)$(ooo_prefix)/
- cp -a $(top_builddir)/solver $(DESTDIR)$(ooo_prefix)/
- $(INSTALL_SCRIPT) $(top_builddir)/Linux*Env.Set.sh $(DESTDIR)$(solverdir)/
+ $(MKDIR_P) $(DESTDIR)$(ooo_prefix)
+ $(MKDIR_P) $(DESTDIR)$(pkgconfigdir)
+ cp -r $(top_builddir)/solenv $(DESTDIR)$(ooo_prefix)/
+ cp -r $(top_builddir)/solver $(DESTDIR)$(ooo_prefix)/
+ $(INSTALL_DATA) $(top_builddir)/Linux*Env.Set.sh $(DESTDIR)$(solverdir)/
+ $(INSTALL_DATA) $(top_builddir)/build/src/buildenv-common $(DESTDIR)$(solverdir)/
$(INSTALL_DATA) $(top_builddir)/build/src/OpenOffice.org-bootstrap.pc $(DESTDIR)$(pkgconfigdir)/
$(stampdir)/all: $(stampdir)/bootstrap
diff --git a/build/src/buildenv-common b/build/src/buildenv-common
new file mode 100644
index 000000000..f7601a950
--- /dev/null
+++ b/build/src/buildenv-common
@@ -0,0 +1,23 @@
+# Common build environment setup that is supposed to be called from every
+# project
+#
+# The following env. variables have to be setup before sourcing this:
+# ooo_prefix, buildsolverdir
+
+# more to define
+
+solenvdir="$ooo_prefix/solenv"
+
+# setting the environment itself
+
+export FORCE_SOLVER="$solverdir"
+export FORCE_SOLARENV="$solenvdir"
+
+. "$solverdir"/Linux*Env.Set.sh
+
+export SOLARLIB="$SOLARLIB -L$buildsolverdir/$UPD/$INPATH/lib"
+export SOLARINC="$SOLARINC -I$buildsolverdir/$UPD/$INPATH/inc"
+export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$buildsolverdir/$UPD/$INPATH/lib"
+export PATH="$PATH:$buildsolverdir/$UPD/$INPATH/bin"
+export CLASSPATH="$CLASSPATH:$buildsolverdir/$UPD/$INPATH/bin"
+export BUILDSOLVER="$buildsolverdir"
diff --git a/set_soenv.in b/set_soenv.in
index 1df155d9d..183799568 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -951,7 +951,7 @@ if ($STLPORT4 ne $no_stl) {
} else {
$ps_STLPORT_LIB = "";
$L_STLPORT_LIB = "";
- $STLPORT_stlport = $I.$SRC_ROOT.$SOLVER.$ds.$UPD.$ds.$INPATH.$INC.$ds."stl";
+ $STLPORT_stlport = "";
$STLPORT_inc_stlport = "";
}
@@ -1008,17 +1008,17 @@ $DEVROOT = '$SRC_ROOT';
# Set solenv and solver to given or default values.
# Location of the solenv tree.
if ('@LOCAL_SOLENV@' eq "DEFAULT")
-{ $SOLARENV = $SRC_ROOT.$SOLENV;
+{ $SOLARENV = '${FORCE_SOLARENV:-'.$SRC_ROOT.$SOLENV.'}';
}
else
-{ $SOLARENV = PathFormat('@LOCAL_SOLENV@');
+{ $SOLARENV = '${FORCE_SOLARENV:-'.PathFormat('@LOCAL_SOLENV@').'}';
}
# Location of the solver tree.
if ('@LOCAL_SOLVER@' eq "DEFAULT")
-{ $SOLARVER = $SRC_ROOT.$SOLVER.$ds.$UPD;
+{ $SOLARVER = '${FORCE_SOLVER:-'.$SRC_ROOT.$SOLVER.'}'.$ds.$UPD;
}
else
-{ $SOLARVER = PathFormat('@LOCAL_SOLVER@').$ds.$UPD;
+{ $SOLARVER = '${FORCE_SOLVER:-'.PathFormat('@LOCAL_SOLVER@').'}'.$ds.$UPD;
}
#Location of Solar version.
$SOLARVERSION = '$SOLARVER';
diff --git a/solenv/bin/deliver.pl b/solenv/bin/deliver.pl
index b165e37e6..05e2e6553 100755
--- a/solenv/bin/deliver.pl
+++ b/solenv/bin/deliver.pl
@@ -494,7 +494,12 @@ sub init_globals
}
# Do we have common trees?
- if ( defined($ENV{'common_build'}) && $ENV{'common_build'} eq 'TRUE' ) {
+ if ( defined($ENV{'BUILDSOLVER'}) && $ENV{'BUILDSOLVER'} ne '' )
+ {
+ $dest = $ENV{'BUILDSOLVER'}.'/'.$ENV{'UPD'}.'/'.$ENV{'INPATH'};
+ $common_dest = $dest;
+ }
+ elsif ( defined($ENV{'common_build'}) && $ENV{'common_build'} eq 'TRUE' ) {
$common_build = 1;
if ((defined $common_outdir) && ($common_outdir ne "")) {
$common_outdir = $common_outdir . ".pro" if $inpath =~ /\.pro$/;
diff --git a/solenv/inc/settings.mk b/solenv/inc/settings.mk
index 94623d259..45242fadd 100644
--- a/solenv/inc/settings.mk
+++ b/solenv/inc/settings.mk
@@ -817,6 +817,17 @@ SOLARCOMMONRESDIR=$(SOLARRESDIR)
SOLARCOMMONPCKDIR=$(SOLARPCKDIR)
.ENDIF
+# local solver for building
+.IF "$(BUILDSOLVER)"==""
+BUILDSOLARINCDIR=$(SOLARINCDIR)
+BUILDSOLARBINDIR=$(SOLARBINDIR)
+BUILDSOLARIDLDIR=$(SOLARIDLDIR)
+.ELSE
+BUILDSOLARINCDIR=$(BUILDSOLVER)$/$(UPD)$/$(INPATH)$/inc$(EXT_UPDMINOR)
+BUILDSOLARBINDIR=$(BUILDSOLVER)$/$(UPD)$/$(INPATH)$/bin$(EXT_UPDMINOR)
+BUILDSOLARIDLDIR=$(BUILDSOLVER)$/$(UPD)$/$(INPATH)$/idl$(EXT_UPDMINOR)
+.ENDIF
+
.IF "$(PRE)"==""
#JARDIR=$(CLASSDIR)
JARDIR=$(OUT)$/class
@@ -869,6 +880,9 @@ UNOIDLDEPFLAGS=-Mdepend=$(SOLARVER)
UNOIDLINC!:=-I$(PRE)$/idl $(UNOIDLINC)
.ENDIF
UNOIDLINC+=-I. -I.. -I$(PRJ) -I$(PRJ)$/inc -I$(PRJ)$/$(INPATH)$/idl -I$(OUT)$/inc -I$(SOLARIDLDIR) -I$(SOLARINCDIR)
+.IF "$(BUILDSOLARIDLDIR)"!="$(SOLARIDLDIR)"
+UNOIDLINC+=-I$(BUILDSOLARIDLDIR)
+.ENDIF
CDEFS= -D$(OS) -D$(GUI) -D$(GVER) -D$(COM) -D$(CVER) -D$(CPUNAME)
diff --git a/solenv/inc/target.mk b/solenv/inc/target.mk
index 61de65158..10808ec96 100644
--- a/solenv/inc/target.mk
+++ b/solenv/inc/target.mk
@@ -59,16 +59,19 @@ INCPOST*=.
ENVINCPRE+=-I$(PRE)$/inc
.ENDIF # "$(PRE)"!=""
.IF "$(BOOTSTRAP_SERVICE)"!="TRUE" && "$(NO_OFFUH)"==""
-UNOINCLUDES=$(SOLARINCDIR)$/offuh
+UNOINCLUDES=-I$(SOLARINCDIR)$/offuh
+.IF "$(BUILDSOLARINCDIR)"!="$(SOLARINCDIR)"
+UNOINCLUDES+=-I$(BUILDSOLARINCDIR)$/offuh
+.ENDIF # "$(BUILDSOLARINCDIR)"!="$(SOLARINCDIR)"
.ENDIF # "$(BOOTSTRAP_SERVICE)"!="TRUE" && "$(NO_OFFUH)"==""
SOLARINC+=$(JDKINCS)
# make sure INCLUDE isn't set
INCLUDE:=
.EXPORT : INCLUDE
.IF "$(PRJINC)"!=""
-INCLUDE!:=-I. $(ENVINCPRE) $(INCPRE:^"-I":s/-I-I/-I/) -I$(INCLOCAL) $(INCLOCPRJ:^"-I":s/-I-I/-I/) -I$(INCPCH) -I$(INC) -I$(INCGUI) -I$(INCCOM) $(SOLARINC) $(null,$(UNOINCLUDES) $(NULL) -I$(UNOINCLUDES)) -I$(INCEXT) -I$(PRJ)$/res -I$(INCPOST)
+INCLUDE!:=-I. $(ENVINCPRE) $(INCPRE:^"-I":s/-I-I/-I/) -I$(INCLOCAL) $(INCLOCPRJ:^"-I":s/-I-I/-I/) -I$(INCPCH) -I$(INC) -I$(INCGUI) -I$(INCCOM) $(SOLARINC) $(UNOINCLUDES) -I$(INCEXT) -I$(PRJ)$/res -I$(INCPOST)
.ELSE # "$(PRJINC)"!=""
-INCLUDE!:=-I. $(ENVINCPRE) $(INCPRE:^"-I":s/-I-I/-I/) -I$(INCLOCAL) -I$(INCPCH) -I$(INC) -I$(INCGUI) -I$(INCCOM) $(SOLARINC) $(null,$(UNOINCLUDES) $(NULL) -I$(UNOINCLUDES)) -I$(INCEXT) -I$(PRJ)$/res -I$(INCPOST)
+INCLUDE!:=-I. $(ENVINCPRE) $(INCPRE:^"-I":s/-I-I/-I/) -I$(INCLOCAL) -I$(INCPCH) -I$(INC) -I$(INCGUI) -I$(INCCOM) $(SOLARINC) -I$(UNOINCLUDES) -I$(INCEXT) -I$(PRJ)$/res -I$(INCPOST)
.ENDIF # "$(PRJINC)"!=""
INCLUDE_C=$(subst,$/stl$(SPACECHAR),dont_use_stl$(SPACECHAR) $(INCLUDE))
.EXPORT : LIB
@@ -217,6 +220,9 @@ DEPIDLFILES:=$(foreach,i,$(IDLFILES) $(!null,$(shell @$(FIND) . -name $i -print)
LOCALJARS:=$(foreach,i,$(shell @@-cd $(JARDIR) && ls -1 $(JARFILES) ) $(JARDIR)$/$i)
NEWCLASS:=$(LOCALJARS)
NEWCLASS+:=$(foreach,i,$(JARFILES) $(eq,$(LOCALJARS),$(subst,$i, $(LOCALJARS)) $(SOLARBINDIR)$/$i $(NULL)))
+.IF "$(SOLARBINDIR)"!="$(BUILDSOLARBINDIR)"
+NEWCLASS+:=$(foreach,i,$(JARFILES) $(eq,$(LOCALJARS),$(subst,$i, $(LOCALJARS)) $(BUILDSOLARBINDIR)$/$i $(NULL)))
+.ENDIF # "$(SOLARBINDIR)"!="$(BUILDSOLARBINDIR)"
.ENDIF # "$(JARFILES)"!=""
.IF "$(EXTRAJARFILES)"!=""
NEWCLASS+=$(foreach,i,$(EXTRAJARFILES) $(COMMON_BUILD_TOOLS)$/$i)