mirror of https://github.com/KLayout/klayout.git
Integrated changes by Kazunari for MacOS build.
This commit is contained in:
parent
8378e59b41
commit
19df2e06d9
21
build.sh
21
build.sh
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
CURR_DIR=`pwd`
|
CURR_DIR=`pwd`
|
||||||
RUN_MAKE=1
|
RUN_MAKE=1
|
||||||
|
IS_MAC="no"
|
||||||
|
|
||||||
HAVE_QTBINDINGS=1
|
HAVE_QTBINDINGS=1
|
||||||
HAVE_64BIT_COORD=0
|
HAVE_64BIT_COORD=0
|
||||||
|
|
@ -46,6 +47,16 @@ MAKE_OPT=""
|
||||||
CONFIG="release"
|
CONFIG="release"
|
||||||
BUILD_EXPERT=0
|
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
|
# Check, whether build.sh is run from the top level folder
|
||||||
if ! [ -e src ] || ! [ -e src/klayout.pro ]; then
|
if ! [ -e src ] || ! [ -e src/klayout.pro ]; then
|
||||||
echo "*** ERROR: run build.sh from the top level folder"
|
echo "*** ERROR: run build.sh from the top level folder"
|
||||||
|
|
@ -468,14 +479,24 @@ mkdir -p $BUILD
|
||||||
. $(dirname $(which $0))/version.sh
|
. $(dirname $(which $0))/version.sh
|
||||||
|
|
||||||
# qmake needs absolute paths, so we get them now:
|
# qmake needs absolute paths, so we get them now:
|
||||||
|
# OSX does not have `readlink -f` command. Use equivalent Perl script.
|
||||||
|
if [ "$IS_MAC" = "no" ]; then
|
||||||
BUILD=`readlink -f $BUILD`
|
BUILD=`readlink -f $BUILD`
|
||||||
BIN=`readlink -f $BIN`
|
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 [ "$IS_MAC" = "no" ]; then
|
||||||
if ( gmake -v >/dev/null 2>/dev/null ); then
|
if ( gmake -v >/dev/null 2>/dev/null ); then
|
||||||
MAKE_PRG=gmake
|
MAKE_PRG=gmake
|
||||||
else
|
else
|
||||||
MAKE_PRG=make
|
MAKE_PRG=make
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
MAKE_PRG=make
|
||||||
|
fi
|
||||||
|
|
||||||
PLUGINS=""
|
PLUGINS=""
|
||||||
cd $CURR_DIR/src/plugins
|
cd $CURR_DIR/src/plugins
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,11 @@
|
||||||
KLAYOUT_VERSION="0.25"
|
KLAYOUT_VERSION="0.25"
|
||||||
|
|
||||||
# The build date
|
# The build date
|
||||||
KLAYOUT_VERSION_DATE=$(date --iso-8601)
|
KLAYOUT_VERSION_DATE=$(date "+%Y-%m-%d")
|
||||||
|
|
||||||
# The short SHA hash of the commit
|
# 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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue