build: update waf to version 2.0.6
Major cleanup of all build scripts Change-Id: I6904f034d40adc66366fdf08749900ffb31c68d9
This commit is contained in:
1 parent
cdf7845986
commit
0064c1dd91
18 files changed
+424
-485
No files matched your search
+30
-9
@@ -1,9 +1,30 @@
|
||||
.DS*
|
||||
.waf-1*
|
||||
.waf3-*
|
||||
.lock*
|
||||
*.pyc
|
||||
*.pyo
|
||||
build/
|
||||
VERSION
|
||||
unit-tests.conf
|
||||
# Emacs
|
||||
*~
|
||||
\#*\#
|
||||
/.emacs.desktop
|
||||
/.emacs.desktop.lock
|
||||
*.elc
|
||||
.\#*
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
._*
|
||||
|
||||
# Waf build system
|
||||
/build/
|
||||
.waf-*-*/
|
||||
.waf3-*-*/
|
||||
.lock-waf*
|
||||
|
||||
# Compiled python code
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
|
||||
# Other
|
||||
/unit-tests.conf
|
||||
/VERSION
|
||||
@@ -1,15 +1,15 @@
|
||||
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
|
||||
|
||||
from waflib import TaskGen, Logs
|
||||
from waflib import TaskGen
|
||||
|
||||
def options(opt):
|
||||
opt.add_option('--with-coverage', action='store_true', default=False, dest='with_coverage',
|
||||
help='''Set compiler flags for gcc to enable code coverage information''')
|
||||
opt.add_option('--with-coverage', action='store_true', default=False,
|
||||
help='Add compiler flags to enable code coverage information')
|
||||
|
||||
def configure(conf):
|
||||
if conf.options.with_coverage:
|
||||
if not conf.options.debug:
|
||||
conf.fatal("Code coverage flags require debug mode compilation (add --debug)")
|
||||
conf.fatal('Code coverage flags require debug mode compilation (add --debug)')
|
||||
conf.check_cxx(cxxflags=['-fprofile-arcs', '-ftest-coverage', '-fPIC'],
|
||||
linkflags=['-fprofile-arcs'], uselib_store='GCOV', mandatory=True)
|
||||
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
|
||||
|
||||
from waflib import Logs, Configure, Utils
|
||||
from waflib import Configure, Logs, Utils
|
||||
|
||||
def options(opt):
|
||||
opt.add_option('--debug', '--with-debug', action='store_true', default=False, dest='debug',
|
||||
help='''Compile in debugging mode with minimal optimizations (-O0 or -Og)''')
|
||||
opt.add_option('--debug', '--with-debug', action='store_true', default=False,
|
||||
help='Compile in debugging mode with minimal optimizations (-O0 or -Og)')
|
||||
|
||||
def configure(conf):
|
||||
conf.start_msg('Checking C++ compiler version')
|
||||
|
||||
cxx = conf.env['CXX_NAME'] # CXX_NAME is the generic name of the compiler
|
||||
ccver = tuple(int(i) for i in conf.env['CC_VERSION'])
|
||||
cxx = conf.env.CXX_NAME # generic name of the compiler
|
||||
ccver = tuple(int(i) for i in conf.env.CC_VERSION)
|
||||
ccverstr = '.'.join(conf.env.CC_VERSION)
|
||||
errmsg = ''
|
||||
warnmsg = ''
|
||||
if cxx == 'gcc':
|
||||
@@ -28,13 +29,13 @@ def configure(conf):
|
||||
conf.flags = CompilerFlags()
|
||||
|
||||
if errmsg:
|
||||
conf.end_msg('.'.join(conf.env['CC_VERSION']), color='RED')
|
||||
conf.end_msg(ccverstr, color='RED')
|
||||
conf.fatal(errmsg)
|
||||
elif warnmsg:
|
||||
conf.end_msg('.'.join(conf.env['CC_VERSION']), color='YELLOW')
|
||||
conf.end_msg(ccverstr, color='YELLOW')
|
||||
Logs.warn(warnmsg)
|
||||
else:
|
||||
conf.end_msg('.'.join(conf.env['CC_VERSION']))
|
||||
conf.end_msg(ccverstr)
|
||||
|
||||
conf.areCustomCxxflagsPresent = (len(conf.env.CXXFLAGS) > 0)
|
||||
|
||||
@@ -53,10 +54,10 @@ def check_compiler_flags(conf):
|
||||
extraFlags = conf.flags.getDebugFlags(conf)
|
||||
if conf.areCustomCxxflagsPresent:
|
||||
missingFlags = [x for x in extraFlags['CXXFLAGS'] if x not in conf.env.CXXFLAGS]
|
||||
if len(missingFlags) > 0:
|
||||
Logs.warn("Selected debug mode, but CXXFLAGS is set to a custom value '%s'"
|
||||
% " ".join(conf.env.CXXFLAGS))
|
||||
Logs.warn("Default flags '%s' are not activated" % " ".join(missingFlags))
|
||||
if missingFlags:
|
||||
Logs.warn('Selected debug mode, but CXXFLAGS is set to a custom value "%s"'
|
||||
% ' '.join(conf.env.CXXFLAGS))
|
||||
Logs.warn('Default flags "%s" will not be used' % ' '.join(missingFlags))
|
||||
else:
|
||||
extraFlags = conf.flags.getOptimizedFlags(conf)
|
||||
|
||||
@@ -106,6 +107,9 @@ def add_supported_linkflags(self, linkflags):
|
||||
|
||||
|
||||
class CompilerFlags(object):
|
||||
def getCompilerVersion(self, conf):
|
||||
return tuple(int(i) for i in conf.env.CC_VERSION)
|
||||
|
||||
def getGeneralFlags(self, conf):
|
||||
"""Get dict of CXXFLAGS, LINKFLAGS, and DEFINES that are always needed"""
|
||||
return {'CXXFLAGS': [], 'LINKFLAGS': [], 'DEFINES': []}
|
||||
@@ -160,16 +164,14 @@ class GccBasicFlags(CompilerFlags):
|
||||
class GccFlags(GccBasicFlags):
|
||||
def getDebugFlags(self, conf):
|
||||
flags = super(GccFlags, self).getDebugFlags(conf)
|
||||
version = tuple(int(i) for i in conf.env['CC_VERSION'])
|
||||
if version < (5, 1, 0):
|
||||
if self.getCompilerVersion(conf) < (5, 1, 0):
|
||||
flags['CXXFLAGS'] += ['-Wno-missing-field-initializers']
|
||||
flags['CXXFLAGS'] += ['-fdiagnostics-color'] # gcc >= 4.9
|
||||
return flags
|
||||
|
||||
def getOptimizedFlags(self, conf):
|
||||
flags = super(GccFlags, self).getOptimizedFlags(conf)
|
||||
version = tuple(int(i) for i in conf.env['CC_VERSION'])
|
||||
if version < (5, 1, 0):
|
||||
if self.getCompilerVersion(conf) < (5, 1, 0):
|
||||
flags['CXXFLAGS'] += ['-Wno-missing-field-initializers']
|
||||
flags['CXXFLAGS'] += ['-fdiagnostics-color'] # gcc >= 4.9
|
||||
return flags
|
||||
@@ -177,8 +179,8 @@ class GccFlags(GccBasicFlags):
|
||||
class ClangFlags(GccBasicFlags):
|
||||
def getGeneralFlags(self, conf):
|
||||
flags = super(ClangFlags, self).getGeneralFlags(conf)
|
||||
version = tuple(int(i) for i in conf.env['CC_VERSION'])
|
||||
if Utils.unversioned_sys_platform() == 'darwin' and version >= (9, 0, 0): # Bug #4296
|
||||
if Utils.unversioned_sys_platform() == 'darwin' and self.getCompilerVersion(conf) >= (9, 0, 0):
|
||||
# Bug #4296
|
||||
flags['CXXFLAGS'] += [['-isystem', '/usr/local/include'], # for Homebrew
|
||||
['-isystem', '/opt/local/include']] # for MacPorts
|
||||
return flags
|
||||
@@ -194,7 +196,7 @@ class ClangFlags(GccBasicFlags):
|
||||
'-Wno-error=unneeded-internal-declaration', # Bug #1588
|
||||
'-Wno-unused-local-typedef', # Bugs #2657 and #3209
|
||||
]
|
||||
version = tuple(int(i) for i in conf.env['CC_VERSION'])
|
||||
version = self.getCompilerVersion(conf)
|
||||
if version < (3, 9, 0) or (Utils.unversioned_sys_platform() == 'darwin' and version < (8, 1, 0)):
|
||||
flags['CXXFLAGS'] += ['-Wno-unknown-pragmas']
|
||||
return flags
|
||||
@@ -206,7 +208,7 @@ class ClangFlags(GccBasicFlags):
|
||||
'-Wundefined-func-template',
|
||||
'-Wno-unused-local-typedef', # Bugs #2657 and #3209
|
||||
]
|
||||
version = tuple(int(i) for i in conf.env['CC_VERSION'])
|
||||
version = self.getCompilerVersion(conf)
|
||||
if version < (3, 9, 0) or (Utils.unversioned_sys_platform() == 'darwin' and version < (8, 1, 0)):
|
||||
flags['CXXFLAGS'] += ['-Wno-unknown-pragmas']
|
||||
return flags
|
||||
@@ -4,10 +4,10 @@ from waflib import Options, Logs
|
||||
from waflib.Configure import conf
|
||||
|
||||
def addDependencyOptions(self, opt, name, extraHelp=''):
|
||||
opt.add_option('--with-%s' % name, type='string', default=None,
|
||||
dest='with_%s' % name,
|
||||
opt.add_option('--with-%s' % name, metavar='PATH',
|
||||
help='Path to %s, e.g., /usr/local %s' % (name, extraHelp))
|
||||
setattr(Options.OptionsContext, "addDependencyOptions", addDependencyOptions)
|
||||
|
||||
setattr(Options.OptionsContext, 'addDependencyOptions', addDependencyOptions)
|
||||
|
||||
@conf
|
||||
def checkDependency(self, name, **kw):
|
||||
@@ -18,8 +18,8 @@ def checkDependency(self, name, **kw):
|
||||
kw['mandatory'] = kw.get('mandatory', True)
|
||||
|
||||
if root:
|
||||
isOk = self.check_cxx(includes="%s/include" % root,
|
||||
libpath="%s/lib" % root,
|
||||
isOk = self.check_cxx(includes='%s/include' % root,
|
||||
libpath='%s/lib' % root,
|
||||
**kw)
|
||||
else:
|
||||
isOk = self.check_cxx(**kw)
|
||||
|
||||
+5
-10
@@ -52,7 +52,7 @@ Note that precompiled header must have multiple inclusion guards. If the guards
|
||||
"""
|
||||
|
||||
import os
|
||||
from waflib import Task, TaskGen, Logs, Utils
|
||||
from waflib import Task, TaskGen, Utils
|
||||
from waflib.Tools import c_preproc, cxx
|
||||
|
||||
|
||||
@@ -67,11 +67,6 @@ def options(opt):
|
||||
|
||||
def configure(conf):
|
||||
if (conf.options.with_pch and conf.env['COMPILER_CXX'] in PCH_COMPILER_OPTIONS.keys()):
|
||||
if Utils.unversioned_sys_platform() == "darwin" and conf.env['CXX_NAME'] == 'clang':
|
||||
version = tuple(int(i) for i in conf.env['CC_VERSION'])
|
||||
if version < (6, 1, 0):
|
||||
# Issue #2804
|
||||
return
|
||||
conf.env.WITH_PCH = True
|
||||
flags = PCH_COMPILER_OPTIONS[conf.env['COMPILER_CXX']]
|
||||
conf.env.CXXPCH_F = flags[0]
|
||||
@@ -95,8 +90,8 @@ def apply_pch(self):
|
||||
|
||||
if getattr(self, 'name', None):
|
||||
try:
|
||||
task = self.bld.pch_tasks[self.name]
|
||||
self.bld.fatal("Duplicated 'pch' task with name %r" % self.name)
|
||||
task = self.bld.pch_tasks["%s.%s" % (self.name, self.idx)]
|
||||
self.bld.fatal("Duplicated 'pch' task with name %r" % "%s.%s" % (self.name, self.idx))
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
@@ -109,7 +104,7 @@ def apply_pch(self):
|
||||
|
||||
self.pch_task = task
|
||||
if getattr(self, 'name', None):
|
||||
self.bld.pch_tasks[self.name] = task
|
||||
self.bld.pch_tasks["%s.%s" % (self.name, self.idx)] = task
|
||||
|
||||
@TaskGen.feature('cxx')
|
||||
@TaskGen.after_method('process_source', 'propagate_uselib_vars')
|
||||
@@ -134,7 +129,7 @@ def add_pch(self):
|
||||
x.env.append_value('CXXFLAGS', self.env['CXXPCH_F'] + [pch.target])
|
||||
|
||||
class gchx(Task.Task):
|
||||
run_str = '${CXX} ${ARCH_ST:ARCH} ${CXXFLAGS} ${CPPFLAGS} ${CXXPCH_FLAGS} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${CXXPCH_F:SRC} ${CXX_SRC_F}${SRC[0].abspath()} ${CXX_TGT_F}${TGT[0].abspath()}'
|
||||
run_str = '${CXX} ${ARCH_ST:ARCH} ${CXXFLAGS} ${CXXPCH_FLAGS} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${CXXPCH_F:SRC} ${CXX_SRC_F}${SRC[0].abspath()} ${CXX_TGT_F}${TGT[0].abspath()} ${CPPFLAGS}'
|
||||
scan = c_preproc.scan
|
||||
color = 'BLUE'
|
||||
ext_out=['.h']
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
|
||||
#
|
||||
# Copyright (c) 2014, Regents of the University of California
|
||||
# Copyright (c) 2014-2018, Regents of the University of California
|
||||
#
|
||||
# GPL 3.0 license, see the COPYING.md file for more information
|
||||
|
||||
@@ -15,8 +15,9 @@ BOOST_ASIO_HAS_LOCAL_SOCKETS_CHECK = '''
|
||||
|
||||
def addUnixOptions(self, opt):
|
||||
opt.add_option('--force-unix-socket', action='store_true', default=False,
|
||||
dest='force_unix_socket', help='''Forcefully enable Unix sockets support''')
|
||||
setattr(Options.OptionsContext, "addUnixOptions", addUnixOptions)
|
||||
help='Forcefully enable Unix sockets support')
|
||||
|
||||
setattr(Options.OptionsContext, 'addUnixOptions', addUnixOptions)
|
||||
|
||||
def configure(conf):
|
||||
def boost_asio_has_local_sockets():
|
||||
@@ -26,4 +27,4 @@ def configure(conf):
|
||||
|
||||
if conf.options.force_unix_socket or boost_asio_has_local_sockets():
|
||||
conf.define('HAVE_UNIX_SOCKETS', 1)
|
||||
conf.env['HAVE_UNIX_SOCKETS'] = True
|
||||
conf.env.HAVE_UNIX_SOCKETS = True
|
||||
+12
-15
@@ -6,7 +6,8 @@ import re
|
||||
def addWebsocketOptions(self, opt):
|
||||
opt.add_option('--without-websocket', action='store_false', default=True,
|
||||
dest='with_websocket', help='Disable WebSocket face support')
|
||||
setattr(Options.OptionsContext, "addWebsocketOptions", addWebsocketOptions)
|
||||
|
||||
setattr(Options.OptionsContext, 'addWebsocketOptions', addWebsocketOptions)
|
||||
|
||||
@Configure.conf
|
||||
def checkWebsocket(self, **kw):
|
||||
@@ -15,7 +16,7 @@ def checkWebsocket(self, **kw):
|
||||
|
||||
isMandatory = kw.get('mandatory', True)
|
||||
|
||||
self.start_msg('Checking for WebSocket includes')
|
||||
self.start_msg('Checking for WebSocket++ includes')
|
||||
|
||||
try:
|
||||
websocketDir = self.path.find_dir('websocketpp/websocketpp')
|
||||
@@ -24,40 +25,36 @@ def checkWebsocket(self, **kw):
|
||||
|
||||
versionFile = websocketDir.find_node('version.hpp')
|
||||
if not websocketDir:
|
||||
raise Errors.WafError('Corrupted: WebSocket version file not found')
|
||||
raise Errors.WafError('WebSocket++ version file not found')
|
||||
|
||||
try:
|
||||
txt = versionFile.read()
|
||||
except (OSError, IOError):
|
||||
raise Errors.WafError('Corrupted: cannot read WebSocket version file')
|
||||
raise Errors.WafError('Cannot read WebSocket++ version file')
|
||||
|
||||
version = [None, None, None]
|
||||
# Looking for the following:
|
||||
# static int const major_version = 0;
|
||||
# static int const minor_version = 7;
|
||||
# static int const patch_version = 0;
|
||||
|
||||
version = [None, None, None]
|
||||
|
||||
majorVersion = re.compile('^static int const major_version = (\\d+);$', re.M)
|
||||
version[0] = majorVersion.search(txt)
|
||||
|
||||
minorVersion = re.compile('^static int const minor_version = (\\d+);$', re.M)
|
||||
version[1] = minorVersion.search(txt)
|
||||
|
||||
patchVersion = re.compile('^static int const patch_version = (\\d+);$', re.M)
|
||||
version[2] = patchVersion.search(txt)
|
||||
|
||||
if not version[0] or not version[1] or not version[2]:
|
||||
raise Errors.WafError('Corrupted: cannot detect websocket version')
|
||||
raise Errors.WafError('Cannot detect WebSocket++ version')
|
||||
|
||||
self.env['WEBSOCKET_VERSION'] = [i.group(1) for i in version]
|
||||
self.env.WEBSOCKET_VERSION = [i.group(1) for i in version]
|
||||
|
||||
# todo: version checking, if necessary
|
||||
|
||||
self.end_msg('.'.join(self.env['WEBSOCKET_VERSION']))
|
||||
self.end_msg('.'.join(self.env.WEBSOCKET_VERSION))
|
||||
|
||||
self.env['INCLUDES_WEBSOCKET'] = websocketDir.parent.abspath()
|
||||
self.env['HAVE_WEBSOCKET'] = True
|
||||
self.env.INCLUDES_WEBSOCKET = websocketDir.parent.abspath()
|
||||
self.env.HAVE_WEBSOCKET = True
|
||||
self.define('HAVE_WEBSOCKET', 1)
|
||||
self.define('_WEBSOCKETPP_CPP11_STL_', 1)
|
||||
|
||||
@@ -71,6 +68,6 @@ def checkWebsocket(self, **kw):
|
||||
Logs.warn(' curl -L https://github.com/zaphoyd/websocketpp/archive/0.7.0.tar.gz > websocket.tar.gz')
|
||||
Logs.warn(' tar zxf websocket.tar.gz -C websocketpp/ --strip 1')
|
||||
Logs.warn('Alternatively, WebSocket support can be disabled with --without-websocket')
|
||||
self.fatal("The configuration failed")
|
||||
self.fatal('The configuration failed')
|
||||
else:
|
||||
self.end_msg(str(error))
|
||||
Whitespace-only changes.
+69
-149
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# NFD - Named Data Networking Forwarding Daemon documentation build configuration file, created by
|
||||
# sphinx-quickstart on Sun Apr 6 19:58:22 2014.
|
||||
# NFD documentation build configuration file, created by
|
||||
# sphinx-quickstart on Wed Mar 7 19:23:56 2018.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its
|
||||
# containing dir.
|
||||
@@ -21,10 +21,12 @@ import sys
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
sys.path.insert(0, os.path.abspath('.'))
|
||||
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
#needs_sphinx = '1.0'
|
||||
#
|
||||
# needs_sphinx = '1.0'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
@@ -46,149 +48,79 @@ def addExtensionIfExists(extension):
|
||||
|
||||
addExtensionIfExists('sphinxcontrib.doxylink')
|
||||
|
||||
if os.getenv('GOOGLE_ANALYTICS', None):
|
||||
addExtensionIfExists('sphinxcontrib.googleanalytics')
|
||||
# sphinxcontrib.googleanalytics is currently not working with the latest version of Sphinx
|
||||
# if os.getenv('GOOGLE_ANALYTICS', None):
|
||||
# addExtensionIfExists('sphinxcontrib.googleanalytics')
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
# The suffix(es) of source filenames.
|
||||
# You can specify multiple suffix as a list of string:
|
||||
#
|
||||
# source_suffix = ['.rst', '.md']
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'NFD - Named Data Networking Forwarding Daemon'
|
||||
copyright = u'2014-%d, Named Data Networking Project' % datetime.date.today().year
|
||||
author = u'Named Data Networking Project'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
# version = u''
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
# release = u''
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#language = None
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
#
|
||||
# This is also used if you do content translation via gettext catalogs.
|
||||
# Usually you set "language" from the command line for these cases.
|
||||
language = None
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This patterns also effect to html_static_path and html_extra_path
|
||||
exclude_patterns = []
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all
|
||||
# documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
# If true, keep warnings as "system message" paragraphs in the built documents.
|
||||
#keep_warnings = False
|
||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||
todo_include_todos = False
|
||||
|
||||
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
# html_theme = 'default'
|
||||
#
|
||||
# html_theme = 'alabaster'
|
||||
html_theme = 'named_data_theme'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
#
|
||||
# html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
html_theme_path = ['./']
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
#html_logo = None
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
html_theme_path = ['.']
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
|
||||
# Add any extra paths that contain custom files (such as robots.txt or
|
||||
# .htaccess) here, relative to this directory. These files are copied
|
||||
# directly to the root of the documentation.
|
||||
#html_extra_path = []
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
#html_show_sphinx = True
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
html_file_suffix = ".html"
|
||||
# -- Options for HTMLHelp output ------------------------------------------
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'nfd-docs'
|
||||
@@ -197,80 +129,68 @@ htmlhelp_basename = 'nfd-docs'
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#'papersize': 'letterpaper',
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#'pointsize': '10pt',
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#
|
||||
# 'preamble': '',
|
||||
|
||||
# Latex figure (float) alignment
|
||||
#
|
||||
# 'figure_align': 'htbp',
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
('index', 'nfd-docs.tex', u'NFD - Named Data Networking Forwarding Daemon Documentation',
|
||||
u'Named Data Networking Project', 'manual'),
|
||||
('index', 'nfd-docs.tex', u'NFD - Named Data Networking Forwarding Daemon Documentation',
|
||||
u'Named Data Networking Project', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
#latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#latex_show_urls = False
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output ---------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('manpages/nfd', 'nfd', u'Named Data Networking Forwarding Daemon', None, 1),
|
||||
('manpages/nfdc', 'nfdc', u'interact with NFD management', None, 1),
|
||||
('manpages/nfdc-status', 'nfdc-status', u'show NFD status', None, 1),
|
||||
('manpages/nfdc-face', 'nfdc-face', u'show and manipulate NFD faces', None, 1),
|
||||
('manpages/nfdc-route', 'nfdc-route', u'show and manipulate NFD routes', None, 1),
|
||||
('manpages/nfdc-cs', 'nfdc-cs', u'show and manipulate NFD Content Store', None, 1),
|
||||
('manpages/nfdc-strategy', 'nfdc-strategy', u'show and manipulate NFD strategy choices', None, 1),
|
||||
('manpages/nfd-status', 'nfd-status', u'comprehensive report of NFD status', None, 1),
|
||||
('manpages/nfd-status-http-server', 'nfd-status-http-server',
|
||||
u'NFD status HTTP server', None, 1),
|
||||
('manpages/ndn-autoconfig-server', 'ndn-autoconfig-server',
|
||||
u'NDN auto-configuration server', None, 1),
|
||||
('manpages/ndn-autoconfig', 'ndn-autoconfig',
|
||||
u'NDN auto-configuration client', None, 1),
|
||||
('manpages/ndn-autoconfig.conf', 'ndn-autoconfig.conf',
|
||||
u'NDN auto-configuration client configuration file', None, 5),
|
||||
('manpages/nfd-autoreg', 'nfd-autoreg', u'NFD Auto-registration Server', None, 1),
|
||||
('manpages/nfd-asf-strategy', 'nfd-asf-strategy', u'NFD ASF Strategy', None, 7),
|
||||
('manpages/nfd', 'nfd', u'Named Data Networking Forwarding Daemon', '', 1),
|
||||
('manpages/nfdc', 'nfdc', u'Interact with NFD management', '', 1),
|
||||
('manpages/nfdc-status', 'nfdc-status', u'Show NFD status', '', 1),
|
||||
('manpages/nfdc-face', 'nfdc-face', u'Show and manipulate NFD faces', '', 1),
|
||||
('manpages/nfdc-route', 'nfdc-route', u'Show and manipulate NFD routes', '', 1),
|
||||
('manpages/nfdc-cs', 'nfdc-cs', u'Show and manipulate NFD Content Store', '', 1),
|
||||
('manpages/nfdc-strategy', 'nfdc-strategy', u'Show and manipulate NFD strategy choices', '', 1),
|
||||
('manpages/nfd-status', 'nfd-status', u'Comprehensive report of NFD status', '', 1),
|
||||
('manpages/nfd-status-http-server', 'nfd-status-http-server', u'NFD status HTTP server', '', 1),
|
||||
('manpages/ndn-autoconfig-server', 'ndn-autoconfig-server', u'NDN auto-configuration server', '', 1),
|
||||
('manpages/ndn-autoconfig', 'ndn-autoconfig', u'NDN auto-configuration client', '', 1),
|
||||
('manpages/ndn-autoconfig.conf', 'ndn-autoconfig.conf', u'NDN auto-configuration client configuration file', '', 5),
|
||||
('manpages/nfd-autoreg', 'nfd-autoreg', u'NFD auto-registration server', '', 1),
|
||||
('manpages/nfd-asf-strategy', 'nfd-asf-strategy', u'NFD ASF strategy', '', 7),
|
||||
]
|
||||
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#man_show_urls = False
|
||||
# -- Options for Texinfo output -------------------------------------------
|
||||
|
||||
# Grouping the document tree into Texinfo files. List of tuples
|
||||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = []
|
||||
|
||||
|
||||
doxylink = {
|
||||
'nfd' : ('NFD.tag', 'doxygen/'),
|
||||
'nfd' : ('NFD.tag', 'doxygen/'),
|
||||
}
|
||||
|
||||
if os.getenv('GOOGLE_ANALYTICS', None):
|
||||
googleanalytics_id = os.environ['GOOGLE_ANALYTICS']
|
||||
googleanalytics_enabled = True
|
||||
|
||||
redmine_project_url = "https://redmine.named-data.net/"
|
||||
redmine_project_url = 'https://redmine.named-data.net/'
|
||||
+2
-3
@@ -2,9 +2,8 @@ NFD - Named Data Networking Forwarding Daemon
|
||||
=============================================
|
||||
|
||||
NFD is a network forwarder that implements and evolves together with the Named Data
|
||||
Networking (NDN) `protocol <https://named-data.net/doc/ndn-tlv/>`__. After the initial
|
||||
release, NFD will become a core component of the `NDN Platform
|
||||
<https://named-data.net/codebase/platform/>`__ and will follow the same release cycle.
|
||||
Networking (NDN) `protocol <https://named-data.net/doc/ndn-tlv/>`__. NFD is a core
|
||||
component of the `NDN Platform <https://named-data.net/codebase/platform/>`__.
|
||||
|
||||
NFD Documentation
|
||||
-----------------
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/*
|
||||
* Copyright (c) 2014-2017, Regents of the University of California,
|
||||
* Copyright (c) 2014-2018, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -24,13 +24,13 @@
|
||||
*/
|
||||
|
||||
#include "core/manager-base.hpp"
|
||||
#include "manager-common-fixture.hpp"
|
||||
#include "tests/manager-common-fixture.hpp"
|
||||
|
||||
#include <ndn-cxx/mgmt/nfd/control-command.hpp>
|
||||
#include <ndn-cxx/security/key-chain.hpp>
|
||||
#include <ndn-cxx/security/pib/identity.hpp>
|
||||
#include <ndn-cxx/security/pib/key.hpp>
|
||||
#include <ndn-cxx/security/pib/pib.hpp>
|
||||
#include <ndn-cxx/mgmt/nfd/control-command.hpp>
|
||||
|
||||
namespace nfd {
|
||||
namespace tests {
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
#include "face/generic-link-service.hpp"
|
||||
#include "face/face.hpp"
|
||||
|
||||
#include "test-common.hpp"
|
||||
#include "dummy-transport.hpp"
|
||||
#include "tests/test-common.hpp"
|
||||
|
||||
#include <ndn-cxx/lp/empty-value.hpp>
|
||||
#include <ndn-cxx/lp/prefix-announcement.hpp>
|
||||
|
||||
+15
-24
@@ -1,7 +1,6 @@
|
||||
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
|
||||
|
||||
"""
|
||||
Copyright (c) 2014-2016, Regents of the University of California,
|
||||
Copyright (c) 2014-2018, Regents of the University of California,
|
||||
Arizona Board of Regents,
|
||||
Colorado State University,
|
||||
University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -30,29 +29,21 @@ def build(bld):
|
||||
for module, name in {"cs-benchmark": "CS Benchmark",
|
||||
"pit-fib-benchmark": "PIT & FIB Benchmark"}.items():
|
||||
# main
|
||||
bld(target='unit-tests-%s-main' % module,
|
||||
name='unit-tests-%s-main' % module,
|
||||
features='cxx',
|
||||
source='../main.cpp',
|
||||
use='BOOST',
|
||||
defines=['BOOST_TEST_MODULE=%s' % name]
|
||||
)
|
||||
|
||||
bld.objects(target='other-tests-%s-main' % module,
|
||||
source='../main.cpp',
|
||||
use='BOOST',
|
||||
defines=['BOOST_TEST_MODULE=%s' % name])
|
||||
# module
|
||||
bld.program(target='../../%s' % module,
|
||||
features='cxx cxxprogram',
|
||||
source=bld.path.ant_glob(['%s*.cpp' % module]),
|
||||
use='daemon-objects unit-tests-base unit-tests-%s-main' % module,
|
||||
includes='.',
|
||||
install_path=None,
|
||||
defines=['UNIT_TEST_CONFIG_PATH=\"%s/tmp-files/\"' % bld.bldnode]
|
||||
)
|
||||
bld.program(name=module,
|
||||
target='../../%s' % module,
|
||||
source=bld.path.ant_glob('%s*.cpp' % module),
|
||||
use='daemon-objects unit-tests-base other-tests-%s-main' % module,
|
||||
defines=['UNIT_TEST_CONFIG_PATH="%s"' % bld.bldnode.make_node('tmp-files')],
|
||||
install_path=None)
|
||||
|
||||
# face-benchmark does not rely on Boost.Test
|
||||
bld.program(target='../../face-benchmark',
|
||||
features='cxx cxxprogram',
|
||||
source=bld.path.ant_glob(['face-benchmark*.cpp']),
|
||||
bld.program(name='face-benchmark',
|
||||
target='../../face-benchmark',
|
||||
source=bld.path.ant_glob('face-benchmark*.cpp'),
|
||||
use='daemon-objects',
|
||||
includes='.',
|
||||
install_path=None
|
||||
)
|
||||
install_path=None)
|
||||
@@ -24,9 +24,10 @@
|
||||
*/
|
||||
|
||||
#include "rib/rib-manager.hpp"
|
||||
#include "manager-common-fixture.hpp"
|
||||
#include "core/fib-max-depth.hpp"
|
||||
|
||||
#include "tests/manager-common-fixture.hpp"
|
||||
|
||||
#include <ndn-cxx/lp/tags.hpp>
|
||||
#include <ndn-cxx/mgmt/nfd/face-event-notification.hpp>
|
||||
#include <ndn-cxx/mgmt/nfd/face-status.hpp>
|
||||
|
||||
+35
-42
@@ -1,7 +1,6 @@
|
||||
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
|
||||
|
||||
"""
|
||||
Copyright (c) 2014-2016, Regents of the University of California,
|
||||
Copyright (c) 2014-2018, Regents of the University of California,
|
||||
Arizona Board of Regents,
|
||||
Colorado State University,
|
||||
University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -28,55 +27,49 @@ top = '..'
|
||||
|
||||
def build(bld):
|
||||
# Unit tests
|
||||
if bld.env['WITH_TESTS']:
|
||||
if bld.env.WITH_TESTS:
|
||||
config_path = 'UNIT_TEST_CONFIG_PATH="%s"' % bld.bldnode.make_node('tmp-files')
|
||||
|
||||
# common test modules
|
||||
unit_test_base = bld(
|
||||
# common test objects
|
||||
bld.objects(
|
||||
target='unit-tests-base',
|
||||
name='unit-tests-base',
|
||||
features='cxx pch',
|
||||
source=bld.path.ant_glob(['*.cpp'], excl='main.cpp'),
|
||||
features='pch',
|
||||
source=bld.path.ant_glob('*.cpp', excl='main.cpp'),
|
||||
use='core-objects',
|
||||
headers='../core/common.hpp boost-test.hpp',
|
||||
defines='UNIT_TEST_CONFIG_PATH=\"%s/tmp-files/\"' % bld.bldnode,
|
||||
)
|
||||
defines=[config_path])
|
||||
|
||||
for module, name in {"core": "Core Tests",
|
||||
"daemon": "Daemon Tests",
|
||||
"rib": "RIB Tests",
|
||||
"tools": "Tools Tests"}.items():
|
||||
# main()
|
||||
bld(target='unit-tests-%s-main' % module,
|
||||
name='unit-tests-%s-main' % module,
|
||||
features='cxx',
|
||||
use='BOOST',
|
||||
source='main.cpp',
|
||||
defines=['BOOST_TEST_MODULE=%s' % name]
|
||||
)
|
||||
# main() for the module
|
||||
bld.objects(target='unit-tests-%s-main' % module,
|
||||
source='main.cpp',
|
||||
use='BOOST',
|
||||
defines=['BOOST_TEST_MODULE=%s' % name])
|
||||
|
||||
node = bld.path.find_dir(module)
|
||||
src = node.ant_glob('**/*.cpp', excl=['face/*ethernet*.cpp',
|
||||
'face/pcap*.cpp',
|
||||
'face/unix*.cpp',
|
||||
'face/websocket*.cpp'])
|
||||
if bld.env.HAVE_LIBPCAP:
|
||||
src += node.ant_glob('face/*ethernet*.cpp')
|
||||
src += node.ant_glob('face/pcap*.cpp')
|
||||
if bld.env.HAVE_UNIX_SOCKETS:
|
||||
src += node.ant_glob('face/unix*.cpp')
|
||||
if bld.env.HAVE_WEBSOCKET:
|
||||
src += node.ant_glob('face/websocket*.cpp')
|
||||
|
||||
# unit-tests-%module
|
||||
unit_tests = bld.program(
|
||||
target='../unit-tests-%s' % module,
|
||||
features='cxx cxxprogram',
|
||||
source=bld.path.ant_glob(['%s/**/*.cpp' % module],
|
||||
excl=['%s/**/ethernet*.cpp' % module,
|
||||
'%s/**/unix*.cpp' % module,
|
||||
'%s/**/websocket*.cpp' % module]),
|
||||
use='%s-objects unit-tests-base unit-tests-%s-main' % (module, module),
|
||||
includes='.',
|
||||
install_path=None,
|
||||
defines='UNIT_TEST_CONFIG_PATH=\"%s/tmp-files/\"' % bld.bldnode,
|
||||
)
|
||||
bld.program(name='unit-tests-%s' % module,
|
||||
target='../unit-tests-%s' % module,
|
||||
source=src,
|
||||
use='%s-objects unit-tests-base unit-tests-%s-main' % (module, module),
|
||||
defines=[config_path],
|
||||
install_path=None)
|
||||
|
||||
if bld.env['HAVE_LIBPCAP']:
|
||||
unit_tests.source += bld.path.ant_glob('%s/**/ethernet*.cpp' % module)
|
||||
|
||||
if bld.env['HAVE_UNIX_SOCKETS']:
|
||||
unit_tests.source += bld.path.ant_glob('%s/**/unix*.cpp' % module)
|
||||
|
||||
if bld.env['HAVE_WEBSOCKET']:
|
||||
unit_tests.source += bld.path.ant_glob('%s/**/websocket*.cpp' % module)
|
||||
|
||||
# Other tests (e.g., stress tests that can be enabled even if unit tests are disabled)
|
||||
if bld.env['WITH_TESTS'] or bld.env['WITH_OTHER_TESTS']:
|
||||
bld.recurse("other")
|
||||
# Other tests (e.g., stress tests and benchmarks that can be enabled even if unit tests are disabled)
|
||||
if bld.env.WITH_TESTS or bld.env.WITH_OTHER_TESTS:
|
||||
bld.recurse('other')
|
||||
+57
-28
@@ -1,59 +1,88 @@
|
||||
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
|
||||
"""
|
||||
Copyright (c) 2014-2018, Regents of the University of California,
|
||||
Arizona Board of Regents,
|
||||
Colorado State University,
|
||||
University Pierre & Marie Curie, Sorbonne University,
|
||||
Washington University in St. Louis,
|
||||
Beijing Institute of Technology,
|
||||
The University of Memphis.
|
||||
|
||||
from waflib import Utils, Context
|
||||
This file is part of NFD (Named Data Networking Forwarding Daemon).
|
||||
See AUTHORS.md for complete list of NFD authors and contributors.
|
||||
|
||||
NFD is free software: you can redistribute it and/or modify it under the terms
|
||||
of the GNU General Public License as published by the Free Software Foundation,
|
||||
either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
top = '..'
|
||||
|
||||
from waflib import Context, Utils
|
||||
|
||||
def build(bld):
|
||||
TOOLS_DEPENDENCY = 'core-objects NDN_CXX BOOST LIBRESOLV'
|
||||
commonDeps = 'core-objects NDN_CXX BOOST LIBRESOLV'
|
||||
|
||||
# Single object tools:
|
||||
# tools/example-tool.cpp is a self-contained tool with a main() function
|
||||
# and is built as build/bin/example-tool.
|
||||
# These tools cannot be unit-tested.
|
||||
for i in bld.path.ant_glob(['*.cpp']):
|
||||
name = str(i)[:-len('.cpp')]
|
||||
bld.program(target='../bin/%s' % name,
|
||||
source=[i],
|
||||
use=TOOLS_DEPENDENCY)
|
||||
for tool in bld.path.ant_glob('*.cpp'):
|
||||
name = tool.change_ext('').path_from(bld.path.get_bld())
|
||||
bld.program(name=name,
|
||||
target='../bin/%s' % name,
|
||||
source=[tool],
|
||||
use=commonDeps)
|
||||
|
||||
# Sub-directory tools:
|
||||
# tools/example-tool/**/*.cpp is compiled and linked into build/bin/example-tool.
|
||||
# tools/example-tool/main.cpp must exist and must contain the main() function.
|
||||
# All other objects are collected into 'tools-objects' and can be unit-tested.
|
||||
testableObjects = []
|
||||
for name in bld.path.ant_glob(['*'], dir=True, src=False):
|
||||
mainFile = bld.path.find_node(['%s/main.cpp' % name])
|
||||
for subdir in bld.path.ant_glob('*', dir=True, src=False):
|
||||
mainFile = subdir.find_node('main.cpp')
|
||||
if mainFile is None:
|
||||
continue # not a C++ tool
|
||||
srcFiles = bld.path.ant_glob(['%s/**/*.cpp' % name], excl=['%s/main.cpp' % name])
|
||||
|
||||
name = subdir.path_from(bld.path)
|
||||
srcFiles = subdir.ant_glob('**/*.cpp', excl=['main.cpp'])
|
||||
srcObjects = ''
|
||||
if srcFiles:
|
||||
srcObjects = 'tools-%s-objects' % name
|
||||
bld.objects(target=srcObjects,
|
||||
source=srcFiles,
|
||||
use=TOOLS_DEPENDENCY,
|
||||
includes='%s' % name)
|
||||
use=commonDeps,
|
||||
includes=name)
|
||||
testableObjects.append(srcObjects)
|
||||
else:
|
||||
srcObjects = ''
|
||||
|
||||
bld.program(target='../bin/%s' % name,
|
||||
bld.program(name=name,
|
||||
target='../bin/%s' % name,
|
||||
source=[mainFile],
|
||||
use=TOOLS_DEPENDENCY + ' ' + srcObjects,
|
||||
includes='%s' % name)
|
||||
use=commonDeps + ' ' + srcObjects,
|
||||
includes=name)
|
||||
|
||||
bld(target='tools-objects',
|
||||
export_includes='.',
|
||||
use=testableObjects)
|
||||
bld.objects(target='tools-objects',
|
||||
source=[],
|
||||
export_includes='.',
|
||||
use=testableObjects)
|
||||
|
||||
scripts = bld.path.ant_glob(['*.sh', '*.py'])
|
||||
bld(features='subst',
|
||||
name='scripts',
|
||||
target=['../bin/%s' % node.change_ext('') for node in scripts],
|
||||
source=scripts,
|
||||
install_path='${BINDIR}',
|
||||
chmod=Utils.O755,
|
||||
VERSION=Context.g_module.VERSION)
|
||||
# Scripts
|
||||
for script in bld.path.ant_glob(['*.sh', '*.py']):
|
||||
name = script.change_ext('').path_from(bld.path.get_bld())
|
||||
bld(features='subst',
|
||||
name=name,
|
||||
target='../bin/%s' % name,
|
||||
source=[script],
|
||||
install_path='${BINDIR}',
|
||||
chmod=Utils.O755,
|
||||
VERSION=Context.g_module.VERSION)
|
||||
|
||||
bld.install_files('${DATAROOTDIR}/ndn',
|
||||
bld.path.ant_glob('nfd-status-http-server-files/*'))
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python
|
||||
# encoding: ISO8859-1
|
||||
# Thomas Nagy, 2005-2015
|
||||
|
||||
# encoding: latin-1
|
||||
# Thomas Nagy, 2005-2018
|
||||
#
|
||||
"""
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
@@ -32,13 +32,13 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import os, sys, inspect
|
||||
|
||||
VERSION="1.8.9"
|
||||
REVISION="8a9ccbc1c5d3936b0b08e972e4883a9a"
|
||||
GIT="2a098b1e9bc626c19cbd47c1f670758c17edf54c"
|
||||
VERSION="2.0.6"
|
||||
REVISION="593191f496fe8c66231dfd5df26167ae"
|
||||
GIT="459ddf50b622573ecfe36c12c076e0fcc610b01e"
|
||||
INSTALL=''
|
||||
C1='#-'
|
||||
C2='#+'
|
||||
C3='#)'
|
||||
C1='#2'
|
||||
C2='#&'
|
||||
C3='#%'
|
||||
cwd = os.getcwd()
|
||||
join = os.path.join
|
||||
|
||||
@@ -165,5 +165,6 @@ if __name__ == '__main__':
|
||||
Scripting.waf_entry_point(cwd, VERSION, wafdir)
|
||||
|
||||
#==>
|
||||
#BZh91AY&SYüÆ6*Zÿÿ´�AÿÿÿÿÿÿÿÿÿÿÿD #)†Ž"¢D˜ @ ¨8aðœ÷½p€#)#)#)#)#)#)#)#)#)#)#)#)#)#)#)#)#)#)#)ùçÛµ‡>ÞJí}iÛeHÛCWmk^|ã½dm}šª¥ë×Ujï<÷x]“©¶“+jÝpâ�o}=×Îvºîí°W–$�¢¯g»=fv:z=ë:uë]»v]==(ßvCÛÝÝ›½é÷Þ{é+îûš«ÇAëÓßw}÷ß}žðúêvø_mÛ—Û}ƒàwc{©Å=åî#)#)#)#)€–Èoµ)ôt<t;}°—0ÓºX,ß@÷™ž�ÆÐwgF†3¾¯oG¡ï5 ÜÂT¡@¢†½A¡ŠP‰A{·Hz4%šJTë#)®Ë^ºw@éÓÞúízïwnáíZÀî½íç•2Ôwv”ìÜÍ]šqkî÷m•‘XúWs|põ·¾óëØ×Õ½Öóww>æ›{»·Û3<ßw¹ßnöU§váíõßHõŸ%‹=>¼Jîæžöw6¾ïpÈ*T;(¦Œ†^ë;™Û±žw¦v#)t=]î3¬h¥´H+{½ç¶ávÐ#)¢„ô3Ó@ô={4Ð7¯qZ�¼Ý'œ×nîÝAí¨Þ‹3îù½�€Ð.Í#-úxJ6aά¼{€;¹ç�S¾ÝAÖÏxó½”Snï@9›îÏÞoP¼÷x×v=ªù{°sm:4$ºzû¾ùãì,8÷^WTžµÊž�»ìåÛ¶chúÖûÞÏ×¾÷·¼ªç»;}{Ë=³_wÜ{L|ów®çΰ<׸i=àÏW�väžG§M9{kExEÙ®ú…¬Ûx·ñ¾ï‰Ý�µ›Îî·]Ï·÷rõ÷Ù[,÷hC7}¼¶òö¯v>÷ ïMòu€ï,ûϾó×¾÷È/¸}ÑÏ$€*#-:-„…˜�kjNjºÐ/²ã½+ì˜äê»[{±v–(åpa넨Žío`ÓXû·×Ýßo¾úú=ð#)öåÚ€�·_a—ÞÞ»ßol÷½´9wÝ�¹ºõéË}‡Ýë§Í>ÙãÕÝÃ�ºÅt#+í}o/¾÷gc=Ýn†ë±×·¼{kzsï·Šm¾öøm#)hŸ_}ç«kkP/£�UªÑàWo\íÖŽÞÞ'Ý÷Þu6MnûnÔ’âuÚöáðñ³ò>özÛ}öåöÜZÔÐÖÁU÷ÝÓ¡}ºx§]wŽø9uÐWÝ„éx_ZÛ¼žºìGϾ^÷wsï@0kD¬ÀÚϼ¶ß[ìz7;Gí¾ööÏ�Ö¶Òë³íËÐ÷ÜϽ÷¾fû·:Ëç»ÞßwÕwŸTÛÜåÑ W b¶Ð—«op;º·�îŠsƒTwnØtËxduŸ@:(5sC×·#)ôG³ÈÙ¼|_{½î‚@�ô+UAOoOo¾ûîõw@c}}w—K[.×Þx{Ûíç¶ùöݳwW=9t*ŠHÞíq»;[ë”'bõV_w¹î[GÙ[Ó/}gmô4»œ}Þ¯ºõ|CŸ+îÝavù>zn°§°£O¾Î=›k¢ëY[¯¢÷wÛÕ·½0W‹ï{“}™`éÙ+ͯêòð6û¡^>îšA#)#)™#)#)& #)&™�2dÑ“ô‘£ô ¦ž 4z<”ýPJhDL€&§¦ˆõ12i¨<S2!µ#+#+#)#)Ð#)#)#)#) &"`€#LMI´Töž©”óTñ=)êmªhhÚŸ©4Éä€hÐ#)#+#)#)#)Iꔑ4‚hj§á¢žQµOOJzžž¨Ñ£z†�£@4È#)4#)#+#)#+#)#)#)D�„Ð#)F�4È#)™a0#-yÓ&¦�#)#) #)#)j"4ja �MOjjhõOÒf©“õOÕ=ª‡éG¨~¨È€#)ÿï¢ÿRÛjîßì›Rmlº'êÛjîR3GÆÛS�²L’�„F@«„O|QRÑ@B±#)�ÝÇåù~–µd³óÍæö;…ß[Ç3YuŒ™‹qâ±W/V÷iÌ(ÃЦÞáó3ýD7ÌÿCà1)ìH@lðbê¼0ΦV›Ê[Úl’:eª²Jܶ(d•¹qÓ+˜ëß-ð´ãy½n“Wy5xàÖ¶JëÂfä·pø¹Â³êÓT;Ä+›Iêqþ~Žß· ÷ÞmY«6±’¹ºUiZ¤²¨H„‚€B 2(�ÕB©b€<‚ƒ2#-#)^ „† ¨Ø€�ˆ¢�€{ …BÊ‚�A Õ HŒŠ¢�(UI€P`ÌJC3LH„ȆŒfѳ4D”ÔŠXÈ™)E1M´•#+L’X XMR¢²Pa(f‰²…²c%fPE™¢XКaJH¤Ø‹F(ŠIJ”ÍQ Á,´�T’ ƒ)"E¶“T,–libjF()%Ò$aflZ5¦Õ¦µR’mDÉ’d�E±µ+XÍ0Í™Lµ%“)¶Ä©¶&6j’ML,Š$š‹fF¤f´m!&™ ¦IF‚’ÒAh¥*’±‰‚#-34¦&›Á*S`˜@1f#-™&D¢$¡dªH)bY42DJB)%%,Rdƒh¦2R“jÔcPÙX˜QE),J$Ò)DÆ,LT&Sh¤™i¤‰ Å‘¤Œ’¥S0Ö�¨dQ,1&$$�MˆÔ–ËD�l‚‘%Æ’�¦l`’MIˆ¤ŒˆH™‘¤ 3„d¬Ë04%F"B$„©6�$“M-$É¢ÊSÍ¢4Ò(Њ!JHFh4‰3T²À‹)E%!“K$Ù¦Q 5,RY‘±£+$ÌI"‹@3c,�¨’È*#-Yš1´Y¤l”fSf‰)¦Á¡ˆL¦1¦Ô™)3#+4”³Q¤²¥FÅ(¤ÔDÄ™IJ#-hÐ$Œ�Ó"„ƒA `Íi´3Ye,‹&aJB›I²Ql‘hÒL’J‹%#+#X#+&QCd“f³5Ä`”¨e3Jb#-™4EK³Sb“(²2bJÙ$…”Tȱ4Á@ƈÚRdÒ’f&É£&B¡�F°“+)0Ú&ÉH$²e¦š‘”ÊFXŒ’•Mš*6�D&PL‰IZ1¶4“5‘CI�I#*4† %‰hÚ5)3V&ZL‰š)0’ȉB¥�£I�ÆQšCfÕM´UdÔÐ5’ƒe$mÉL“ÖKEš4�1”Í4Ù)J-LŒlÛ�#-›(ÊFh¡K_Ѥ,!�–Q’šÆÖŠÅ¢£BfTDÓl–ƒTÅI-SC`ÒÄPÒ”„ÒF³*jÔYÖL†ÆQiQ¤Z&LÆ¥¥˜É"¢Ã3)ªÍd5dlЦØV)²‰,¨ÊUbš´›HVlf¥)M0ÛLP¦DXÖ�5*$´Ê4FXÚ+fhÛ U™ª5XHÔ”m±´lJ5FhˆU…A¢Ö5FÃ5!µˆMd…¶š!”¢J)ÑF©D¦Ôª5$›F5!b´Éš¶³jÓA,56£e‘2¦²$ÌÍM)“-ªZŠZJf¦›3ZU+%T¡ �´©”¤ÚšV›1i45³Y™’JË3`Ô–ÒÚY¦”hˆÔi(Ò!l„dB‚™&6£jH”›Êm�¥&š*2dÐi)…#-)¥DlRK1¤B#+4S%2cYMš±!(TlY’Å+5%€ÆÙ–M,ÆSHED”¢LX0›16"(ÔlIIFFƒH³(µ31#-JƘLØ4dر0ÆÌµš(K@R!©M£!fm66(Ð�¤´Ð‘I‚°¥–ƒ "LVBi)Mƒ%±#-MJ"I6jQ UU31°Ø©M&ÈÚL¢Í%¬A!�¢J$L›)&„©-&dlÍ1*[,ØÚ#-ÊlÑDlblRi©&S&Š™mHÉ”´l””fÀ‰& b&4cL£E5–M’”11RBE¢±a6-(ÛZi0É3D”šE¢˜Ø¤ˆÅ‚ÙiI&¤0ɘi)fCL+F�„6�Elš4&XV‚ ’-%±Pca@ÑIªR‰«ÆS3B�’JÌŠ’‰-!¢,²Ö¦,ɨ´c+%¡¥(TiIMT²J’™JQ«b#+REJ4•FFÉcY4•5TÌS(©Kd-b¡¤™²E&ņ�B"Å‹LÉC4`ÚL‰3DŠ©Di„Ê[1¢ÑZ-Ф„*%0c)Q¨Ú6™% QI„I«J#--)ªSi5±¬Vɬ–³H#-Ñlš’‹Å(#(1³B$„ÆÉL0f¨‚�±±mSm¤¡–ˆ+šŠ‰#-Ñ3l³j6ŠÅE¬I&Ú”fÍ�ÒÊĪ1h¦Xªš“M¥FŠQ,˜²¥E ’¢ŠÉY-’�²jÅ&Ò™”Y6�#-F¢’�‹m¶kZhÍBÉb$©”mÂ�h4š–ÍY1‘‹´QÑZ5±h¶Ú6¨e“kb-SR³j&Ê@Ø‘´“6VR‹$lÒ¢(&cbH’L¤™Rm‹2Õ1òþ‹ýWô[î[Ï—_Î`¹z~*di)›ÿÓ¸[5BÓüåÕ¤\2#-Jd]ê¢$LLY”ÿ°‹0áÿWú¨Ö*j-ÁÈŸûó Ê6½õížÊD>{9ÆCp<X«šå�Ü–#-Y�3£XÇ]Ù�©ñTüZ¡�~‡tõê?�æ²Ë¿Æ”“&„lh;•L³¶»Yb"<ŽÂXA"!¢vÍÜ#®¿eìÑûõ9Û‰„g¥‹üHWt㬊ÑÁF‘ãàíi�r7¨£�Ûìkd˜RTÆÛ®W]§ƒmÅ1Ì”*»!¥¥dª2˜`qi#’¤�y6ª$¥TbZef*¨eÂÿméof›š�’Ö`–ßM׃ŒC »U„MÙ#)l×v$Ó½›šJ,Fï:ñOgnùöòŸøhþ˘C�Ê�5ªôI³,b"§ºŒ¥Œ‹"¯Ùþ\��µ£0#-�¥ïv†*�6P…¡COèW÷ç$Æ•ª¤–‰eHb?ã8ð}”N¶ ŽÃËÀË»3*Ò8‡¶Q#+ƒDãÊÆŸé¯‹2B<¸´#+8]¨"D`Äcy¹j)5Ý΋¸Ñ\Üɤ)5¤Š )‚ø ÌHe€a §Jñ¹ä�²&Z`E=ÔÄ¥:ð²ßKœó‚;a+⤔:0ŠHC¢Ø”‡Š¿šÖ÷ž—»UÔ¶önšv(Ñ‘AðùÞÞ–FDP£GäU£–�Å#+4©XMÈ@n##Ý×aÝtÑPo’ç�þåô]äKDkò.öéÖé5ßß9W‹mþ1üa8þy¼÷Çý�Ǧ‡þ‰Ë$�õ1ÒBº»oç®Õʺ›\å»ù3ëÜûóK¨ˆ¦¦q,*´’�¾«^Û—â5Ïé?o�LÍÄV«8;B¿M\ę䡎²5m\¿Â§jjœ+�C»�²xqÖýé;Q#+èt%Öý]O,㱌Ÿ+]ðq P튀€ …?N`g{„3«BŠLÓÙtm éì•,XZ2ékÑcaþëÆ.ì1‰¶“¼°¥‚Á/N·�½øâŒ=P*']h³f ØÒ‚ˆµâ—šÅºº]ý¹Î$PÍ]œóÉßÏî·à2o±Úl’Œ…í„G°�m&žÆ»RO‹<†\ˆïHÔ_ûÍ/yT�6·£\-V)(ºµcÇz.KzíÙõwåÝM¢Œh¯Ì²oÍr±ªý·”Ôi÷ÜY0Êî ÷6£ÿn§_ñT8™*’S#+wWlF4X1ˆÂjOJJCÝŽ¹Ä„–4$RÚg^u„ÂEä… ä!BKII¦ÇÙŠ" ³•_�ìòcâã(ß®k�øq¤¶L/n·_òó¼ã±cX²UõOö‹Ý\�¯Æê¯;ò‡¥àaóÔ4ý#ŠÀŒ8Òãß#)ñçT¦‰Ï%Cˆ.•µ›3É �‚ˆ©#+{öžFæÝMñ.¤h®q,Uõõ&Ã!IµP]e‚ÁÒ€ö¤±G)QˆÒB„¶¡5uªSfÐ@ïª-¥Q4í»€ßËÏ–ÀÕàÂÓ·YRL•HÀ^Ö᪒©�¤·hœÜC%¨ú1ÙXm¥§d™j(ø‘³±£FoœÄ8W�Ьñí¨y³#)£É¥òíIžÙõŠû¤<Ù>Û;öß—Ï5îè)ÚÌãÚˆ«ÕF1tÊ� ¨ù\Û 9Ê©EJ‰©,9QFþ~·‡|T°ðIHDä”H¤&h ØÁž�*‡æOfÔÄ0„Œm6¡4‡f+«�û®÷åyaðá½ö²uCaÇêÌ!ýþ•jiÈ�LjN ¡Îê½&òéïƒÖšÍ˜tjɬ!H#-©K”[ï¢åbé–‹v#W*ƒÆ‰’Ù7¯tCefCáPoZïtÅF%‹�3ü2gP¦þU³|¸ÑsW½P‘Ñz×NÒ˜ûÈqe9/Ó8û/ùxÏ~yŒÅC¾ù$ǶóÆV1^75&}U4E9ùiö˜UˆüÔs[HB 5z¯lX?tB|å/tM Ø¥µ Line truncated
|
||||
#BZh91AY&SYü¢K°ÿÿ°ÐÿÿÿÿÿÿÿÿÿÿÿÿE ‚„ 0�#%ˆ(b|wzs*#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%#%úóJ´¶*«ûÜ=JV;ºîË×v›»ª‹^\¨IÓ$o£=>í_nÓk!Û®ÖëÓ'›ßO¾X6½³gvÝ”qP{»¯Z´kRÛ]/I±Û1Öï6¡z÷ÎÏ1¶*úwšûè÷yã×¹Z>º{ƆAÝž¾vwÇv]ã}½µ[½7v9Kmïk€#%#% #%»€À˜gÛ#%<m™vŒ¥Û·#&;›@Ü9Ù£VÀ#%ŽçUÝÓè®’žƒÐP9¬èÔ´ÑT¢µ¯C#%•H*”R‚ÞáÕ E$C £BT¨(hw¼!»ëo=ÖŸfW}'½»«˜›½êÞnS3®)PîîZdT§Z·×šèûß]è#%¹äó£^}³í‹Ûky½ìõ×yîôgmíË×¼¾÷;|»í}öÏiÙÒ¹9ï¹ïl°Þ³Ÿ½½÷Þ�¼ø\ôÐè¶ëÎÞ@:AH*ƒÐelkÖ¶Ù»u¬Ý»ÞzÇLWZí±£0îÎl¤Š”ş)è#%*"ˆ h<�ch•=î¹y–cníÝÁ¥7Ð;¾îçÌËìh¢€ 2=˜[ \`]æìÍ€ß{Ý�h{r®ûïyÐö½¹ßcÜûž÷ßcÒ󯫺»ƒ{�vz%¾¸qzµöòõ7�uÛ3{nâñ›ç¯¼ßw¯z{œõí»s¨Û{Ín’mã‹»k»»Ý«Ù]ÃŽž¾½êï�+±GÝ�HÖë…×^á wÝÂ_Éè×¼`£§¶¯®¾ÞÎ_n_I/»«DùökÛ»›6Ù«ÝÛ}Ί÷œ˜ûÙ/½ÁÞKë ôs½ïqé4ò݇k.�9°tçµçzuß{ﻇݰòÛpJ)@*% *UBftI¶p;=†�‹k7·c¾Ê·*ö÷¡í‚Ì÷3vÖt<«©³Ø1n“«ÍãÞj©o]åÔhAÝf÷s®Ìð#%·g8€#%¢÷«—#»ÎëÞgºÍ¶g'LŸlóÅ÷6[¾ìsx¹ÝCeôË£Ó§ßw}>\o»u{d7:"õÁsÖ¶Î-óÙÆîg%@h{{–Ú‹�u½(¹^)èR»ÃM«Ñ³ß^\}ó0ìåîõÏ+wrñãÜxûÞÝãÞfk³w>-=íÜ»”Æë}î|{FlÁ°l0äÐ;zé<¯§nñ|ÜîƒVÁš«‡ÖôhÙÕÙ{Ùß/«�»Þ´#%ÀU®Ø¸Õ°¹)O{Í4nÖïwvn.ë…[îÜ·ŽÕÖíÞŸCÐ÷Ìݾ·µ¯»YA}{îuóêû7±ÑÐ ôÂì¶yާužÏíOwváÜ:0-¶w¼îò{é÷Ø—ˆ4ô#%vböÍ«`î#%(wm{“ç¶¾øSßs€;°ª#%#2h2{{a]ÝÖí€Fæ{ÆïMÖÔhš±½iuÝÚë�¬·aô÷oUQCºXWNì®—vÝ·KÃwVsvÜmôïL—Œ¯!G3ñ|»¯÷Ÿ|¯ZÂ³Øø'¬Hš“MëîñÛ×]spÈÊãÞå±;Úu`ÝñÝ÷Îì ¯ƒ›s¨ñVóÒóŽðèï�|}îh€ #%@h44˜†šbh4§å#%š�Hö¨M6 ÐýSzPJh‚@€ ’`!2b“ÔýSôM¤�4H=A h#%#%#%#%‚DAÑ &)± ‘ªze<Ñ©š¤x“Ôyi#&¦ja=@dd44#%#%Iꔑ&§¢m“%=•=’žÕz�z�¡¡ê4z€=A¦G¨#%@#%#%$!#%L€ #&&L@“ÔÆJf˜ši�Fh#HÈ#%#%#%#%j"@&€ MÉ‘ªŸ…Oõ‰éOÊz†£Ñ¢<¦Ò4Ð#&€Ð#%—ÿÙþÕU®¸‘þô–µ9~åV»¦%1’�ñª×tB2UE¦'¾ÕmsjÚ¢Õó¤Á>ãï?ø~2ßÀuÒjÌR’ÓYŸŽ]¾%é7Š’›wsRÓŸò‹àºÌþÀ%qDH+Bƒ¯U¢Â»`í™'—æDôðÙ§‹‰ªuN�TÛÍñxyÁ‡ˆ"™¼/p+œb#2‚kg þ\¿¬W}ÆÛMT¶™l§uu«KmEµRU¬ÊÖ’¶Ú-´m¬ˆ#%Ü"*5#ÑʉAФŒ#%#%ÄT ¢‚ ƒaµ©+ô5n•o-ki«SWt 2¡ "¦b¢Šd,”fj3M‘&0H¤ØÚˆ™š„K#%–R�(¦ÚM†&h“A(Éjj-�ÑšK&šDhšˆD¨Å"jRŒ€F¥�#%i‹*mH¤Ù-Q%,´¦šÑ²Ò4Q–1Z5Q’TSd!%¦2P&4²Ò1�¥£SM„¶•µšÚÐ͉4fdÌ„ÑdÛMm4ÚÔ”l¤©Œµ6Ù•2Òd“A°kLMJ()‘FÈ‘hDŠ‹4�¢“¢¢AÅ%LÆiQT¦#Ä!#2 &0-ˆÉ#jBB4±Cl͈˜¦!™%4¬°fbD#&%‘ˆ¥’²llhؘT‹Ée!#E¥)‚lII‘FQ&ŒšdÄ‚¤£H”F’@¬‚›$‹DÌ¥¦"™‚lk$3b$Å436 …ˆÚ’À$²°„X$¤ØÔ&£�– ‘(ÐE"‰‚Á€˜ed”Â1e ”JMF¦Th¬&É©"IˆD%¥6@�‰"Él@I‹,Ê)2J&ÌÈØ‰›")FlŒÁ2©¦$„YJ,bÈY ÓHXÄF¥d²FŤ&E4“MH•4È4hBI©%”e5LÒ6Цš(•¨C, ÒYÅ’“"h&™H•3”)1Pl†R #2@E&c$Œh"Y!–²L©™¶˜ÆÙMbQ2‘LB‘±e#2ÊhÙ"Š ŠI$Ù#ɳHÔÍ,FRB“31K#+6˜JÄFŠfM52i’#2CDRhŠ›Y©R””ÑHY1“"›HQdŒRŒ¤…"(±¶)$Ä’iMFɨÒ$PÒ6ÄcA3Y¤ÄÚ#&ƒ4„Òe‹DÈY‘$¦ÉLŠQ…“!-fÍ‹Y,HM%“¢¨-ËaH“!�Œ‰”jK�0”M-Ji@¢©†„™”˜¦dÙ”Á"–hÓ,!¨(M&Q‘!¢kjVÖŒPš™£)‘³J)&dDVƒR–À¥š,Å&‘”%–TÙ¢-L¬-”bC؈RˆÊF�”µû®ˆJš¤D†#6Š1Q[X¨Ù2™¦¢•$Ñ¡¥¤6ÆÂ6I¨ÚÈŒ5#&&2Œ‘e0¤�dA˜™še²m£J[QHZ2i„KY�¡cR#2RÓL™2¤ÔU¤h©²„VÉ–ER©Y…6lf3-lX²#[&™Y¦YM¬•e²”¦™Ù%#j,R²Ä–�ÉKQª‚Õ�Z2TUd¬”mQ´TTš±4DÉbÄTEŠÔXe£kÒdÂÁµ@S(¤ÆŒ!i’iZklhÚbV1l‘bÚH+UKjÊ*)šš²h’¤bB&›H¢Éµ*ͱŠSi¶YJ™f›TÒ"5´ªY$ÌÕ*F,BÚS)¬±¡²É¬¬²³LD$2£I(‹Ñ�ˆ‘"A¡1ˆRÚ5BP!*(dÕ’i£dɤ¢ÈËŠl¤#&"+,ŒˆFS1(RQ²™ b#2-2B#6›IŠ#cd)„f™¨ÉF†˜HÌÔ#!4LÔQ¢JdR�šP5BTÀF“a)S,�š‹FBŒËQ”£fRIF@Ñ�¤1e+ÃhØÆ¤£%„h,‘e„(Éh¡ ±Hf$Ѣ̦̤¥”¬Ì•Œ ³E’6!�Hµ£f´fˆ¨h©M&ÃLT±Y”Z�FBL�1�i‰±%IRel¦˜Ù £-’”¨Ôf4–MŒÒhѳ(iFJÌdFš3D‰P"DB#&–`ˆcFÙ¤lQ¢³I²S±1II ¢Ñl%F£QF+´fk#&&I4(Y261J �Š6´–l–C2ˆ6*2JY¤©�[EBF±ª5Dš(L²´( “Rj�ƒ&…„cT¥#&XÚ#&)¦Y#2(Ñ$U2-F¨±#)kdT¢¨Ö4˜",š"™”-J)ÉD•6%2Dm`ÑS*,•FÅšQl™+&)+)¶BÙ66†‰²JdJ‹#&‹%MDb6ÉŠI�A«2`ÐB£Jl͉ˆ¦±ª*edÖHÒÒMEF(šmI´[)%�“�¤Á’V¤F‹K-C-Dš‹TUŒ¥I["UcRQb‘M ‘LŒÈ˜ÓR"ƒS6IšÑ*’Å´jJ–m¤Ö‰›PljB��Œ‘ŠeSM´mFŶ1mI˜ÊQ eebZŒV,Í�¨ÚT¨¥*”f*”˜Ù@Ñ¢ÁTi5�bÌ©"Ô•±dÛ)2Ôh¬CH´RQ£hÖ¶ËUŠDÊ…LIDb¡€D–4TSI6¦É*ÆØ¶Å¦jÚ1e¤©¡–¶RÉmMM²Ôi«FQDFŒ�¤”Pl5š“Rfl²¢(¨“I”“"21#2¤¶‹2Û1ü¿ìý›úßèuoöç?'ÃÏ5§#2‹?âÿV•fˆ)¯¶e"ÃvÝ“ùrÃrÐhÒløÞy·õž–ôæþ¯õzô4Á©Œ�ÿÇ{µSgú~ÂÛGžˆíÿ$ãŒ#&.`Rĸ`¤�jª#2º2‘ìzÿ?ªõ{ký»´ÿ›Ì¼ÿ§ûyÞ¿ò*Æxdç�,$b/›žmíØ¶ç' «I°ö�~lGìêeGëgw«�±9;¼ÈŒSRR(j“ƒ5â䱈þúÙ³j“þíÚ�FL€I¥Û"lÆLhƒcôav4ŒŠˆÕÕ¨ÌÕLÒVS(�rÎw,Ë¿¬Îjä6.•#2b„ÑàÍ*�˜ÒæP)R�¤H¡"F(M®Û©Š�Ò2Ö‰M^<îÔ2ø·,ŒÞ›šMƒ0lË•Ì�éUOMÿç¥ò´îášb#2,íoU%0¡‚Ú§®ŠAE,PGÝÿ~²‡kÁéŠÔL¼ÛE0…6…"ÉßÇ%cýnIÆ“ÚÛAZ°YÞ�Ó¹rüc6Qœ]ж(`Ì]]×�îÿNzîm+©½…³•uM¿^ÐÆ°=¾,ZµYÞ{xòòŠ9Ë¢î)•ͺi#&UͺyÜhبŸzëå5¼Z4E‹~^êùÛöÕâûäS+âäkcs¤OånªñÎnŸµ¨KýólÚyeͳ™\Cm´ØF¾Ï:×»z{µW)6Œî¹GŽ&×iÏ&Y0Þ¥Z�m„hmmÂk®WyÝŽQÒ¹s%uÜ""ÓLEO6Ytä?¼«5J&©LR…",0!MîÛtÉÄe«#2üè¤OUM?[�1µ?'¦$2ðA¿ÙE&Ì9é‚Õ@TqPÿR!ôÄŸÌš¨Ix5%Èó¯uÐÙŠO<VÜñýæ§#"^„’X£;•o›#b§‰Q¦½vúìrH ȦoYÂWæcv\~û,ñ>¼)Ä�Z¯oQœ�YÕ4dà&É/�z®¸3,̬^ÞZÞ{¨CÞÊAãU§îéöß©Ï+è`ö§]ÚÝ95ó¨SXÚ@¤‡!dleNÔÝ3£PRhÑ¡J]§D.ªÈ Ö(wÉe³,YL#2NM*m±Gãxû_–*sW)Ÿå˜I£íËPã#M§’+ìe#2ûÃW£¬,‰±Èj[þv&E�6(àÓﺂ±ˆÅåE4P²1ÐøPX†ù±+W¢#cÁR…Q4iÑ—ŠE¡UŒrÐ"x³7¶•ƒÉ•¯…v&Jh tl…Exܲj7�«›cÿÖ¬A`÷´d2…xPPÅGí|?’ƒêöëwVæÒ†§ãü>mzm"c”ÔR|;·+½ÝUº]9JNÄîÅ�5NwYJH¸JV#)×5X¼ïŽzÞ2•dØ{ÝËŠýRÝ{»‹®1¶(MÊ�5Ä´*¨Z)‹"�Y“‹ÚËa¨4–û4Yð__žò¾ß]÷ýù¦Kó8²"4£�n"U�ñˆïà@Æ#\Ö¶jϽ$Â!F£éD•¬E„FEÊ 6vº˜W=ì¼5�š5ðxÛήN]1Ë_;Å—mHµ¥80Ë¡ãGƒ�ÒŠe¤º«JEvï«YøÕÏG#2ÊrrËÓºì²EFœ#2(SfˆZjÒAS¬çXƒ%¡GïŠ4wh�-´´Õ¯µ)wQ4ëEO£#2ãÆÂت+±'›-b#Év0€3Û#îþ.ü�#^pƒ>ËÞ�8ج&×÷|KT;aÇãýÎ{'ˆa̪ƒŒ¸cí!ÍÖq&ý±KZ<ZÓFºÒ�Ф¤Ì(Ì�)¿s1û=¡Ô5ƒLOýL߬ÇÒ¾ð#¼Îì0úª©Ù–e(ªe�{@‰Á¥5¯ÅÜýýøƒåLine truncated
|
||||
#<==
|
||||
#-----BEGIN PGP SIGNATURE-----\n\niQIcBAABCgAGBQJaias4AAoJEEm0xnwFJ3qqfmcP/j4ITHGXd3U8tRn4hjvpLLkT\nfTMd9x9hBEwwRqU0EYoAp2+yIoUKvb5JERF0YjGUWoiZqxEmGGp5BFSOJOrYhq0V\nsZIE01wrQQTYMn1jfoXhjywyLVdyMpl9hgb2Z7DnF9GgzUsd5bPWmoNaCMkhZjuD\nSaR13Ff0hAOVIt/fNoJiXYJ2ICDRG5LGKFlkxy0ykXOkrKDmdah4DV6MGVB/tS3n\niBhxgqMc9ILSFQoEQmFAXTid8Ej0OBj+csAk8nvbCEiV+k74BozpQ+QVfR+agX+K\nnf/oMed8F1jKa9uydbvcEn4SXXEBqKztiKvuCGmZIO3xKd+46+5Oh51wKxZYNsyk\nlYBAA/fH8fOZqMzTCRGZM3q6EnKf+zwGyf4lFOHuVzeXHlfcZA62V1Tcr9aQfsq0\n2saI9S9JsxEpFvAa4S+x7oQ+VJ0WM5XLb04KKFgAMjK/kW2Nw6rYQ0eNCdBX6NCc\n6LWnmmrB/TauSNsJSYIfICoKuv+hebjbSIQa5n1/zQeWYt8DKZYS9Lkwl34vMMdx\nDzq/l7QL+I5Z5jDSVkzRS31/K6T6RWiYFzHgabwD/DNBC8cfG4RwTZIEO3C8uLFy\nDo0MG8w5NFkMk7t0KQtBPe+7BK6Nv6Xo5mLTJ+01INvmgHavhgH4bSyg0kD8MbGS\nY4cOEMKnUkHXCpvXsOLz\n=9X3b\n-----END PGP SIGNATURE-----\n
|
||||
@@ -1,7 +1,6 @@
|
||||
# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
|
||||
|
||||
"""
|
||||
Copyright (c) 2014-2017, Regents of the University of California,
|
||||
Copyright (c) 2014-2018, Regents of the University of California,
|
||||
Arizona Board of Regents,
|
||||
Colorado State University,
|
||||
University Pierre & Marie Curie, Sorbonne University,
|
||||
@@ -24,14 +23,14 @@ You should have received a copy of the GNU General Public License along with
|
||||
NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
VERSION = "0.6.1"
|
||||
APPNAME = "nfd"
|
||||
BUGREPORT = "https://redmine.named-data.net/projects/nfd"
|
||||
URL = "https://named-data.net/doc/NFD/"
|
||||
GIT_TAG_PREFIX = "NFD-"
|
||||
from waflib import Context, Logs, Utils
|
||||
import os, subprocess
|
||||
|
||||
from waflib import Logs, Utils, Context
|
||||
import os
|
||||
VERSION = '0.6.1'
|
||||
APPNAME = 'nfd'
|
||||
BUGREPORT = 'https://redmine.named-data.net/projects/nfd'
|
||||
URL = 'https://named-data.net/doc/NFD/'
|
||||
GIT_TAG_PREFIX = 'NFD-'
|
||||
|
||||
def options(opt):
|
||||
opt.load(['compiler_cxx', 'gnu_dirs'])
|
||||
@@ -47,21 +46,44 @@ def options(opt):
|
||||
|
||||
opt.addDependencyOptions(nfdopt, 'libpcap')
|
||||
nfdopt.add_option('--without-libpcap', action='store_true', default=False,
|
||||
dest='without_libpcap',
|
||||
help='''Disable libpcap (Ethernet face support will be disabled)''')
|
||||
help='Disable libpcap (Ethernet face support will be disabled)')
|
||||
|
||||
opt.addDependencyOptions(nfdopt, 'librt', '(optional)')
|
||||
opt.addDependencyOptions(nfdopt, 'libresolv', '(optional)')
|
||||
opt.addDependencyOptions(nfdopt, 'librt')
|
||||
opt.addDependencyOptions(nfdopt, 'libresolv')
|
||||
|
||||
nfdopt.add_option('--with-tests', action='store_true', default=False,
|
||||
dest='with_tests', help='''Build unit tests''')
|
||||
help='Build unit tests')
|
||||
nfdopt.add_option('--with-other-tests', action='store_true', default=False,
|
||||
dest='with_other_tests', help='''Build other tests''')
|
||||
help='Build other tests')
|
||||
|
||||
nfdopt.add_option('--with-custom-logger', type='string', default=None,
|
||||
dest='with_custom_logger',
|
||||
help='''Path to custom-logger.hpp and custom-logger-factory.hpp '''
|
||||
'''implementing Logger and LoggerFactory interfaces''')
|
||||
nfdopt.add_option('--with-custom-logger', metavar='PATH',
|
||||
help='Path to custom-logger.hpp and custom-logger-factory.hpp '
|
||||
'implementing Logger and LoggerFactory interfaces')
|
||||
|
||||
PRIVILEGE_CHECK_CODE = '''
|
||||
#include <unistd.h>
|
||||
#include <grp.h>
|
||||
#include <pwd.h>
|
||||
int main()
|
||||
{
|
||||
sysconf(_SC_GETGR_R_SIZE_MAX);
|
||||
|
||||
char buffer[100];
|
||||
group grp;
|
||||
group* grpRes;
|
||||
getgrnam_r("nogroup", &grp, buffer, 100, &grpRes);
|
||||
passwd pwd;
|
||||
passwd* pwdRes;
|
||||
getpwnam_r("nobody", &pwd, buffer, 100, &pwdRes);
|
||||
|
||||
int ret = setegid(grp.gr_gid);
|
||||
ret = seteuid(pwd.pw_uid);
|
||||
(void)(ret);
|
||||
|
||||
getegid();
|
||||
geteuid();
|
||||
}
|
||||
'''
|
||||
|
||||
def configure(conf):
|
||||
conf.load(['compiler_cxx', 'gnu_dirs',
|
||||
@@ -80,41 +102,17 @@ def configure(conf):
|
||||
conf.checkDependency(name='libresolv', lib='resolv', mandatory=False)
|
||||
|
||||
if not conf.check_cxx(msg='Checking if privilege drop/elevation is supported', mandatory=False,
|
||||
define_name='HAVE_PRIVILEGE_DROP_AND_ELEVATE', fragment='''
|
||||
#include <unistd.h>
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
int
|
||||
main(int, char**)
|
||||
{
|
||||
char buffer[100];
|
||||
::sysconf(_SC_GETGR_R_SIZE_MAX);
|
||||
group grp;
|
||||
group* grpRes;
|
||||
getgrnam_r("nogroup", &grp, buffer, 100, &grpRes);
|
||||
passwd pwd;
|
||||
passwd* pwdRes;
|
||||
getpwnam_r("nobody", &pwd, buffer, 100, &pwdRes);
|
||||
|
||||
int ret = setegid(grp.gr_gid);
|
||||
ret = seteuid(pwd.pw_uid);
|
||||
(void)(ret);
|
||||
|
||||
getegid();
|
||||
geteuid();
|
||||
return 0;
|
||||
}
|
||||
'''):
|
||||
define_name='HAVE_PRIVILEGE_DROP_AND_ELEVATE', fragment=PRIVILEGE_CHECK_CODE):
|
||||
Logs.warn('Dropping privileges is not supported on this platform')
|
||||
|
||||
conf.check_cxx(header_name='valgrind/valgrind.h', define_name='HAVE_VALGRIND', mandatory=False)
|
||||
|
||||
if conf.options.with_tests:
|
||||
conf.env['WITH_TESTS'] = 1
|
||||
conf.env.WITH_TESTS = True
|
||||
conf.define('WITH_TESTS', 1)
|
||||
|
||||
if conf.options.with_other_tests:
|
||||
conf.env['WITH_OTHER_TESTS'] = 1
|
||||
conf.env.WITH_OTHER_TESTS = True
|
||||
conf.define('WITH_OTHER_TESTS', 1)
|
||||
|
||||
boost_libs = 'system chrono program_options thread log log_setup'
|
||||
@@ -123,12 +121,11 @@ main(int, char**)
|
||||
|
||||
conf.check_boost(lib=boost_libs, mt=True)
|
||||
if conf.env.BOOST_VERSION_NUMBER < 105400:
|
||||
Logs.error("Minimum required boost version is 1.54.0")
|
||||
Logs.error("Please upgrade your distribution or install custom boost libraries" +
|
||||
" (https://redmine.named-data.net/projects/nfd/wiki/Boost_FAQ)")
|
||||
return
|
||||
conf.fatal('Minimum required Boost version is 1.54.0\n'
|
||||
'Please upgrade your distribution or manually install a newer version of Boost'
|
||||
' (https://redmine.named-data.net/projects/nfd/wiki/Boost_FAQ)')
|
||||
|
||||
if conf.env['CXX_NAME'] == 'clang' and conf.env.BOOST_VERSION_NUMBER < 105800:
|
||||
if conf.env.CXX_NAME == 'clang' and conf.env.BOOST_VERSION_NUMBER < 105800:
|
||||
conf.define('BOOST_ASIO_HAS_STD_ARRAY', 1) # Workaround for https://redmine.named-data.net/issues/3360#note-14
|
||||
conf.define('BOOST_ASIO_HAS_STD_CHRONO', 1) # Solution documented at https://redmine.named-data.net/issues/3588#note-10
|
||||
|
||||
@@ -137,41 +134,41 @@ main(int, char**)
|
||||
|
||||
if not conf.options.without_libpcap:
|
||||
conf.check_asio_pcap_support()
|
||||
if conf.env['HAVE_ASIO_PCAP_SUPPORT']:
|
||||
if conf.env.HAVE_ASIO_PCAP_SUPPORT:
|
||||
conf.checkDependency(name='libpcap', lib='pcap', mandatory=True,
|
||||
errmsg='not found, but required for Ethernet face support. '
|
||||
'Specify --without-libpcap to disable Ethernet face support.')
|
||||
else:
|
||||
Logs.warn('Warning: Ethernet face is not supported on this platform with Boost libraries version 1.56. '
|
||||
'See https://redmine.named-data.net/issues/1877 for more details')
|
||||
if conf.env['HAVE_LIBPCAP']:
|
||||
conf.check_cxx(function_name='pcap_set_immediate_mode', header_name='pcap/pcap.h',
|
||||
cxxflags='-Wno-error', use='LIBPCAP', mandatory=False)
|
||||
if conf.env.HAVE_LIBPCAP:
|
||||
conf.check_cxx(msg='Checking if libpcap supports pcap_set_immediate_mode', mandatory=False,
|
||||
define_name='HAVE_PCAP_SET_IMMEDIATE_MODE', use='LIBPCAP',
|
||||
fragment='''#include <pcap/pcap.h>
|
||||
int main() { pcap_t* p; pcap_set_immediate_mode(p, 1); }''')
|
||||
|
||||
if conf.options.with_custom_logger:
|
||||
conf.define('HAVE_CUSTOM_LOGGER', 1)
|
||||
conf.env['INCLUDES_CUSTOM_LOGGER'] = [conf.options.with_custom_logger]
|
||||
conf.env['HAVE_CUSTOM_LOGGER'] = 1
|
||||
conf.env.HAVE_CUSTOM_LOGGER = True
|
||||
conf.env.INCLUDES_CUSTOM_LOGGER = [conf.options.with_custom_logger]
|
||||
|
||||
conf.check_compiler_flags()
|
||||
|
||||
# Loading "late" to prevent tests from being compiled with profiling flags
|
||||
conf.load('coverage')
|
||||
|
||||
conf.load('sanitizers')
|
||||
|
||||
conf.define('DEFAULT_CONFIG_FILE', '%s/ndn/nfd.conf' % conf.env['SYSCONFDIR'])
|
||||
|
||||
conf.define('DEFAULT_CONFIG_FILE', '%s/ndn/nfd.conf' % conf.env.SYSCONFDIR)
|
||||
# disable assertions in release builds
|
||||
if not conf.options.debug:
|
||||
conf.define('NDEBUG', 1)
|
||||
|
||||
conf.write_config_header('core/config.hpp')
|
||||
|
||||
def build(bld):
|
||||
version(bld)
|
||||
|
||||
bld(features="subst",
|
||||
name='version',
|
||||
bld(features='subst',
|
||||
name='version.hpp',
|
||||
source='core/version.hpp.in',
|
||||
target='core/version.hpp',
|
||||
install_path=None,
|
||||
@@ -184,79 +181,74 @@ def build(bld):
|
||||
VERSION_MINOR=VERSION_SPLIT[1],
|
||||
VERSION_PATCH=VERSION_SPLIT[2])
|
||||
|
||||
core = bld(
|
||||
core = bld.objects(
|
||||
target='core-objects',
|
||||
name='core-objects',
|
||||
features='cxx pch',
|
||||
source=bld.path.ant_glob(['core/**/*.cpp'],
|
||||
excl=['core/logger*.cpp']),
|
||||
use='version NDN_CXX BOOST LIBRT',
|
||||
includes='. core',
|
||||
features='pch',
|
||||
source=bld.path.ant_glob('core/**/*.cpp', excl=['core/logger*.cpp']),
|
||||
use='version.hpp NDN_CXX BOOST LIBRT',
|
||||
includes='.',
|
||||
export_includes='.',
|
||||
headers='core/common.hpp')
|
||||
|
||||
if bld.env['HAVE_CUSTOM_LOGGER']:
|
||||
core.use += " CUSTOM_LOGGER"
|
||||
if bld.env.HAVE_CUSTOM_LOGGER:
|
||||
core.use += ' CUSTOM_LOGGER'
|
||||
else:
|
||||
core.source += bld.path.ant_glob(['core/logger*.cpp'])
|
||||
core.source += bld.path.ant_glob('core/logger*.cpp')
|
||||
|
||||
nfd_objects = bld(
|
||||
nfd_objects = bld.objects(
|
||||
target='daemon-objects',
|
||||
name='daemon-objects',
|
||||
features='cxx',
|
||||
source=bld.path.ant_glob(['daemon/**/*.cpp'],
|
||||
source=bld.path.ant_glob('daemon/**/*.cpp',
|
||||
excl=['daemon/face/*ethernet*.cpp',
|
||||
'daemon/face/*pcap*.cpp',
|
||||
'daemon/face/unix-*.cpp',
|
||||
'daemon/face/websocket-*.cpp',
|
||||
'daemon/face/pcap*.cpp',
|
||||
'daemon/face/unix*.cpp',
|
||||
'daemon/face/websocket*.cpp',
|
||||
'daemon/main.cpp']),
|
||||
use='core-objects WEBSOCKET',
|
||||
use='core-objects',
|
||||
includes='daemon',
|
||||
export_includes='daemon')
|
||||
|
||||
if bld.env['HAVE_LIBPCAP']:
|
||||
if bld.env.HAVE_LIBPCAP:
|
||||
nfd_objects.source += bld.path.ant_glob('daemon/face/*ethernet*.cpp')
|
||||
nfd_objects.source += bld.path.ant_glob('daemon/face/*pcap*.cpp')
|
||||
nfd_objects.source += bld.path.ant_glob('daemon/face/pcap*.cpp')
|
||||
nfd_objects.use += ' LIBPCAP'
|
||||
|
||||
if bld.env['HAVE_UNIX_SOCKETS']:
|
||||
nfd_objects.source += bld.path.ant_glob('daemon/face/unix-*.cpp')
|
||||
if bld.env.HAVE_UNIX_SOCKETS:
|
||||
nfd_objects.source += bld.path.ant_glob('daemon/face/unix*.cpp')
|
||||
|
||||
if bld.env['HAVE_WEBSOCKET']:
|
||||
nfd_objects.source += bld.path.ant_glob('daemon/face/websocket-*.cpp')
|
||||
if bld.env.HAVE_WEBSOCKET:
|
||||
nfd_objects.source += bld.path.ant_glob('daemon/face/websocket*.cpp')
|
||||
nfd_objects.use += ' WEBSOCKET'
|
||||
|
||||
if bld.env['WITH_OTHER_TESTS']:
|
||||
if bld.env.WITH_OTHER_TESTS:
|
||||
nfd_objects.source += bld.path.ant_glob('tests/other/fw/*.cpp')
|
||||
|
||||
rib_objects = bld(
|
||||
target='rib-objects',
|
||||
name='rib-objects',
|
||||
features='cxx',
|
||||
source=bld.path.ant_glob(['rib/**/*.cpp']),
|
||||
use='core-objects')
|
||||
bld.objects(target='rib-objects',
|
||||
source=bld.path.ant_glob('rib/**/*.cpp'),
|
||||
use='core-objects')
|
||||
|
||||
bld(target='bin/nfd',
|
||||
features='cxx cxxprogram',
|
||||
source='daemon/main.cpp',
|
||||
use='daemon-objects rib-objects')
|
||||
bld.program(name='nfd',
|
||||
target='bin/nfd',
|
||||
source='daemon/main.cpp',
|
||||
use='daemon-objects rib-objects')
|
||||
|
||||
bld.recurse("tools")
|
||||
bld.recurse("tests")
|
||||
bld.recurse('tools')
|
||||
bld.recurse('tests')
|
||||
|
||||
bld(features="subst",
|
||||
bld(features='subst',
|
||||
source='nfd.conf.sample.in',
|
||||
target='nfd.conf.sample',
|
||||
install_path="${SYSCONFDIR}/ndn",
|
||||
IF_HAVE_LIBPCAP="" if bld.env['HAVE_LIBPCAP'] else "; ",
|
||||
IF_HAVE_WEBSOCKET="" if bld.env['HAVE_WEBSOCKET'] else "; ")
|
||||
install_path='${SYSCONFDIR}/ndn',
|
||||
IF_HAVE_LIBPCAP='' if bld.env.HAVE_LIBPCAP else '; ',
|
||||
IF_HAVE_WEBSOCKET='' if bld.env.HAVE_WEBSOCKET else '; ')
|
||||
|
||||
if bld.env['SPHINX_BUILD']:
|
||||
bld(features="sphinx",
|
||||
builder="man",
|
||||
outdir="docs/manpages",
|
||||
config="docs/conf.py",
|
||||
if bld.env.SPHINX_BUILD:
|
||||
bld(features='sphinx',
|
||||
name='manpages',
|
||||
builder='man',
|
||||
config='docs/conf.py',
|
||||
outdir='docs/manpages',
|
||||
source=bld.path.ant_glob('docs/manpages/**/*.rst'),
|
||||
install_path="${MANDIR}/",
|
||||
install_path='${MANDIR}',
|
||||
VERSION=VERSION)
|
||||
bld.symlink_as('${MANDIR}/man1/nfdc-channel.1', 'nfdc-face.1')
|
||||
bld.symlink_as('${MANDIR}/man1/nfdc-fib.1', 'nfdc-route.1')
|
||||
@@ -265,7 +257,7 @@ def build(bld):
|
||||
bld.symlink_as('${MANDIR}/man1/nfdc-set-strategy.1', 'nfdc-strategy.1')
|
||||
bld.symlink_as('${MANDIR}/man1/nfdc-unset-strategy.1', 'nfdc-strategy.1')
|
||||
|
||||
bld.install_files("${SYSCONFDIR}/ndn", "autoconfig.conf.sample")
|
||||
bld.install_files('${SYSCONFDIR}/ndn', 'autoconfig.conf.sample')
|
||||
|
||||
def docs(bld):
|
||||
from waflib import Options
|
||||
@@ -275,85 +267,82 @@ def doxygen(bld):
|
||||
version(bld)
|
||||
|
||||
if not bld.env.DOXYGEN:
|
||||
Logs.error("ERROR: cannot build documentation (`doxygen' is not found in $PATH)")
|
||||
else:
|
||||
bld(features="subst",
|
||||
name="doxygen-conf",
|
||||
source=["docs/doxygen.conf.in",
|
||||
"docs/named_data_theme/named_data_footer-with-analytics.html.in"],
|
||||
target=["docs/doxygen.conf",
|
||||
"docs/named_data_theme/named_data_footer-with-analytics.html"],
|
||||
VERSION=VERSION,
|
||||
HTML_FOOTER="../build/docs/named_data_theme/named_data_footer-with-analytics.html" \
|
||||
if os.getenv('GOOGLE_ANALYTICS', None) \
|
||||
else "../docs/named_data_theme/named_data_footer.html",
|
||||
GOOGLE_ANALYTICS=os.getenv('GOOGLE_ANALYTICS', ""))
|
||||
bld.fatal('Cannot build documentation ("doxygen" not found in PATH)')
|
||||
|
||||
bld(features="doxygen",
|
||||
doxyfile='docs/doxygen.conf',
|
||||
use="doxygen-conf")
|
||||
bld(features='subst',
|
||||
name='doxygen.conf',
|
||||
source=['docs/doxygen.conf.in',
|
||||
'docs/named_data_theme/named_data_footer-with-analytics.html.in'],
|
||||
target=['docs/doxygen.conf',
|
||||
'docs/named_data_theme/named_data_footer-with-analytics.html'],
|
||||
VERSION=VERSION,
|
||||
HTML_FOOTER='../build/docs/named_data_theme/named_data_footer-with-analytics.html' \
|
||||
if os.getenv('GOOGLE_ANALYTICS', None) \
|
||||
else '../docs/named_data_theme/named_data_footer.html',
|
||||
GOOGLE_ANALYTICS=os.getenv('GOOGLE_ANALYTICS', ''))
|
||||
|
||||
bld(features='doxygen',
|
||||
doxyfile='docs/doxygen.conf',
|
||||
use='doxygen.conf')
|
||||
|
||||
def sphinx(bld):
|
||||
version(bld)
|
||||
|
||||
if not bld.env.SPHINX_BUILD:
|
||||
bld.fatal("ERROR: cannot build documentation (`sphinx-build' is not found in $PATH)")
|
||||
else:
|
||||
bld(features="sphinx",
|
||||
outdir="docs",
|
||||
source=bld.path.ant_glob('docs/**/*.rst'),
|
||||
config="docs/conf.py",
|
||||
VERSION=VERSION)
|
||||
bld.fatal('Cannot build documentation ("sphinx-build" not found in PATH)')
|
||||
|
||||
bld(features='sphinx',
|
||||
config='docs/conf.py',
|
||||
outdir='docs',
|
||||
source=bld.path.ant_glob('docs/**/*.rst'),
|
||||
VERSION=VERSION)
|
||||
|
||||
def version(ctx):
|
||||
# don't execute more than once
|
||||
if getattr(Context.g_module, 'VERSION_BASE', None):
|
||||
return
|
||||
|
||||
Context.g_module.VERSION_BASE = Context.g_module.VERSION
|
||||
Context.g_module.VERSION_SPLIT = [v for v in VERSION_BASE.split('.')]
|
||||
Context.g_module.VERSION_SPLIT = VERSION_BASE.split('.')
|
||||
|
||||
didGetVersion = False
|
||||
# first, try to get a version string from git
|
||||
gotVersionFromGit = False
|
||||
try:
|
||||
cmd = ['git', 'describe', '--always', '--match', '%s*' % GIT_TAG_PREFIX]
|
||||
p = Utils.subprocess.Popen(cmd, stdout=Utils.subprocess.PIPE,
|
||||
stderr=None, stdin=None)
|
||||
out = str(p.communicate()[0].strip())
|
||||
didGetVersion = (p.returncode == 0 and out != "")
|
||||
if didGetVersion:
|
||||
out = subprocess.check_output(cmd, universal_newlines=True).strip()
|
||||
if out:
|
||||
gotVersionFromGit = True
|
||||
if out.startswith(GIT_TAG_PREFIX):
|
||||
Context.g_module.VERSION = out[len(GIT_TAG_PREFIX):]
|
||||
Context.g_module.VERSION = out.lstrip(GIT_TAG_PREFIX)
|
||||
else:
|
||||
Context.g_module.VERSION = "%s-commit-%s" % (Context.g_module.VERSION_BASE, out)
|
||||
except OSError:
|
||||
# no tags matched
|
||||
Context.g_module.VERSION = '%s-commit-%s' % (VERSION_BASE, out)
|
||||
except subprocess.CalledProcessError:
|
||||
pass
|
||||
|
||||
versionFile = ctx.path.find_node('VERSION')
|
||||
|
||||
if not didGetVersion and versionFile is not None:
|
||||
if not gotVersionFromGit and versionFile is not None:
|
||||
try:
|
||||
Context.g_module.VERSION = versionFile.read()
|
||||
return
|
||||
except (OSError, IOError):
|
||||
except EnvironmentError:
|
||||
pass
|
||||
|
||||
# version was obtained from git, update VERSION file if necessary
|
||||
if versionFile is not None:
|
||||
try:
|
||||
version = versionFile.read()
|
||||
if version == Context.g_module.VERSION:
|
||||
return # no need to update
|
||||
except (OSError, IOError):
|
||||
Logs.warn("VERSION file exists, but not readable")
|
||||
if versionFile.read() == Context.g_module.VERSION:
|
||||
# already up-to-date
|
||||
return
|
||||
except EnvironmentError as e:
|
||||
Logs.warn('%s exists but is not readable (%s)' % (versionFile, e.strerror))
|
||||
else:
|
||||
versionFile = ctx.path.make_node('VERSION')
|
||||
|
||||
if versionFile is None:
|
||||
return
|
||||
|
||||
try:
|
||||
versionFile.write(Context.g_module.VERSION)
|
||||
except (OSError, IOError):
|
||||
Logs.warn("VERSION file is not writeable")
|
||||
except EnvironmentError as e:
|
||||
Logs.warn('%s is not writable (%s)' % (versionFile, e.strerror))
|
||||
|
||||
def dist(ctx):
|
||||
version(ctx)
|
||||
|
||||
Reference in new issue
Block a user