summaryrefslogtreecommitdiff
path: root/acprep
diff options
context:
space:
mode:
Diffstat (limited to 'acprep')
-rwxr-xr-xacprep18
1 files changed, 13 insertions, 5 deletions
diff --git a/acprep b/acprep
index 915d3dca..a73e81f0 100755
--- a/acprep
+++ b/acprep
@@ -19,6 +19,7 @@ import string
import sys
import time
import tempfile
+import datetime
try:
import hashlib
@@ -181,8 +182,7 @@ class PrepareBuild(CommandLineApp):
self.current_flavor = 'debug'
self.products_dir = None
self.build_dir = self.source_dir
- self.configure_args = ['--disable-shared',
- '--with-included-gettext']
+ self.configure_args = ['--with-included-gettext']
self.sys_include_dirs = []
self.sys_library_dirs = []
@@ -385,8 +385,14 @@ class PrepareBuild(CommandLineApp):
def current_version(self):
if not self.current_ver:
if exists('.git') and isdir('.git'):
- tag = self.get_stdout('git', 'describe', '--all', '--long')
- self.current_ver = re.sub('heads/', '', tag)
+ date = self.get_stdout('git', 'log', '--format=%ci', 'HEAD^..HEAD')
+ date = re.sub(" [-+][0-9][0-9][0-9][0-9]$", "", date)
+ when = datetime.datetime.strptime(date, "%Y-%m-%d %H:%M:%S")
+ self.current_ver = when.strftime("%Y%m%d_%H%M%S")
+ commit = self.get_stdout('git', 'log', '--format=%h', 'HEAD^..HEAD')
+ self.current_ver += "_" + commit
+ #tag = self.get_stdout('git', 'describe', '--all', '--long')
+ #self.current_ver = re.sub('heads/', '', tag)
else:
self.current_ver = "3.0a"
return self.current_ver
@@ -472,7 +478,7 @@ class PrepareBuild(CommandLineApp):
def phase_version(self, *args):
self.log.info('Executing phase: version')
version_m4 = open('version.m4', 'w')
- version_m4.write("m4_define([VERSION_NUMBER], [%s])" %
+ version_m4.write("m4_define([VERSION_NUMBER], [%s])\n" %
self.current_version())
version_m4.close()
@@ -749,6 +755,8 @@ class PrepareBuild(CommandLineApp):
self.CXXFLAGS.append('-msse3')
self.CPPFLAGS.append('-D_GLIBCXX_FULLY_DYNAMIC_STRING=1')
+ self.configure_args.append('--disable-shared')
+
self.options.use_glibcxx_debug = True
self.locate_my_libraries()