build: various cleanups
This commit also updates waf to version 2.0.14
Change-Id: I9334f10451589e8141583f85e6cefcf199f68490
diff --git a/tools/chunks/wscript b/tools/chunks/wscript
index 31f92f3..a6b2ead 100644
--- a/tools/chunks/wscript
+++ b/tools/chunks/wscript
@@ -29,4 +29,3 @@
bld(target='chunks-objects',
use='ndncatchunks-objects ndnputchunks-objects')
-
diff --git a/tools/dump/wscript b/tools/dump/wscript
index f489d24..cd9971b 100644
--- a/tools/dump/wscript
+++ b/tools/dump/wscript
@@ -1,36 +1,9 @@
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
top = '../..'
-ATTRIBUTE_CHECK='''
-#include <stdlib.h>
-
-static void foo(void) __attribute__ ((noreturn));
-
-static void
-foo(void)
-{
- exit(1);
-}
-
-int
-main(int argc, char** argv)
-{
- foo();
-}
-'''
-
def configure(conf):
- conf.check(header_name='inttypes.h', mandatory=False)
- conf.check(header_name='stdint.h', mandatory=False)
- conf.check(header_name='sys/bitypes.h', mandatory=False)
- conf.check(fragment=ATTRIBUTE_CHECK, msg='Checking for __attribute__', mandatory=False)
-
- conf.check(header_name=['sys/types.h', 'sys/time.h', 'time.h'],
- define='TIME_WITH_SYS_TIME', mandatory=False)
-
- conf.check_cfg(path='pcap-config',
- package='libpcap', args=['--libs', '--cflags'],
- uselib_store='PCAP', mandatory=True)
+ conf.check_cfg(package='libpcap', uselib_store='PCAP',
+ path='pcap-config', args='--libs --cflags')
def build(bld):
bld.objects(
diff --git a/tools/peek/wscript b/tools/peek/wscript
index 781d015..2f31046 100644
--- a/tools/peek/wscript
+++ b/tools/peek/wscript
@@ -10,6 +10,7 @@
bld.program(
target='../../bin/ndnpeek',
+ name='ndnpeek',
source='ndnpeek/main.cpp',
use='ndnpeek-objects')
@@ -20,10 +21,11 @@
bld.program(
target='../../bin/ndnpoke',
+ name='ndnpoke',
source='ndnpoke/main.cpp',
use='ndnpoke-objects')
## (for unit tests)
bld(target='peek-objects',
- use=['ndnpeek-objects', 'ndnpoke-objects'])
+ use='ndnpeek-objects ndnpoke-objects')
diff --git a/tools/wscript b/tools/wscript
index 9c46966..aee160c 100644
--- a/tools/wscript
+++ b/tools/wscript
@@ -4,7 +4,7 @@
from waflib import Options
def options(opt):
- for subdir in opt.path.ant_glob(['*'], dir=True, src=False):
+ for subdir in opt.path.ant_glob('*', dir=True, src=False):
tool = subdir.path_from(opt.path)
opt.add_option('--enable-%s' % tool,
help='Build tool %s, enabled by default' % tool,
@@ -29,7 +29,7 @@
is_disabled = getattr(Options.options, 'disable_%s' % tool)
if is_enabled and is_disabled:
- conf.fatal("--enable-%s and --disable-%s cannot be both specified" % (tool, tool))
+ conf.fatal('--enable-%s and --disable-%s cannot be both specified' % (tool, tool))
if is_enabled:
enabled_tools.add(tool)