Integrated changes by Kazunari for MacOS build.

This commit is contained in:
Matthias Koefferlein 2017-11-26 22:12:55 +01:00
parent 8378e59b41
commit 19df2e06d9
2 changed files with 41 additions and 17 deletions

View File

@ -21,6 +21,7 @@
CURR_DIR=`pwd`
RUN_MAKE=1
IS_MAC="no"
HAVE_QTBINDINGS=1
HAVE_64BIT_COORD=0
@ -46,6 +47,16 @@ MAKE_OPT=""
CONFIG="release"
BUILD_EXPERT=0
# Check if building on Mac OSX Darwin family
case `uname` in
Darwin*)
IS_MAC="yes"
;;
*)
IS_MAC="no"
;;
esac
# Check, whether build.sh is run from the top level folder
if ! [ -e src ] || ! [ -e src/klayout.pro ]; then
echo "*** ERROR: run build.sh from the top level folder"
@ -468,11 +479,21 @@ mkdir -p $BUILD
. $(dirname $(which $0))/version.sh
# qmake needs absolute paths, so we get them now:
BUILD=`readlink -f $BUILD`
BIN=`readlink -f $BIN`
# OSX does not have `readlink -f` command. Use equivalent Perl script.
if [ "$IS_MAC" = "no" ]; then
BUILD=`readlink -f $BUILD`
BIN=`readlink -f $BIN`
else
BUILD=`perl -MCwd -le 'print Cwd::abs_path(shift)' $BUILD`
BIN=`perl -MCwd -le 'print Cwd::abs_path(shift)' $BIN`
fi
if ( gmake -v >/dev/null 2>/dev/null ); then
MAKE_PRG=gmake
if [ "$IS_MAC" = "no" ]; then
if ( gmake -v >/dev/null 2>/dev/null ); then
MAKE_PRG=gmake
else
MAKE_PRG=make
fi
else
MAKE_PRG=make
fi

View File

@ -5,8 +5,11 @@
KLAYOUT_VERSION="0.25"
# The build date
KLAYOUT_VERSION_DATE=$(date --iso-8601)
KLAYOUT_VERSION_DATE=$(date "+%Y-%m-%d")
# The short SHA hash of the commit
KLAYOUT_VERSION_REV=$(git rev-parse --short HEAD)
KLAYOUT_VERSION_REV=$(git rev-parse --short HEAD 2>/dev/null)
if [ "$KLAYOUT_VERSION_REV" = "" ]; then
KLAYOUT_VERSION_REV="LatestSourcePackage"
fi