From 3ae2fdb260c825abad3735375812bbac22903bcc Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 25 Oct 2009 04:29:43 -0400 Subject: Removed unnecessary use of BOOST_VERSION in acprep --- acprep | 89 +++++++++++++++++++++++++++--------------------------------------- 1 file changed, 36 insertions(+), 53 deletions(-) (limited to 'acprep') diff --git a/acprep b/acprep index fc82534f..1b92716f 100755 --- a/acprep +++ b/acprep @@ -192,7 +192,6 @@ class PrepareBuild(CommandLineApp): self.envvars = { 'PYTHON_HOME': '/usr', 'PYTHON_VERSION': '2.5', - 'BOOST_VERSION': None, 'BOOST_SUFFIX': None, 'BOOST_HOME': '/usr', 'LEDGER_PRODUCTS': None, @@ -624,7 +623,6 @@ class PrepareBuild(CommandLineApp): self.execute('make', 'BOOST_SOURCE=%s' % boost, - 'BOOST_VERSION=%s' % environ['BOOST_VERSION'], 'CC=%s' % environ['CC'], 'CXX=%s' % environ['CXX'], 'LD=%s' % environ['LD'], @@ -649,14 +647,6 @@ class PrepareBuild(CommandLineApp): suffix = match.group(1) self.log.debug('Found Boost suffix => ' + suffix) self.envvars['BOOST_HOME'] = dirname(path) - - match = re.search('[0-9]+_[0-9]+', suffix) - if match: - version = match.group(0) - self.log.debug('Found Boost version in suffix => ' + - version) - if not self.envvars['BOOST_VERSION']: - self.envvars['BOOST_VERSION'] = version return suffix else: self.log.debug('The directory "%s" is not valid, skipping' % @@ -678,8 +668,6 @@ class PrepareBuild(CommandLineApp): self.log.debug('Boost is located here:') self.log.debug('BOOST_HOME => ' + self.envvars['BOOST_HOME']) - self.log.debug('BOOST_VERSION => ' + - str(self.envvars['BOOST_VERSION'])) self.log.debug('BOOST_SUFFIX => ' + suffix) break if suffix is None: @@ -692,9 +680,8 @@ class PrepareBuild(CommandLineApp): # Each of these becomes '-isystem ' for path in ['/usr/local/include', - '%s/include/boost-%s' % - (self.envvars['BOOST_HOME'], - self.envvars['BOOST_VERSION']), + '%s/include/boost' % + self.envvars['BOOST_HOME'], '%s/include' % self.envvars['BOOST_HOME'], '%s/include/python%s' % (self.envvars['PYTHON_HOME'], @@ -939,56 +926,52 @@ class PrepareBuild(CommandLineApp): self.CXXFLAGS.append('-g') self.LDFLAGS.append('-g') - if not self.options.use_glibcxx_debug: - return - - self.log.debug('We are using GLIBCXX_DEBUG, so setting up flags') + 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/stow/cppunit-debug/include'): - if '/usr/local/stow/cppunit/include' in self.sys_include_dirs: - self.sys_include_dirs.remove('/usr/local/stow/cppunit/include') - self.sys_library_dirs.remove('/usr/local/stow/cppunit/lib') + if exists('/usr/local/stow/cppunit-debug/include'): + if '/usr/local/stow/cppunit/include' in self.sys_include_dirs: + self.sys_include_dirs.remove('/usr/local/stow/cppunit/include') + self.sys_library_dirs.remove('/usr/local/stow/cppunit/lib') - self.sys_include_dirs.insert(0, '/usr/local/stow/cppunit-debug/include') - self.sys_library_dirs.insert(0, '/usr/local/stow/cppunit-debug/lib') + self.sys_include_dirs.insert(0, '/usr/local/stow/cppunit-debug/include') + self.sys_library_dirs.insert(0, '/usr/local/stow/cppunit-debug/lib') - if exists('/usr/local/lib/libboost_regex-xgcc44-sd-1_40.a'): - self.envvars['BOOST_HOME'] = '/usr/local' - self.envvars['BOOST_SUFFIX'] = '-xgcc44-sd-1_40' - self.envvars['BOOST_VERSION'] = '1_40' + if exists('/usr/local/lib/libboost_regex-xgcc44-sd-1_40.a'): + self.envvars['BOOST_HOME'] = '/usr/local' + self.envvars['BOOST_SUFFIX'] = '-xgcc44-sd-1_40' + self.log.debug('Setting BOOST_SUFFIX => %s' % + self.envvars['BOOST_SUFFIX']) - self.log.debug('Setting BOOST_SUFFIX => %s' % - self.envvars['BOOST_SUFFIX']) - self.log.debug('Setting BOOST_VERSION => %s' % - self.envvars['BOOST_VERSION']) + self.sys_include_dirs.append('/usr/local/include/boost-1_40') - self.sys_include_dirs.append('/usr/local/include/boost-1_40') + elif exists('/opt/local/lib/libboost_regex-d.a'): + self.envvars['BOOST_HOME'] = '/opt/local' + self.envvars['BOOST_SUFFIX'] = '-d' - elif exists('/usr/local/lib/libboost_regex-xgcc43-sd-1_40.a'): - self.envvars['BOOST_HOME'] = '/usr/local' - self.envvars['BOOST_SUFFIX'] = '-xgcc43-sd-1_40' - self.envvars['BOOST_VERSION'] = '1_40' + self.log.debug('Setting BOOST_SUFFIX => %s' % + self.envvars['BOOST_SUFFIX']) - self.log.debug('Setting BOOST_SUFFIX => %s' % - self.envvars['BOOST_SUFFIX']) - self.log.debug('Setting BOOST_VERSION => %s' % - self.envvars['BOOST_VERSION']) + self.sys_include_dirs.append('/opt/local/include/boost') + else: + if 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.debug('Setting BOOST_SUFFIX => %s' % + self.envvars['BOOST_SUFFIX']) - self.sys_include_dirs.append('/usr/local/include/boost-1_40') + self.sys_include_dirs.append('/usr/local/include/boost-1_40') - elif exists('/usr/local/lib/libboost_regex-xgcc42-sd-1_40.a'): - self.envvars['BOOST_HOME'] = '/usr/local' - self.envvars['BOOST_SUFFIX'] = '-xgcc42-sd-1_40' - self.envvars['BOOST_VERSION'] = '1_40' + elif exists('/opt/local/lib/libboost_regex.a'): + self.envvars['BOOST_HOME'] = '/opt/local' + self.envvars['BOOST_SUFFIX'] = '' - self.log.debug('Setting BOOST_SUFFIX => %s' % - self.envvars['BOOST_SUFFIX']) - self.log.debug('Setting BOOST_VERSION => %s' % - self.envvars['BOOST_VERSION']) + self.log.debug('Setting BOOST_SUFFIX => %s' % + self.envvars['BOOST_SUFFIX']) - self.sys_include_dirs.append('/usr/local/include/boost-1_40') + self.sys_include_dirs.append('/opt/local/include/boost') def setup_flavor_opt(self): self.CXXFLAGS.append('-O3') -- cgit v1.2.3 From 7928b6491056aa653c2d6e813a947672d8be3915 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 25 Oct 2009 04:30:05 -0400 Subject: Updated dependencies list of Mac OS X --- acprep | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'acprep') diff --git a/acprep b/acprep index 1b92716f..003b1b92 100755 --- a/acprep +++ b/acprep @@ -519,12 +519,17 @@ class PrepareBuild(CommandLineApp): if exists('/opt/local/bin/port'): self.log.info('Looks like you are using MacPorts on OS X') packages = [ - 'sudo', 'port', 'install', - 'boost', '+python25+debug+st', - 'gmp', 'mpfr', 'gettext', - 'libedit', 'cppunit', - #'texlive', 'doxygen', 'graphviz', 'texinfo', - 'lcov', 'sloccount' + 'sudo', 'port', 'install', '-f', + 'automake', 'autoconf', 'libtool', + 'python26', 'boost-jam', + 'libiconv', '+universal', 'zlib', '+universal', + 'gmp' ,'+universal', 'mpfr', '+universal', + 'ncurses', '+universal', 'ncursesw', '+universal', + 'gettext' ,'+universal', 'libedit' ,'+universal', + 'boost', '+universal+st+debug+python26+doc', + 'cppunit' ,'+universal', + 'texlive', 'doxygen', 'graphviz', 'texinfo', + 'lcov', 'sloccount' ] self.log.info('Executing: ' + string.join(packages, ' ')) self.execute(*packages) -- cgit v1.2.3 From 34c30fc25cf7ce265b6c5dbc14b376f2232eabc6 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 25 Oct 2009 04:30:29 -0400 Subject: Disable build warnings by default Also, make them errors if --warn is enabled. --- acprep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'acprep') diff --git a/acprep b/acprep index 003b1b92..8001bdbe 100755 --- a/acprep +++ b/acprep @@ -729,7 +729,7 @@ class PrepareBuild(CommandLineApp): self.log.debug('System type is => ' + system) # These options are global defaults at the moment - self.option_warn() + #self.option_warn() if not self.no_pch: self.option_pch() -- cgit v1.2.3 From d258bbc2f5d1a2cb7f61c1f4c2c00ee77016df9f Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 25 Oct 2009 04:30:55 -0400 Subject: Added more warning options if acprep --warn is used --- acprep | 3 +++ 1 file changed, 3 insertions(+) (limited to 'acprep') diff --git a/acprep b/acprep index 8001bdbe..9a3f2a7f 100755 --- a/acprep +++ b/acprep @@ -869,6 +869,8 @@ class PrepareBuild(CommandLineApp): def option_warn(self, option=None, opt_str=None, value=None, parser=None): self.log.debug('Saw option --warn') self.CXXFLAGS.append('-ansi') + self.CXXFLAGS.append('-pedantic') + self.CXXFLAGS.append('-pedantic-errors') self.CXXFLAGS.append('-Wall') self.CXXFLAGS.append('-Winvalid-pch') self.CXXFLAGS.append('-Wextra') @@ -884,6 +886,7 @@ class PrepareBuild(CommandLineApp): self.CXXFLAGS.append('-Wwrite-strings') self.CXXFLAGS.append('-Wno-old-style-cast') self.CXXFLAGS.append('-Wno-deprecated') + self.CXXFLAGS.append('-Werror') def option_boost(self, option=None, opt_str=None, value=None, parser=None): self.log.debug('Saw option --boost') -- cgit v1.2.3 From b4fc89ac29137e4b49e1db326400eaa7762bff06 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 25 Oct 2009 04:30:39 -0400 Subject: Clarified some boolean logic in acprep --- acprep | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'acprep') diff --git a/acprep b/acprep index 9a3f2a7f..dd65ae1d 100755 --- a/acprep +++ b/acprep @@ -772,8 +772,8 @@ class PrepareBuild(CommandLineApp): self.option_no_pch() if '--enable-pch' not in self.configure_args and \ - exists('/opt/local/bin/ccache') or \ - exists('/usr/local/bin/ccache'): + (exists('/opt/local/bin/ccache') or \ + exists('/usr/local/bin/ccache')): self.envvars['CC'] = 'ccache ' + self.envvars['CC'] self.envvars['CXX'] = 'ccache ' + self.envvars['CXX'] self.envvars['LD'] = 'ccache ' + self.envvars['LD'] -- cgit v1.2.3 From dc66840dd745863c06ad6513f9f66d589bcc29d8 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 25 Oct 2009 04:31:10 -0400 Subject: Running acprep now checks for submodule updates --- acprep | 1 + 1 file changed, 1 insertion(+) (limited to 'acprep') diff --git a/acprep b/acprep index dd65ae1d..8d695b8b 100755 --- a/acprep +++ b/acprep @@ -1113,6 +1113,7 @@ class PrepareBuild(CommandLineApp): def phase_config(self, *args): self.log.debug('Executing phase: config') + self.phase_submodule() self.phase_autoconf() self.phase_configure(*args) if self.should_clean: -- cgit v1.2.3 From e696bfd913a10edd19f9e35eb1aee2c97b11e7f6 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 25 Oct 2009 21:27:40 -0400 Subject: Added Boost variable definitions for opt builds --- acprep | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'acprep') diff --git a/acprep b/acprep index 8d695b8b..ef264254 100755 --- a/acprep +++ b/acprep @@ -985,6 +985,23 @@ class PrepareBuild(CommandLineApp): self.CXXFLAGS.append('-O3') self.CXXFLAGS.append('-fomit-frame-pointer') + if 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.debug('Setting BOOST_SUFFIX => %s' % + self.envvars['BOOST_SUFFIX']) + + self.sys_include_dirs.append('/usr/local/include/boost-1_40') + + elif exists('/opt/local/lib/libboost_regex.a'): + self.envvars['BOOST_HOME'] = '/opt/local' + self.envvars['BOOST_SUFFIX'] = '' + + self.log.debug('Setting BOOST_SUFFIX => %s' % + self.envvars['BOOST_SUFFIX']) + + self.sys_include_dirs.append('/opt/local/include/boost') + def setup_flavor_gcov(self): self.CXXFLAGS.append('-g') self.CXXFLAGS.append('-fprofile-arcs') -- cgit v1.2.3