Merge branch 'next'
This commit is contained in:
commit
c6873d32aa
3 changed files with 47 additions and 46 deletions
86
acprep
86
acprep
|
|
@ -811,8 +811,10 @@ class PrepareBuild(CommandLineApp):
|
||||||
% (self.envvars['PYTHON_HOME'],
|
% (self.envvars['PYTHON_HOME'],
|
||||||
self.envvars['PYTHON_VERSION'].strip()),
|
self.envvars['PYTHON_VERSION'].strip()),
|
||||||
'/opt/local/lib',
|
'/opt/local/lib',
|
||||||
|
'%s/lib' % self.envvars['BOOST_HOME'],
|
||||||
'/sw/lib']:
|
'/sw/lib']:
|
||||||
if exists(path) and isdir(path):
|
if exists(path) and isdir(path) and \
|
||||||
|
path not in self.sys_library_dirs:
|
||||||
self.log.info('Noticing library directory => ' + path)
|
self.log.info('Noticing library directory => ' + path)
|
||||||
self.sys_library_dirs.append(path)
|
self.sys_library_dirs.append(path)
|
||||||
|
|
||||||
|
|
@ -861,7 +863,7 @@ class PrepareBuild(CommandLineApp):
|
||||||
self.CXXFLAGS.append('-pthread')
|
self.CXXFLAGS.append('-pthread')
|
||||||
|
|
||||||
elif system == 'Darwin':
|
elif system == 'Darwin':
|
||||||
if exists('/Users/johnw/Dropbox/Accounts/ledger.dat'):
|
if exists('/Users/johnw/Projects/ledger/plan/TODO'):
|
||||||
self.setup_for_johnw()
|
self.setup_for_johnw()
|
||||||
|
|
||||||
self.locate_darwin_libraries()
|
self.locate_darwin_libraries()
|
||||||
|
|
@ -1044,55 +1046,51 @@ class PrepareBuild(CommandLineApp):
|
||||||
# The various build flavors #
|
# The various build flavors #
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
|
||||||
|
def check_for_boost(self, directory = '/opt/local', suffix = '',
|
||||||
|
boost_dirname = 'boost'):
|
||||||
|
if exists(join(directory, 'lib', 'libboost_regex' + suffix + '.a')):
|
||||||
|
self.envvars['BOOST_HOME'] = directory
|
||||||
|
self.envvars['BOOST_SUFFIX'] = suffix
|
||||||
|
include_directory = join(directory, 'include', boost_dirname)
|
||||||
|
if include_directory not in self.sys_include_dirs:
|
||||||
|
self.sys_include_dirs.append(include_directory)
|
||||||
|
library_directory = join(directory, 'lib')
|
||||||
|
if library_directory not in self.sys_library_dirs:
|
||||||
|
self.sys_library_dirs.append(library_directory)
|
||||||
|
self.inform_boost_location('is really located',
|
||||||
|
self.envvars['BOOST_SUFFIX'])
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
def locate_darwin_libraries(self):
|
def locate_darwin_libraries(self):
|
||||||
if self.current_flavor == 'debug' or self.current_flavor == 'gcov':
|
if self.current_flavor == 'debug' or self.current_flavor == 'gcov':
|
||||||
self.log.debug('We are using GLIBCXX_DEBUG, so setting up flags')
|
|
||||||
|
|
||||||
if self.options.use_glibcxx_debug:
|
if self.options.use_glibcxx_debug:
|
||||||
|
self.log.debug('We are using GLIBCXX_DEBUG, so setting up flags')
|
||||||
self.CPPFLAGS.append('-D_GLIBCXX_DEBUG=1')
|
self.CPPFLAGS.append('-D_GLIBCXX_DEBUG=1')
|
||||||
|
|
||||||
if exists('/usr/local/lib/libboost_regex-xgcc44-sd-1_41.a'):
|
if self.check_for_boost(directory = '/usr/local/stow/boost_1_41_0',
|
||||||
self.envvars['BOOST_HOME'] = '/usr/local'
|
suffix = '-xgcc44-sd-1_41',
|
||||||
self.envvars['BOOST_SUFFIX'] = '-xgcc44-sd-1_41'
|
boost_dirname = 'boost-1_41'):
|
||||||
self.sys_include_dirs.append('/usr/local/include/boost-1_41')
|
pass
|
||||||
self.inform_boost_location('is really located',
|
elif self.check_for_boost(directory = '/usr/local/stow/boost_1_41_0',
|
||||||
self.envvars['BOOST_SUFFIX'])
|
suffix = '-xgcc44-d-1_41',
|
||||||
|
boost_dirname = 'boost-1_41'):
|
||||||
elif exists('/usr/local/lib/libboost_regex-xgcc44-d-1_41.a'):
|
pass
|
||||||
self.envvars['BOOST_HOME'] = '/usr/local'
|
elif self.check_for_boost(suffix = '-d'):
|
||||||
self.envvars['BOOST_SUFFIX'] = '-xgcc44-d-1_41'
|
pass
|
||||||
self.sys_include_dirs.append('/usr/local/include/boost-1_41')
|
|
||||||
self.inform_boost_location('is really located',
|
|
||||||
self.envvars['BOOST_SUFFIX'])
|
|
||||||
|
|
||||||
elif exists('/opt/local/lib/libboost_regex-d.a'):
|
|
||||||
self.envvars['BOOST_HOME'] = '/opt/local'
|
|
||||||
self.envvars['BOOST_SUFFIX'] = '-d'
|
|
||||||
self.sys_include_dirs.append('/opt/local/include/boost')
|
|
||||||
self.inform_boost_location('is really located',
|
|
||||||
self.envvars['BOOST_SUFFIX'])
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if exists('/opt/local/lib/libboost_regex.a'):
|
if self.check_for_boost():
|
||||||
self.envvars['BOOST_HOME'] = '/opt/local'
|
pass
|
||||||
self.envvars['BOOST_SUFFIX'] = ''
|
elif self.check_for_boost(directory = '/usr/local/stow/boost_1_41_0',
|
||||||
self.sys_include_dirs.append('/opt/local/include/boost')
|
suffix = '-xgcc44-s-1_41',
|
||||||
self.inform_boost_location('is really located',
|
boost_dirname = 'boost-1_41'):
|
||||||
self.envvars['BOOST_SUFFIX'])
|
pass
|
||||||
|
elif self.check_for_boost(directory = '/usr/local/stow/boost_1_41_0',
|
||||||
elif exists('/usr/local/lib/libboost_regex-xgcc44-s-1_41.a'):
|
suffix = '-xgcc44-1_41',
|
||||||
self.envvars['BOOST_HOME'] = '/usr/local'
|
boost_dirname = 'boost-1_41'):
|
||||||
self.envvars['BOOST_SUFFIX'] = '-xgcc44-s-1_41'
|
pass
|
||||||
self.sys_include_dirs.append('/usr/local/include/boost-1_41')
|
|
||||||
self.inform_boost_location('is really located',
|
|
||||||
self.envvars['BOOST_SUFFIX'])
|
|
||||||
|
|
||||||
elif exists('/usr/local/lib/libboost_regex-xgcc44-1_41.a'):
|
|
||||||
self.envvars['BOOST_HOME'] = '/usr/local'
|
|
||||||
self.envvars['BOOST_SUFFIX'] = '-xgcc44-1_41'
|
|
||||||
self.sys_include_dirs.append('/usr/local/include/boost-1_41')
|
|
||||||
self.inform_boost_location('is really located',
|
|
||||||
self.envvars['BOOST_SUFFIX'])
|
|
||||||
|
|
||||||
def setup_flavor_default(self):
|
def setup_flavor_default(self):
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
|
|
@ -437,9 +437,12 @@ void print_item(std::ostream& out, const item_t& item, const string& prefix)
|
||||||
|
|
||||||
string item_context(const item_t& item, const string& desc)
|
string item_context(const item_t& item, const string& desc)
|
||||||
{
|
{
|
||||||
|
if (! item.pos)
|
||||||
|
return empty_string;
|
||||||
|
|
||||||
std::streamoff len = item.pos->end_pos - item.pos->beg_pos;
|
std::streamoff len = item.pos->end_pos - item.pos->beg_pos;
|
||||||
if (! len)
|
if (! len)
|
||||||
return _("<no item context>");
|
return empty_string;
|
||||||
|
|
||||||
assert(len > 0);
|
assert(len > 0);
|
||||||
assert(len < 2048);
|
assert(len < 2048);
|
||||||
|
|
|
||||||
|
|
@ -224,7 +224,7 @@ namespace {
|
||||||
when = date_t(year ? *year : CURRENT_DATE().year(),
|
when = date_t(year ? *year : CURRENT_DATE().year(),
|
||||||
when.month(), when.day());
|
when.month(), when.day());
|
||||||
|
|
||||||
if (when.month() > CURRENT_DATE().month())
|
if (! year && when.month() > CURRENT_DATE().month())
|
||||||
when -= gregorian::years(1);
|
when -= gregorian::years(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue