ardour/tools/define_versions.sh
Grygorii Zharun f300eaba93 [Summary] Fixed MAC build
[Details] Added fixes to make the code cross platform compilable
[Reviewed by] N/A

[git-p4: depot-paths = "//Abdaw/dev_main/tracks/": change = 446294]
2014-03-26 06:31:34 -05:00

34 lines
1,016 B
Bash
Executable file

#
# this is sourced by build and package, and executed from within build/{osx,linux}_packaging
#
if uname -a | grep arwin >/dev/null 2>&1 ; then
EXTENDED_RE=-E
else
EXTENDED_RE=-r
fi
GIT_REV_REGEXP='([0-9][0-9]*)\.([0-9][0-9]*)-?([0-9][0-9]*)?-?([a-z0-9]*)'
major_version=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\1/"`
minor_version=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\2/"`
r=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\3/"`
commit=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed $EXTENDED_RE -e 1d -e "s/$GIT_REV_REGEXP/\4/"`
if [ "x$r" != "x" ] ; then
revcount=$r
fi
release_version=${major_version}.${minor_version}${revcount:+.$revcount}
#
# Figure out the Build Type
#
# Note that the name of the cache file may vary from to time
#
if grep -q "DEBUG = True" ../../build/c4che/_cache.py; then
DEBUG="T"
else
DEBUG="F"
fi