[ff815c]: Allwmake Maximize Restore History

Download this file

Allwmake    64 lines (49 with data), 1.5 kB

#! /bin/bash

BISOMPATH=`which bison`
NOBISON=$?

if [[ $NOBISON != 0 ]]; then
    echo "No 'bison' found. This is absolutely essential for swak4Foam. Can't go on"
    exit
fi

BISONVER=`bison -V | head -n 1| tr ' ' '\n' | tail -n 1`

echo "Bison is version $BISONVER"

if [[ $BISONVER < 2.3 ]]; then 
    echo "swak4Foam only confirmed to work with Bison >= 2.3"
    if [ -z $USE_OLD_BISON ]; then 
	echo "Set the environment variable USE_OLD_BISON if you want to continue anyway"
	exit
    else
	echo "I continue under protest. Should swak4Foam work with your bison-version, then please report it"
	echo
	echo
    fi
fi

if [ -e swakConfiguration ]; then
    echo "Reading variables from 'swakConfiguration'"
    source swakConfiguration
else
    echo "No 'swakConfiguration'. Python etc won't work"
fi

. theFiles.sh

SOEXT=so

if [ `uname -s`=="Darwin" ]; then
    SOEXT=dylib
fi

for lib in ${SWAKLIBS[@]}
do
    if [ -e $FOAM_LIBBIN/lib$lib.$SOEXT ]; then 
	echo "$FOAM_LIBBIN/lib$lib.$SOEXT shadows library that will be compiled. This might break the compilation of the utilities"
	if [ -z $I_KNOW_THE_RISCS ]; then 
	    echo "Set the environment variable I_KNOW_THE_RISCS if you want to continue nevertheless"
	    exit
	fi
    fi
done

(cd Libraries; wmake all )

(
  #revert back to the default Gcc compiler, due to some problems that Icc has
  #with overly complex classes
  [ "$WM_COMPILER" = "Icc" ] && export WM_COMPILER=Gcc
  cd Utilities; wmake all
)

# (cd Examples/tests/fluIntegration/libRegistered; wmake)