summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.in6
-rw-r--r--configure.ac12
-rw-r--r--solenv/gbuild/gbuild.mk19
-rw-r--r--solenv/gbuild/partial_build.mk2
-rw-r--r--solenv/gbuild/shell.mk.in12
6 files changed, 27 insertions, 25 deletions
diff --git a/.gitignore b/.gitignore
index ec3a2fe8c1af..544024db6f6f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -53,6 +53,7 @@
/config_build_lang.mk
/configure
/lo.xcent
+/solenv/gbuild/shell.mk
/Makefile
/NEWS
/TODO
diff --git a/Makefile.in b/Makefile.in
index 52361349f5e3..4a065ff7924c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -17,11 +17,12 @@ build_goal:=$(if $(filter build check,$(MAKECMDGOALS)),all)\
$(if $(filter check,$(MAKECMDGOALS)),subsequentcheck)\
$(filter all build-l10n-only build-non-l10n-only debugrun help showmodules translations $(gb_Top_MODULE_CHECK_TARGETS) check packageinfo,$(MAKECMDGOALS))
-SHELL := @SHELL_BASH@
SRCDIR := @SRC_ROOT@
BUILDDIR := @BUILDDIR@
GIT_BUILD := $(if $(wildcard $(SRCDIR)/.git),T)
+include $(SRCDIR)/solenv/gbuild/shell.mk
+
# Run autogen.sh if needed and force make to restart itself.
# ... but there are several cases where we do not want to run
# autogen.sh:
@@ -44,6 +45,7 @@ $(BUILDDIR)/config_host.mk : $(wildcard \
$(SRCDIR)/configure.ac \
$(SRCDIR)/config_host/*.h.in \
$(SRCDIR)/android/source/AndroidManifest.xml.in \
+ $(SRCDIR)/solenv/gbuild/shell.mk.in \
$(BUILDDIR)/autogen.input \
$(BUILDDIR)/autogen.lastrun \
$(BUILDDIR)/autogen.sh \
@@ -58,7 +60,7 @@ gb_Side ?= host
include $(BUILDDIR)/config_$(gb_Side).mk
-export GMAKE_OPTIONS?=-r$(if $(verbose),,s)$(value $(MAKEFLAGS))
+export GMAKE_OPTIONS?=-r$(if $(verbose),,s)$(value $(MAKEFLAGS)) SHELL=$(SHELL)
PARALLELISM_OPTION := $(if $(filter-out 0,$(PARALLELISM)),-j $(PARALLELISM),)
diff --git a/configure.ac b/configure.ac
index bb8a0a5bb75f..8ab6089f7a93 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4519,6 +4519,7 @@ if test "$cross_compiling" = "yes"; then
lo.xcent.in \
instsetoo_native/util/openoffice.lst.in \
config_host/*.in \
+ solenv/gbuild/shell.mk.in \
sysui/desktop/macosx/Info.plist.in \
ios/lo.xcconfig.in) \
| (cd CONF-FOR-BUILD && tar xf -)
@@ -4956,10 +4957,12 @@ if test "$_make_ver_check" = ""; then
STALE_MAKE=TRUE
fi
-if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
- SHELL_BASH=$(cygpath -m $(which bash))
-else
- SHELL_BASH=`which bash`
+if test -z "$SHELL_BASH"; then
+ if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+ SHELL_BASH=$(cygpath -m $(which bash))
+ else
+ SHELL_BASH=`which bash`
+ fi
fi
AC_SUBST(SHELL_BASH)
@@ -12995,6 +12998,7 @@ AC_CONFIG_FILES([config_host.mk
Makefile
lo.xcent
instsetoo_native/util/openoffice.lst
+ solenv/gbuild/shell.mk
sysui/desktop/macosx/Info.plist
ios/lo.xcconfig])
AC_CONFIG_HEADERS([config_host/config_buildid.h])
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 31420624759f..04056cd136c8 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -44,25 +44,6 @@ GBUILDDIR:=$(SRCDIR)/solenv/gbuild
MAKEFLAGS += r
.SUFFIXES:
-# by default gbuild use /bin/sh
-# if you want to use a particular shell
-# you can export gb_SHELL=<path_to_shell>
-#
-
-ifdef gb_SHELL
-SHELL := $(gb_SHELL)
-else
-ifeq ($(OS_FOR_BUILD),WNT)
-ifeq ($(GNUMAKE_WIN_NATIVE),TRUE)
-SHELL := $(shell cygpath -m /bin/sh)
-else
-SHELL := /bin/sh
-endif
-else
-SHELL := /bin/sh
-endif
-endif
-
true := T
false :=
define NEWLINE
diff --git a/solenv/gbuild/partial_build.mk b/solenv/gbuild/partial_build.mk
index 3b4478f23154..e8413246bd1a 100644
--- a/solenv/gbuild/partial_build.mk
+++ b/solenv/gbuild/partial_build.mk
@@ -32,6 +32,8 @@ ifeq ($(BUILD_TYPE),)
include $(BUILDDIR)/config_$(gb_Side).mk
endif
+include $(SRCDIR)/solenv/gbuild/shell.mk
+
gb_PARTIAL_BUILD := T
include $(SRCDIR)/solenv/gbuild/gbuild.mk
diff --git a/solenv/gbuild/shell.mk.in b/solenv/gbuild/shell.mk.in
new file mode 100644
index 000000000000..d5a92528e522
--- /dev/null
+++ b/solenv/gbuild/shell.mk.in
@@ -0,0 +1,12 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+export SHELL := @SHELL_BASH@
+
+# vim: set noet sw=4 ts=4: