From cdc04eddccf36eed3a43d696da073a523a9af559 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 2 Oct 2008 00:37:58 +0000 Subject: Add option system to autowaf (place for consistent global options e.g. prefix). Factor out message pretty printing from Patchage and add status printing to autowaf. git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@1577 a436a847-0d15-0410-975c-d299462d15a1 --- wscript | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) (limited to 'wscript') diff --git a/wscript b/wscript index e573327..55e99c7 100644 --- a/wscript +++ b/wscript @@ -2,7 +2,7 @@ # Parts from LADI Patchage by Nedko Arnaudov import os import Params -from Configure import g_maxlen +import autowaf # Version of this package (even if built as a child) PATCHAGE_VERSION = '0.4.2' @@ -29,15 +29,6 @@ def set_options(opt): opt.add_option('--no-alsa', action='store_true', default=False, dest='no_alsa', help="Do not build Alsa Sequencer support") -def display_msg(msg, status = None, color = None): - global g_maxlen - g_maxlen = max(g_maxlen, len(msg)) - if status: - print "%s :" % msg.ljust(g_maxlen), - Params.pprint(color, status) - else: - print "%s" % msg.ljust(g_maxlen) - def configure(conf): if not conf.env['CXX']: conf.check_tool('compiler_cxx') @@ -97,15 +88,15 @@ def configure(conf): conf.write_config_header('waf-config.h') - print + autowaf.print_summary(conf) + print 'Patchage Configuration:' - display_msg("Install prefix", conf.env['PREFIX'], 'CYAN') - display_msg("Install name", "'" + conf.env['APP_INSTALL_NAME'] + "'", 'CYAN') - display_msg("App human name", "'" + conf.env['APP_HUMAN_NAME'] + "'", 'CYAN') - display_msg("Jack (D-Bus)", str(bool(conf.env['HAVE_JACK_DBUS'])), 'YELLOW') - display_msg("LASH (D-Bus)", str(bool(conf.env['HAVE_LASH'])), 'YELLOW') - display_msg("Jack (libjack)", str(bool(conf.env['USE_LIBJACK'])), 'YELLOW') - display_msg("Alsa Sequencer", str(bool(conf.env['HAVE_ALSA'])), 'YELLOW') + autowaf.display_msg("Install name", "'" + conf.env['APP_INSTALL_NAME'] + "'", 'CYAN') + autowaf.display_msg("App human name", "'" + conf.env['APP_HUMAN_NAME'] + "'", 'CYAN') + autowaf.display_msg("Jack (D-Bus)", str(bool(conf.env['HAVE_JACK_DBUS'])), 'YELLOW') + autowaf.display_msg("LASH (D-Bus)", str(bool(conf.env['HAVE_LASH'])), 'YELLOW') + autowaf.display_msg("Jack (libjack)", str(bool(conf.env['USE_LIBJACK'])), 'YELLOW') + autowaf.display_msg("Alsa Sequencer", str(bool(conf.env['HAVE_ALSA'])), 'YELLOW') print def build(bld): -- cgit v1.2.1