From 1351897bf7fde46fb3e38331c7c70204fc43925b Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 31 Oct 2009 05:46:58 -0400 Subject: Rearranged some code in acprep --- acprep | 52 +++++++++++----------------------------------------- 1 file changed, 11 insertions(+), 41 deletions(-) (limited to 'acprep') diff --git a/acprep b/acprep index bff1fce5..f025c9ad 100755 --- a/acprep +++ b/acprep @@ -743,6 +743,7 @@ class PrepareBuild(CommandLineApp): self.CPPFLAGS.append('-D_GLIBCXX_FULLY_DYNAMIC_STRING=1') self.options.use_glibcxx_debug = True + self.locate_my_libraries() def setup_for_system(self): self.setup_system_directories() @@ -949,30 +950,7 @@ class PrepareBuild(CommandLineApp): # The various build flavors # ######################################################################### - def setup_flavor_default(self): - if exists('/opt/local/lib/libboost_regex.a'): - self.envvars['BOOST_HOME'] = '/opt/local' - self.envvars['BOOST_SUFFIX'] = '' - - self.log.info('Setting BOOST_SUFFIX => %s' % - self.envvars['BOOST_SUFFIX']) - - self.sys_include_dirs.append('/opt/local/include/boost') - - elif exists('/usr/local/lib/libboost_regex-xgcc44-s-1_40.a'): - self.envvars['BOOST_HOME'] = '/usr/local' - self.envvars['BOOST_SUFFIX'] = '-xgcc44-s-1_40' - self.log.info('Setting BOOST_SUFFIX => %s' % - self.envvars['BOOST_SUFFIX']) - - self.sys_include_dirs.append('/usr/local/include/boost-1_40') - - def setup_flavor_debug(self): - self.configure_args.append('--enable-debug') - - self.CXXFLAGS.append('-g') - self.LDFLAGS.append('-g') - + def locate_my_libraries(self): if self.options.use_glibcxx_debug: self.log.debug('We are using GLIBCXX_DEBUG, so setting up flags') @@ -1020,26 +998,18 @@ class PrepareBuild(CommandLineApp): self.sys_include_dirs.append('/usr/local/include/boost-1_40') - def setup_flavor_opt(self): - self.CXXFLAGS.append('-O3') - self.CXXFLAGS.append('-fomit-frame-pointer') - - if exists('/opt/local/lib/libboost_regex.a'): - self.envvars['BOOST_HOME'] = '/opt/local' - self.envvars['BOOST_SUFFIX'] = '' - - self.log.info('Setting BOOST_SUFFIX => %s' % - self.envvars['BOOST_SUFFIX']) + def setup_flavor_default(self): + pass - self.sys_include_dirs.append('/opt/local/include/boost') + def setup_flavor_debug(self): + self.configure_args.append('--enable-debug') - elif exists('/usr/local/lib/libboost_regex-xgcc44-s-1_40.a'): - self.envvars['BOOST_HOME'] = '/usr/local' - self.envvars['BOOST_SUFFIX'] = '-xgcc44-s-1_40' - self.log.info('Setting BOOST_SUFFIX => %s' % - self.envvars['BOOST_SUFFIX']) + self.CXXFLAGS.append('-g') + self.LDFLAGS.append('-g') - self.sys_include_dirs.append('/usr/local/include/boost-1_40') + def setup_flavor_opt(self): + self.CXXFLAGS.append('-O3') + self.CXXFLAGS.append('-fomit-frame-pointer') def setup_flavor_gcov(self): self.CXXFLAGS.append('-g') -- cgit v1.2.3