Commit a8b6d01b authored by Mark Olesen's avatar Mark Olesen
Browse files

CONFIG: relocate wmake binaries into project platforms/tools (#1647)

- can aid when creating source-only or binary-only packages
parent 8075804b
...@@ -17,7 +17,7 @@ GLIB_LIBS = ...@@ -17,7 +17,7 @@ GLIB_LIBS =
COMPILER_FAMILY = $(shell echo "$(WM_COMPILER)" | sed -e 's/[0-9].*//') COMPILER_FAMILY = $(shell echo "$(WM_COMPILER)" | sed -e 's/[0-9].*//')
DEFAULT_RULES = $(WM_DIR)/rules/$(WM_ARCH)$(COMPILER_FAMILY) DEFAULT_RULES = $(WM_DIR)/rules/$(WM_ARCH)$(COMPILER_FAMILY)
RULES = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER) RULES = $(WM_DIR)/rules/$(WM_ARCH)$(WM_COMPILER)
WMAKE_BIN = $(WM_DIR)/platforms/$(WM_ARCH)$(WM_COMPILER) WMAKE_BIN = $(WM_PROJECT_DIR)/platforms/tools/$(WM_ARCH)$(WM_COMPILER)
# Default compilation is 'Opt' - never permit an empty value # Default compilation is 'Opt' - never permit an empty value
ifeq ($(WM_COMPILE_OPTION),) ifeq ($(WM_COMPILE_OPTION),)
......
...@@ -6,11 +6,10 @@ ...@@ -6,11 +6,10 @@
# \\ / A nd | www.openfoam.com # \\ / A nd | www.openfoam.com
# \\/ M anipulation | # \\/ M anipulation |
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# Copyright (C) 2019 OpenCFD Ltd. # Copyright (C) 2019-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# License # License
# This file is part of OpenFOAM, licensed under GNU General Public License # This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
# <http://www.gnu.org/licenses/>.
# #
# Script # Script
# wrap-lemon # wrap-lemon
...@@ -31,7 +30,7 @@ ...@@ -31,7 +30,7 @@
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
binDir="${WMAKE_BIN:-$WM_PROJECT_DIR/wmake/platforms/$WM_ARCH$WM_COMPILER}" binDir="${WMAKE_BIN:-$WM_PROJECT_DIR/platforms/tools/$WM_ARCH$WM_COMPILER}"
etcDir="${WM_DIR:-$WM_PROJECT_DIR/wmake}/etc" etcDir="${WM_DIR:-$WM_PROJECT_DIR/wmake}/etc"
# Executable and skeleton locations # Executable and skeleton locations
......
#!/bin/sh #!/bin/sh
cd "${0%/*}" || exit # Run from this directory cd "${0%/*}" || exit # This directory (/path/project/wmake/src)
if [ -z "$WM_DIR" ] # Require WM_DIR if [ -z "$WM_DIR" ] # Require WM_DIR (/path/project/wmake)
then then
WM_DIR="$(\cd $(dirname $0)/.. && \pwd -L)" WM_DIR="$(dirname "$(pwd -L)")"
export WM_DIR export WM_DIR
fi fi
if [ -z "$WM_PROJECT_DIR" ] # Expect WM_PROJECT_DIR (/path/project)
then
echo "Warning (${0##*/}) : No WM_PROJECT_DIR set" 1>&2
WM_PROJECT_DIR="${WM_DIR%/*}"
export WM_PROJECT_DIR
fi
if [ -z "$WM_ARCH" ] || [ -z "$WM_COMPILER" ]
then
echo "Error (${0##*/}) : No WM_ARCH or WM_COMPILER set"
echo " Check your OpenFOAM environment and installation"
exit 1
fi
case "$WM_COMPILER" in case "$WM_COMPILER" in
Mingw*) Mingw*)
# Host wmake toolchain with system gcc (when cross-compiling) # Host wmake toolchain with system gcc (when cross-compiling)
make \ make \
WM_COMPILER=Gcc WM_COMPILER_TYPE=system \ WM_COMPILER=Gcc WM_COMPILER_TYPE=system \
WMAKE_BIN="${WM_DIR}/platforms/${WM_ARCH}${WM_COMPILER}" WMAKE_BIN="${WM_PROJECT_DIR}/platforms/tools/${WM_ARCH}${WM_COMPILER}" \
"$@"
;; ;;
*) *)
# Compile wmake toolchain # Regular wmake toolchain
make make "$@"
;; ;;
esac esac
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment