[chronojump/chronojump_version] Fixes Makefile syntax, makes it specific for OSX. Exports new variable.



commit 315d3248911a22fa8046408d8f79d4eecacc0f6b
Author: Carles Pina i Estany <carles pina cat>
Date:   Tue Oct 18 08:58:23 2016 +0200

    Fixes Makefile syntax, makes it specific for OSX. Exports new variable.

 Makefile.am  |   11 ++++++++---
 configure.ac |    4 ++++
 2 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 0bad231..7dc6084 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,9 +23,14 @@ ChangeLog:
 
 dist: ChangeLog
 
+if OSTYPE_OS_X
+export CHRONOJUMP_VERSION = @PACKAGE_VERSION@
+export CHRONOJUMP_COMMIT = origin/@GIT_BRANCH@
+CERBERO_COMMAND = /Users/chronojump/cerbero/cerbero-uninstalled -c  
/Users/chronojump/cerbero/cerbero-extras/chronojump.cbc
 osx-package:
-       export CHRONOJUMP_VERSION="@PACKAGE_VERSION@"
-       cerbero-cj buildone chronojump
-       cerbero-cj package chronojump
+       $(CERBERO_COMMAND) buildone chronojump
+       $(CERBERO_COMMAND) package chronojump
+endif
+
 
 .PHONY: ChangeLog
diff --git a/configure.ac b/configure.ac
index b573128..1a93fda 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,6 +10,10 @@ AC_SUBST([PACKAGE_SIMPLIFIED_VERSION], [m4_esyscmd_s([git describe --abbrev=0])]
 # Date of the last commit
 AC_SUBST([BUILD_CHRONOJUMP_LAST_COMMIT_TIMESTAMP], [m4_esyscmd_s([git log -1 --format=%ct])])
 
+# GIT_BRANCH is used by cerbero to know which branch needs to be build (on OSX)
+AC_SUBST([GIT_BRANCH], [m4_esyscmd_s([git symbolic-ref --short HEAD])])
+
+
 AM_INIT_AUTOMAKE([foreign])
 
 AC_CONFIG_MACRO_DIR([build/m4])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]