Stephan Witt
2014-08-28 06:36:57 UTC
commit f2aeca65b491f4a2396ec2b8834713e5c156c5ef
Date: Thu Aug 28 08:30:45 2014 +0200
pass git commit hash within CPPFLAGS to add it to version info
diff --git a/development/LyX-Mac-binary-release.sh b/development/LyX-Mac-binary-release.sh
index 4fb7547..45adfd8 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -303,6 +303,11 @@ if [ -z "${LyXVersion}" ]; then
LyXVersion=$(grep AC_INIT "${LyxSourceDir}"/configure.ac | cut -d, -f2 | tr -d " ()")
fi
LyXVersionSuffix=${LyXVersionSuffix:-$(echo "${LyXVersion}" | cut -d. -f1-2)}
+case "${LyXVersion}" in
+*dev*)
+ LyXGitCommitHash=$(cd "${LyxSourceDir}" ; git log -1 --pretty=format:%H)
+ ;;
+esac
LyxName="LyX"
LyxBase="${LyxName}-${LyXVersion}"
@@ -627,6 +632,10 @@ build_lyx() {
CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYCFLAGS}"
LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYCFLAGS}"
+ if [ -n "${LyXGitCommitHash}" ]; then
+ CPPFLAGS="${CPPFLAGS} -DLYX_GIT_COMMIT_HASH='${LyXGitCommitHash}'"
+ fi
+
if [ "$configure_qt_frameworks" = "yes" ]; then
export QT_CORE_CFLAGS="-FQtCore"
export QT_CORE_LIBS="-framework QtCore"
Richard, may I backport it to 2.1.x?Date: Thu Aug 28 08:30:45 2014 +0200
pass git commit hash within CPPFLAGS to add it to version info
diff --git a/development/LyX-Mac-binary-release.sh b/development/LyX-Mac-binary-release.sh
index 4fb7547..45adfd8 100644
--- a/development/LyX-Mac-binary-release.sh
+++ b/development/LyX-Mac-binary-release.sh
@@ -303,6 +303,11 @@ if [ -z "${LyXVersion}" ]; then
LyXVersion=$(grep AC_INIT "${LyxSourceDir}"/configure.ac | cut -d, -f2 | tr -d " ()")
fi
LyXVersionSuffix=${LyXVersionSuffix:-$(echo "${LyXVersion}" | cut -d. -f1-2)}
+case "${LyXVersion}" in
+*dev*)
+ LyXGitCommitHash=$(cd "${LyxSourceDir}" ; git log -1 --pretty=format:%H)
+ ;;
+esac
LyxName="LyX"
LyxBase="${LyxName}-${LyXVersion}"
@@ -627,6 +632,10 @@ build_lyx() {
CPPFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYCFLAGS}"
LDFLAGS="${SDKROOT:+-isysroot ${SDKROOT}} -arch ${arch} ${MYCFLAGS}"
+ if [ -n "${LyXGitCommitHash}" ]; then
+ CPPFLAGS="${CPPFLAGS} -DLYX_GIT_COMMIT_HASH='${LyXGitCommitHash}'"
+ fi
+
if [ "$configure_qt_frameworks" = "yes" ]; then
export QT_CORE_CFLAGS="-FQtCore"
export QT_CORE_LIBS="-framework QtCore"
Stephan