summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-10-14 21:29:28 +0000
committerDavid Robillard <d@drobilla.net>2012-10-14 21:29:28 +0000
commit5cbf4fac51d7e12729f2d158cc693310cceb4860 (patch)
tree68d0edeb46d79d4c01a1ae88055a68476cc790a1
parent10ad49b9b54f0a71bc4d3e8c34861eea1cfd044a (diff)
downloadautowaf-5cbf4fac51d7e12729f2d158cc693310cceb4860.tar.gz
autowaf-5cbf4fac51d7e12729f2d158cc693310cceb4860.tar.bz2
autowaf-5cbf4fac51d7e12729f2d158cc693310cceb4860.zip
Fix Windows debug flags.
Add support for adding extra entries to NEWS files. git-svn-id: http://svn.drobilla.net/autowaf@88 e2e4594f-ea7b-45dc-bc5a-5f5301e603aa
-rw-r--r--autowaf.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/autowaf.py b/autowaf.py
index 2d609dc..bb0c270 100644
--- a/autowaf.py
+++ b/autowaf.py
@@ -231,13 +231,16 @@ def configure(conf):
if Options.options.debug:
if conf.env['MSVC_COMPILER']:
- conf.env['CFLAGS'] = ['/Od', '/Zi', '/D_DEBUG']
- conf.env['CXXFLAGS'] = ['/Od', '/Zi', '/D_DEBUG']
+ conf.env['CFLAGS'] = ['/Od', '/Zi', '/MTd']
+ conf.env['CXXFLAGS'] = ['/Od', '/Zi', '/MTd']
conf.env['LINKFLAGS'] = ['/DEBUG']
else:
conf.env['CFLAGS'] = ['-O0', '-g']
conf.env['CXXFLAGS'] = ['-O0', '-g']
else:
+ if conf.env['MSVC_COMPILER']:
+ conf.env['CFLAGS'] = ['/MD']
+ conf.env['CXXFLAGS'] = ['/MD']
append_cxx_flags(['-DNDEBUG'])
if Options.options.ultra_strict:
@@ -290,9 +293,9 @@ int main() { return 0; }''',
def set_c99_mode(conf):
if conf.env.MSVC_COMPILER:
# MSVC has no hope or desire to compile C99, just compile as C++
- conf.env.append_unique('CFLAGS', ['-TP', '-MD'])
+ conf.env.append_unique('CFLAGS', ['-TP'])
else:
- conf.env.append_unique('CFLAGS', '-std=c99')
+ conf.env.append_unique('CFLAGS', ['-std=c99'])
def set_local_lib(conf, name, has_objects):
var_name = 'HAVE_' + nameify(name.upper())
@@ -721,7 +724,7 @@ def run_ldconfig(ctx):
except:
pass
-def write_news(name, in_files, out_file, top_entries=None):
+def write_news(name, in_files, out_file, top_entries=None, extra_entries=None):
import rdflib
import textwrap
from time import strftime, strptime
@@ -766,6 +769,10 @@ def write_news(name, in_files, out_file, top_entries=None):
top_entries[str(dist)] += [
'%s: %s' % (name, '\n '.join(item))]
+ if extra_entries:
+ for i in extra_entries[str(dist)]:
+ entry += '\n * ' + i
+
entry += '\n\n --'
blamee_name = m.value(blamee, foaf.name, None)