[Libreoffice-commits] .: Branch 'feature/gnumake4' - 6 commits - bootstrap.1 GNUmakefile scp2/source set_soenv.in solenv/gbuild source_soenv.sh
Bjoern Michaelsen
bmichaelsen at kemper.freedesktop.org
Fri Jun 17 09:38:10 PDT 2011
GNUmakefile | 12 +++
bootstrap.1 | 17 +++++
scp2/source/base/file_base.scp | 4 -
set_soenv.in | 45 --------------
solenv/gbuild/platform/linux.mk | 4 +
source_soenv.sh | 124 ++++++++++++++++++++++++++++++++++++++++
6 files changed, 159 insertions(+), 47 deletions(-)
New commits:
commit c199efc3a5e6dd27aac4bba3a74afcb59a4a7613
Author: Michael Stahl <mst at openoffice.org>
Date: Thu Apr 28 10:12:41 2011 +0000
gnumake4: #i117687#: source_soenv.sh: special treatment for x86_64 darwin [hg:4347402b512b]
diff --git a/source_soenv.sh b/source_soenv.sh
index 2a0d9fe..f423a58 100644
--- a/source_soenv.sh
+++ b/source_soenv.sh
@@ -101,7 +101,8 @@ else
amd64-*-freebsd*)
. ./FreeBSDAMDEnv.Set.sh
;;
- i[3456]86-*-darwin*)
+ # the result here (whether you get x86_64) seems to depend on $CC...
+ i[3456]86-*-darwin*|x86_64-*-darwin*)
. ./MacOSXX86Env.Set.sh
;;
powerpc-*-darwin*)
commit 9bbe94f9beabfdec78c018dfbcc58e1a37d33b27
Author: Michael Stahl <mst at openoffice.org>
Date: Tue Apr 19 14:52:56 2011 +0000
gnumake4: dbaccess: rename stuff so it builds again... [hg:6a688d53e64f]
diff --git a/scp2/source/base/file_base.scp b/scp2/source/base/file_base.scp
index 4c934c4..9c0f2d5 100644
--- a/scp2/source/base/file_base.scp
+++ b/scp2/source/base/file_base.scp
@@ -54,8 +54,8 @@ STD_RES_FILE( gid_File_Res_Abp, abp)
STD_LIB_FILE( gid_File_Lib_Dbp, dbp)
STD_RES_FILE( gid_File_Res_Dbp, dbp)
-STD_LIB_FILE( gid_File_Lib_Dbu, dbu )
-STD_RES_FILE( gid_File_Res_Dbu, dbu)
+STD_LIB_FILE( gid_File_Lib_Dbu, dbui)
+STD_RES_FILE( gid_File_Res_Dbu, dbui)
STD_LIB_FILE( gid_File_Lib_Adabasui, adabasui )
STD_RES_FILE( gid_File_Res_Adabasui, adabasui)
commit 313cfed15289e23b80d7facbdf3bfcacd452f5d5
Author: Michael Stahl <mst at openoffice.org>
Date: Mon Apr 18 15:59:15 2011 +0000
gnumake4: set_soenv.in: do not generate tcsh environment file [hg:7ac1d3e8f1fa]
diff --git a/set_soenv.in b/set_soenv.in
index 1f736d6..52fc5f8 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -654,7 +654,7 @@ elsif ( $platform =~ m/cygwin/ )
$use_shl_versions = "TRUE";
$wps = ';'; # Windows style path seperator
if ( $MINGW eq "yes" )
- { # At the moment this implies the use of tcsh
+ {
print "Setting Windows NT cygwin MinGW specific values... ";
$FLIPCMD = "slfl.pl";
$PATH_SEPERATOR = ';';
@@ -1523,8 +1523,6 @@ print "done\n";
# VI. Open the output file.
#--------------------------
#
-open( OUT, ">$outfile" ) ||
- die "Cannot open $outfile: $!\n";
# Create sh environment file
open( OUT_SH, ">$outfile_sh" ) ||
@@ -1536,7 +1534,6 @@ open( OUT_SH, ">$outfile_sh" ) ||
#------------------------------------------
#
# Write file header.
-CreateFileHeader( *OUT, $UPD, $platform, "(t)csh", "#" );
CreateFileHeader( *OUT_SH, $UPD, $platform, "sh/bash/ksh", "#" );
ToFile( "SRC_ROOT", $SRC_ROOT, "e" );
@@ -2065,8 +2062,6 @@ ToFile( "SAL_ENABLE_FILE_LOCKING", "1", "e");
#
# Writing unset variables you might not need to file.
#
-print OUT $unsetvars;
-
print OUT_SH "export $exportvars$newline";
print OUT_SH "unset $unsetvarssh$newline";
@@ -2076,8 +2071,6 @@ print OUT_SH "unset $unsetvarssh$newline";
# VIII. Closing output file.
#---------------------------
#
-close( OUT ) || print "Can't close $outfile: $!";
-
close( OUT_SH ) || print "Can't close $outfile_sh: $!";
#
@@ -2126,8 +2119,7 @@ if ( $Warning ne "" )
}
print "*$newline* USAGE: $newline";
-print "* Source $outfile (in tcsh)";
-print " or $outfile.sh (in sh)";
+print "* Source $outfile.sh (in sh)";
print "$newline";
print "* in order to set up the build-environment variables.$newline";
for ( $tmp = 0; $tmp < 2; $tmp++ )
@@ -2242,8 +2234,6 @@ sub CreateFileHeader
# a - alias
# c - comment
# n - newline
-# x - raw, write as is to OUT_BAT
-# y - raw, write as is to OUT
# z - raw, write as is to OUT_SH
# Return value: void
#---------------------------------------------------------
@@ -2259,7 +2249,6 @@ sub ToFile {
$envvarbash = $envvar;
printf("%-12s %-17s %-10s %s\n", "The variable", $_[ 0 ], "is set to:", $envvar);
- print OUT "$setenv $_[ 0 ] \"$envvar\"$newline"; # to tcsh file
print OUT_SH "$_[ 0 ]=\"$envvarbash\"$newline"; # to sh file
$exportvars .= " $_[ 0 ]"; # add to export list for sh file
@@ -2272,7 +2261,6 @@ sub ToFile {
elsif ( $_[ 2 ] eq "a" )
{ # Write an alias to file.
print "The $_[ 0 ] is set to: $_[ 1 ]\n"; # to stdout
- print OUT "$_[ 0 ] $_[ 1 ]$newline"; # to tcsh file
print OUT_SH "$_[ 0 ]=$_[ 1 ]$newline"; # to sh file
}
elsif ( $_[ 2 ] eq "c" )
@@ -2281,10 +2269,6 @@ sub ToFile {
print "$comment$newline";
print "$comment $_[ 0 ]$newline";
print "$comment$newline";
- print OUT "$newline";
- print OUT "$comment$newline";
- print OUT "$comment $_[ 0 ]$newline";
- print OUT "$comment$newline";
print OUT_SH "$newline";
print OUT_SH "$comment$newline";
print OUT_SH "$comment $_[ 0 ]$newline";
@@ -2292,14 +2276,8 @@ sub ToFile {
}
elsif ( $_[ 2 ] eq "n" )
{ #Write a newline to a file
- print OUT "$newline";
print OUT_SH "$newline";
}
- elsif ( $_[ 2 ] eq "y" )
- {
- #Write first argument as is, and nothing else
- print OUT "$_[ 0 ]$newline";
- }
elsif ( $_[ 2 ] eq "z" )
{
#Write first argument as is, and nothing else
diff --git a/source_soenv.sh b/source_soenv.sh
new file mode 100644
index 0000000..2a0d9fe
--- /dev/null
+++ b/source_soenv.sh
@@ -0,0 +1,123 @@
+#!/bin/sh
+#*************************************************************************
+#
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# Copyright 2009 by Sun Microsystems, Inc.
+#
+# OpenOffice.org - a multi-platform office productivity suite
+#
+# This file is part of OpenOffice.org.
+#
+# OpenOffice.org is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version 3
+# only, as published by the Free Software Foundation.
+#
+# OpenOffice.org is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License version 3 for more details
+# (a copy is included in the LICENSE file that accompanied this code).
+#
+# You should have received a copy of the GNU Lesser General Public License
+# version 3 along with OpenOffice.org. If not, see
+# <http://www.openoffice.org/license.html>
+# for a copy of the LGPLv3 License.
+#
+#*************************************************************************
+
+# if no environment is set, try to find one, and source it
+# user can override auto-detection via SOLAR_SHELL_ENVIRONMENT
+# it is not currently possible to handle corner cases like you have an
+# AMD64 linux box, create configure environments for both x86 and x86_64,
+# and then expect to auto-detect both.
+# use SOLAR_SHELL_ENVIRONMENT in such cases.
+
+me=source_soenv.sh
+
+if test -n "${SOLARENV}"; then
+ echo "$me: error: only call this if you do not have an environment set!"
+ exit 1
+fi
+
+if test -n "${SOLAR_SHELL_ENVIRONMENT}"; then
+ if test -f "${SOLAR_SHELL_ENVIRONMENT}"; then
+ . "${SOLAR_SHELL_ENVIRONMENT}"
+ else
+ echo "$me: error: \$SOLAR_SHELL_ENVIRONMENT set, but the file does not exist"
+ exit 1
+ fi
+else
+ config_guess_result=`./config.guess`
+ case "${config_guess_result}" in
+ i[3456]86-*-solaris*)
+ . ./SolarisX86Env.Set.sh
+ ;;
+ sparc-*-solaris*)
+ . ./SolarisSparcEnv.Set.sh
+ ;;
+ i[3456]86-*-linux*)
+ . ./LinuxX86Env.Set.sh
+ ;;
+ x86_64-*-linux*)
+ . ./LinuxX86-64Env.Set.sh
+ ;;
+ ia64-*-linux*)
+ . ./LinuxIA64Env.Set.sh
+ ;;
+ sparc-*-linux*)
+ . ./LinuxSparcEnv.Set.sh
+ ;;
+ powerpc-*-linux*)
+ . ./LinuxPPCEnv.Set.sh
+ ;;
+ powerpc64-*-linux*)
+ . ./LinuxPPC64Env.Set.sh
+ ;;
+ s390-*-linux*)
+ . ./LinuxS390Env.Set.sh
+ ;;
+ s390x-*-linux*)
+ . ./LinuxS390XEnv.Set.sh
+ ;;
+ m68k-*-linux*)
+ . ./LinuxM68KEnv.Set.sh
+ ;;
+ hppa-*-linux*)
+ . ./LinuxHPPAEnv.Set.sh
+ ;;
+ alpha-*-linux*)
+ . ./LinuxAlphaEnv.Set.sh
+ ;;
+ arm*-*-linux*)
+ . ./LinuxARMEnv.Set.sh
+ ;;
+ mips-*-linux*)
+ . ./LinuxMIPSEnv.Set.sh
+ ;;
+ i386-*-freebsd*)
+ . ./FreeBSDX86Env.Set.sh
+ ;;
+ amd64-*-freebsd*)
+ . ./FreeBSDAMDEnv.Set.sh
+ ;;
+ i[3456]86-*-darwin*)
+ . ./MacOSXX86Env.Set.sh
+ ;;
+ powerpc-*-darwin*)
+ . ./MacOSXPPCEnv.Set.sh
+ ;;
+ *-cygwin*)
+ . ./winenv.set.sh || . ./winmingw.set.sh
+ ;;
+ *)
+ echo "$me: error: unknown *Env.Set.sh for: ${config_guess_result}"
+ exit 1
+ ;;
+ esac
+fi
+if test -z "${SOLARENV}"; then
+ echo "$me: error: No environment set!"
+ exit 1
+fi
+
commit 12957938d3ba677acac14ba15a228dfe3c2032ce
Author: Michael Stahl <mst at openoffice.org>
Date: Mon Apr 18 15:59:15 2011 +0000
gnumake4: #i117687#: source the right *Env.Set.sh in bootstrap: [hg:ffdb9023a592]
add source_soenv.sh: detects the platform and sources the right *Env.Set.sh.
bootstrap and the root GNUmakefile call source_soenv.sh.
diff --git a/GNUmakefile b/GNUmakefile
index 018b21e..9c2d78d 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -25,13 +25,21 @@
#
#*************************************************************************
+# if no environment is set, try to find one, source it and re-exec
ifeq ($(strip $(SOLARENV)),)
-$(error No environment set!)
-endif
+
+all:
+ if test -f ./source_soenv.sh; then . ./source_soenv.sh; fi && \
+ if test -z "$${SOLARENV}"; then echo "No environment set!"; exit 1; fi && \
+ $(MAKE)
+
+else # SOLARENV
GBUILDDIR := $(SOLARENV)/gbuild
include $(GBUILDDIR)/gbuild.mk
$(foreach repo,$(gb_REPOS),$(eval $(call gb_Module_make_global_targets,$(wildcard $(repo)/Module_*.mk))))
+endif # SOLARENV
+
# vim: set noet sw=4 ts=4:
diff --git a/bootstrap.1 b/bootstrap.1
index 24edc75..2a475bf 100644
--- a/bootstrap.1
+++ b/bootstrap.1
@@ -1,4 +1,12 @@
+if test -z "${SOLARENV}"; then
+ if test -f ./source_soenv.sh; then . ./source_soenv.sh; fi
+fi
+if test -z "${SOLARENV}"; then
+ echo "bootstrap: No environment set!"
+ exit 1
+fi
+
# remove aliases set by *Env.Set.sh
unalias mkout
unalias deliver
commit abe0e38f4827cc6efa9a0521cd38ce3b57a0d1bf
Author: Michael Stahl <mst at openoffice.org>
Date: Mon Apr 18 15:59:15 2011 +0000
gnumake4: #i117687#: do not source *Env.Set.sh in bootstrap [hg:3c81abff5843]
diff --git a/bootstrap.1 b/bootstrap.1
index 156f562..24edc75 100644
--- a/bootstrap.1
+++ b/bootstrap.1
@@ -1,4 +1,13 @@
+# remove aliases set by *Env.Set.sh
+unalias mkout
+unalias deliver
+unalias build
+unalias build_client
+unalias zipdep
+unalias nmake
+unalias gunzip
+
# executables are *.exe for WNT. This variable is necessary since Cygwin 1.5.x
# Use spawn instead of fork when building dmake on cygwin.
if test "$GUI" = "WNT"; then
diff --git a/set_soenv.in b/set_soenv.in
index c12421a..1f736d6 100644
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -2034,9 +2034,6 @@ ToFile( "ZIPDEP", $perlpre."zipdep.pl", "e" );
#
# Writing the aliases to file.
ToFile( "Aliases.", $empty, "c" );
-ToFile( "Don't set aliases when bootstrapping", $empty, "c" );
-ToFile( 'if ( ! ${?_ISBOOTSTRAP_} ) then', $empty, "y");
-ToFile( "if test -z \"\$_ISBOOTSTRAP_\"; then", $empty, "z");
ToFile( "alias mkout", $mkout, "a" );
ToFile( "alias deliver", $deliver, "a" );
@@ -2050,20 +2047,6 @@ if ( $platform =~ m/os2/ )
{ ToFile( "alias gunzip", "gzip -d", "a" );
}
-ToFile( "endif", $empty, "y");
-ToFile( "fi", $empty, "z");
-
-# Check if the right dmake version is used. (W32 only)
-if ( $platform =~ m/cygwin/ ) {
- ToFile( "Check if the right dmake version is used.", $empty, "c" );
- # Invalidate build environment.
- ToFile( "WORK_STAMP", "_invalid_", "e" );
- # Don't test the dmake version if this file is sourced by bootstrap
- ToFile( "bash -c 'if test -n \"\$_ISBOOTSTRAP_\" || (dmake.exe -V | grep -e \"-cygwin\\|OS := cygwin\" > /dev/null ); then true; else echo -e \"\\n\\nERROR: Not a cygwin build dmake or dmake missing, please check!\\n\\n\" ; sleep 5; false ; fi' || exit 1", $empty, "y");
- # Restore valid environment if test was successful.
- ToFile( "WORK_STAMP", $WORK_STAMP, "e" );
- ToFile( "", $empty, "n");
-}
# on Solaris, MacOSX and FreeBSD, set GNUCOPY and GNUPATCH
if ($platform =~ m/solaris|darwin|freebsd/)
@@ -2157,8 +2140,6 @@ $bootfile = "bootstrap";
open( OUT, ">$bootfile" ) ||
die "Cannot open $bootfile: $!\n";
print OUT "#!/bin/sh\n";
-print OUT "_ISBOOTSTRAP_=TRUE ; export _ISBOOTSTRAP_ ; . $SRC_ROOT/$outfile.sh\n";
-print OUT "unset _ISBOOTSTRAP_; export _ISBOOTSTRAP_\n";
if ( $MINGW eq "yes" )
{ print OUT 'PATH="/usr/bin:$PATH" : export PATH'."\n"; }
close( OUT ) || print "Can't close $bootfile: $!";
commit 079d7d2c8a87e3b7166573e1d1c300fe0d1b27cb
Author: Michael Stahl <mst at openoffice.org>
Date: Mon Apr 18 15:59:15 2011 +0000
gnumake4: linux.mk: in product builds, link with -O1 [hg:ad05b3eaeb22]
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index ece1a10..a8da2d5 100644
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -141,6 +141,10 @@ gb_LinkTarget_LDFLAGS += \
endif
+ifeq ($(gb_DEBUGLEVEL),0)
+gb_LinkTarget_LDFLAGS += -Wl,-O1
+endif
+
gb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
ifeq ($(gb_DEBUGLEVEL),2)
More information about the Libreoffice-commits
mailing list