You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2012/11/15 01:13:13 UTC

svn commit: r1409596 - in /incubator/ooo/branches/gbuild/main: GNUmakefile bootstrap.1 source_soenv.sh

Author: arist
Date: Thu Nov 15 00:13:12 2012
New Revision: 1409596

URL: http://svn.apache.org/viewvc?rev=1409596&view=rev
Log:
gnumake4_143_ffdb9023a592.patch
# HG changeset patch
# User Michael Stahl <ms...@openoffice.org>
# Date 1303142355 0
# Node ID ffdb9023a592a0bb6f676d4ca78690492580acac
# Parent  3c81abff5843ba09130c456474fc83b094435e64
gnumake4: #i117687#: source the right *Env.Set.sh in bootstrap:
 add source_soenv.sh: detects the platform and sources the right *Env.Set.sh.

Added:
    incubator/ooo/branches/gbuild/main/source_soenv.sh
Modified:
    incubator/ooo/branches/gbuild/main/GNUmakefile
    incubator/ooo/branches/gbuild/main/bootstrap.1

Modified: incubator/ooo/branches/gbuild/main/GNUmakefile
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/GNUmakefile?rev=1409596&r1=1409595&r2=1409596&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/GNUmakefile (original)
+++ incubator/ooo/branches/gbuild/main/GNUmakefile Thu Nov 15 00:13:12 2012
@@ -19,13 +19,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:

Modified: incubator/ooo/branches/gbuild/main/bootstrap.1
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/bootstrap.1?rev=1409596&r1=1409595&r2=1409596&view=diff
==============================================================================
--- incubator/ooo/branches/gbuild/main/bootstrap.1 (original)
+++ incubator/ooo/branches/gbuild/main/bootstrap.1 Thu Nov 15 00:13:12 2012
@@ -19,6 +19,14 @@
 #  
 # *************************************************************
 
+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

Added: incubator/ooo/branches/gbuild/main/source_soenv.sh
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/gbuild/main/source_soenv.sh?rev=1409596&view=auto
==============================================================================
--- incubator/ooo/branches/gbuild/main/source_soenv.sh (added)
+++ incubator/ooo/branches/gbuild/main/source_soenv.sh Thu Nov 15 00:13:12 2012
@@ -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
+