From: Christian Dywan Date: Fri, 9 Jan 2009 23:35:10 +0000 (+0100) Subject: Apply the default debug level dependend on the compiler X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=266e3194513da34d830636fb19431f9ec29bd9bd;p=midori Apply the default debug level dependend on the compiler --- diff --git a/wscript b/wscript index 3469c4b9..a124cad1 100644 --- a/wscript +++ b/wscript @@ -161,8 +161,13 @@ def configure (conf): conf.write_config_header ('config.h') conf.env.append_value ('CCFLAGS', '-DHAVE_CONFIG_H') debug_level = Options.options.debug_level - if debug_level != 'no': - compiler = conf.env['CC_NAME'] + compiler = conf.env['CC_NAME'] + if debug_level == '': + if compiler == 'gcc': + debug_level = 'debug' + else: + debug_level = 'none' + if debug_level != 'none': if compiler == 'gcc': if debug_level == 'debug': conf.env.append_value ('CCFLAGS', '-Wall -O0 -g') @@ -221,9 +226,9 @@ def set_options (opt): opt.tool_options ('compiler_cc') opt.get_option_group ('--check-c-compiler').add_option('-d', '--debug-level', - action = 'store', default = 'debug', - help = 'Specify the debugging level. [\'no\', \'debug\', \'full\']', - choices = ['no', 'debug', 'full'], dest = 'debug_level') + action = 'store', default = '', + help = 'Specify the debugging level. [\'none\', \'debug\', \'full\']', + choices = ['', 'none', 'debug', 'full'], dest = 'debug_level') opt.tool_options ('gnu_dirs') opt.parser.remove_option ('--oldincludedir') opt.parser.remove_option ('--htmldir')