summaryrefslogtreecommitdiff
path: root/acprep
diff options
context:
space:
mode:
Diffstat (limited to 'acprep')
-rwxr-xr-xacprep99
1 files changed, 53 insertions, 46 deletions
diff --git a/acprep b/acprep
index ee44b38e..4ebd6914 100755
--- a/acprep
+++ b/acprep
@@ -36,7 +36,7 @@ LEVELS = {'DEBUG': logging.DEBUG,
'ERROR': logging.ERROR,
'CRITICAL': logging.CRITICAL}
-search_prefixes = [ '/opt/local', '/usr/local', '/sw', '/usr' ]
+search_prefixes = [ '/usr/local', '/opt/local', '/sw', '/usr' ]
class BoostInfo(object):
log = None
@@ -52,21 +52,6 @@ class BoostInfo(object):
def configure(self, suffix = None, file_suffix = None, home_path = None,
include_path = None, library_path = None):
- path = library_path or self.library_path
- if not isabs(path):
- path = join(home_path or self.home_path, path)
- if not exists(path) or not isdir(path) or \
- not self.check_for_boost_regex_lib(path, suffix or self.suffix,
- file_suffix or self.file_suffix):
- return False
-
- path = include_path or self.include_path
- if not isabs(path):
- path = join(home_path or self.home_path, path)
- if not exists(path) or not isdir(path) or \
- not self.check_for_boost_regex_hpp(path):
- return False
-
self.log.debug('Configuring Boost details')
if suffix:
self.log.debug('Setting Boost suffix to => ' + suffix)
@@ -84,6 +69,21 @@ class BoostInfo(object):
self.log.debug('Setting Boost lib directory to => ' + library_path)
self.library_path = library_path
+ path = library_path or self.library_path
+ if not isabs(path):
+ path = join(home_path or self.home_path, path)
+ if not exists(path) or not isdir(path) or \
+ not self.check_for_boost_regex_lib(path, suffix or self.suffix,
+ file_suffix or self.file_suffix):
+ return False
+
+ path = include_path or self.include_path
+ if not isabs(path):
+ path = join(home_path or self.home_path, path)
+ if not exists(path) or not isdir(path) or \
+ not self.check_for_boost_regex_hpp(path):
+ return False
+
self.configured = True
return True # The object was configured
@@ -254,8 +254,8 @@ class CommandLineApp(object):
force_exit = True # If true, always ends run() with sys.exit()
log_handler = None
darwin_gcc = False
- boost_version = "1_48_0"
- boost_major = "1_48"
+ boost_version = "1_49_0"
+ boost_major = "1_49"
options = {
'debug': False,
@@ -508,6 +508,12 @@ class PrepareBuild(CommandLineApp):
op.add_option('', '--no-python', action='store_true', dest='no_python',
default=False,
help='Do not enable Python support by default')
+ op.add_option('', '--cache', action='store_true',
+ dest='enable_cache', default=False,
+ help='Enable use of Boost.Serialization (--cache)')
+ op.add_option('', '--doxygen', action='store_true',
+ dest='enable_doxygen', default=False,
+ help='Enable use of Doxygen to build ref manual ("make docs")')
op.add_option('', '--enable-cache', action='store_true',
dest='enable_cache', default=False,
help='Enable use of Boost.Serialization (--cache)')
@@ -555,11 +561,6 @@ class PrepareBuild(CommandLineApp):
help='Enable full warning flags')
def main(self, *args):
- if self.options.python:
- self.configure_args.append('--enable-python')
- if self.options.no_python:
- self.configure_args.remove('--enable-python')
-
if args and args[0] in ['default', 'debug', 'opt', 'gcov', 'gprof']:
self.current_flavor = args[0]
args = args[1:]
@@ -1015,7 +1016,8 @@ class PrepareBuild(CommandLineApp):
self.boost_inc_ident = "clang"
self.boost_lib_ident = "clang-darwin28"
- self.log.debug("Setting Python home to /opt/local")
+ global search_prefixes
+ search_prefixes = [ '/opt/local', '/usr/local', '/sw', '/usr' ]
self.log.debug('Using Clang ident: %s/%s' %
(self.boost_inc_ident, self.boost_lib_ident))
@@ -1046,6 +1048,8 @@ class PrepareBuild(CommandLineApp):
self.CXXFLAGS.append('-march=nocona')
self.CXXFLAGS.append('-msse3')
+ self.CXXFLAGS.append('-DDOCUMENT_MODEL=1')
+
self.locate_darwin_libraries()
def setup_for_system(self):
@@ -1126,6 +1130,10 @@ class PrepareBuild(CommandLineApp):
self.configure_args.append('--enable-doxygen')
if self.options.enable_cache:
self.configure_args.append('--enable-cache')
+ if self.options.python:
+ self.configure_args.append('--enable-python')
+ if self.options.no_python:
+ self.configure_args.remove('--enable-python')
if self.options.cpp0x:
self.CXXFLAGS.append('-std=c++0x')
@@ -1211,6 +1219,7 @@ class PrepareBuild(CommandLineApp):
self.CXXFLAGS.append('-Wno-missing-prototypes')
self.CXXFLAGS.append('-Wno-missing-noreturn')
self.CXXFLAGS.append('-Wno-disabled-macro-expansion')
+ self.CXXFLAGS.append('-Wno-unused-parameter')
self.CXXFLAGS.append('-fno-limit-debug-info')
#self.CXXFLAGS.append('-Wold-style-cast')
@@ -1306,15 +1315,7 @@ class PrepareBuild(CommandLineApp):
def locate_darwin_libraries(self):
if self.current_flavor == 'debug':
- if self.boost_info.configure(
- home_path = '/usr/local/stow/boost_%s-%s' % \
- (self.boost_version, self.boost_inc_ident),
- suffix = '-%s-sd-%s' % \
- (self.boost_lib_ident, self.boost_major),
- file_suffix = '.dylib',
- include_path = 'include/boost-%s' % self.boost_major):
- pass
- elif self.boost_info.configure(
+ if not self.options.use_clang and self.boost_info.configure(
home_path = '/usr/local/stow/boost_%s-%s' % \
(self.boost_version, self.boost_inc_ident),
suffix = '-%s-d-%s' % \
@@ -1328,15 +1329,7 @@ class PrepareBuild(CommandLineApp):
else:
if self.boost_info.configure():
pass
- elif self.boost_info.configure(
- home_path = '/usr/local/stow/boost_%s-%s' % \
- (self.boost_version, self.boost_inc_ident),
- suffix = '-%s-s-%s' % \
- (self.boost_lib_ident, self.boost_major),
- file_suffix = '.dylib',
- include_path = 'include/boost-%s' % self.boost_major):
- pass
- elif self.boost_info.configure(
+ elif not self.options.use_clang and self.boost_info.configure(
home_path = '/usr/local/stow/boost_%s-%s' % \
(self.boost_version, self.boost_inc_ident),
suffix = '-%s-%s' % \
@@ -1363,7 +1356,7 @@ class PrepareBuild(CommandLineApp):
def setup_flavor_opt(self):
self.CPPFLAGS.append('-DNDEBUG=1')
- for i in ['-O3', '-fomit-frame-pointer']:
+ for i in ['-O3']:
self.CXXFLAGS.append(i)
self.CFLAGS.append(i)
self.LDFLAGS.append(i)
@@ -1528,6 +1521,8 @@ class PrepareBuild(CommandLineApp):
make_args.append('-j%d' % self.options.jobs)
make_args.append('JOBS=%d' % self.options.jobs)
+ make_args.append('FLAVOR=%s' % self.current_flavor)
+
self.log.debug('Configure arguments => ' + str(config_args))
self.log.debug('Makefile arguments => ' + str(make_args))
@@ -1648,7 +1643,10 @@ class PrepareBuild(CommandLineApp):
isdir(self.build_directory()):
self.log.info('=== Wiping build directory %s ===' %
self.build_directory())
- shutil.rmtree(self.build_directory())
+ try:
+ shutil.rmtree(self.build_directory())
+ except:
+ self.execute('rm', '-fr', self.build_directory())
def phase_distcheck(self, *args):
self.log.info('Executing phase: distcheck')
@@ -1678,8 +1676,17 @@ class PrepareBuild(CommandLineApp):
def phase_rsync(self, *args):
self.log.info('Executing phase: rsync')
- source_copy_dir = join(self.ensure(self.products_directory()),
- 'ledger-proof')
+ proof_dir = 'ledger-proof'
+
+ if self.options.python:
+ proof_dir += "-python"
+
+ if self.options.gcc47:
+ proof_dir += "-gcc47"
+ elif self.options.use_clang:
+ proof_dir += "-clang"
+
+ source_copy_dir = join(self.ensure(self.products_directory()), proof_dir)
self.execute('rsync', '-a', '--delete',
'--exclude=.git/', '--exclude=b/',