From 9af6785a4b1d9c5dcd086114288c2711e9ea2cf9 Mon Sep 17 00:00:00 2001 From: Christoph Niethammer Date: Thu, 7 Jul 2011 16:35:51 +0000 Subject: [PATCH] Added fallback platform and default compiler to config file. --- etc/sit.conf | 6 ++++++ sit | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/etc/sit.conf b/etc/sit.conf index 8428723..533aaf1 100644 --- a/etc/sit.conf +++ b/etc/sit.conf @@ -13,3 +13,9 @@ SCLASS_DIR=${SCLASS_DIR:="$SIT_PATH/packages"} PREFIX_BASE=${PREFIX_BASE:="$HOME/bin"} MAKEOPTS="-j2" + +# default platform for unknown platforms +DEFAULT_PLATFORM="laki" + +# default compiler +DEFAULT_COMPILER="system" diff --git a/sit b/sit index 157e5e4..cb19e05 100755 --- a/sit +++ b/sit @@ -27,7 +27,8 @@ case $HOSTNAME in PLATFORM="hermit" ;; *) - sit_fail "Unknown host $HOSTNAME" + sit_info "Unknown host '$HOSTNAME' using default platform '${DEFAULT_PLATFORM}' configuration" + PLATFORM="${DEFAULT_PLATFORM}" ;; esac @@ -35,7 +36,7 @@ sit_info "Platform: $PLATFORM" # compiler to use # (gnu|intel|pgi) -COMPILER=${COMPILER:=system} +COMPILER=${COMPILER:=${DEFAULT_COMPILER}} # use specific compiler version COMPILER_VERSION=${COMPILER_VERSION:=}