summaryrefslogtreecommitdiffstats
path: root/waf_libbsd.py
diff options
context:
space:
mode:
authorChristian Mauderer <christian.mauderer@embedded-brains.de>2018-03-27 09:31:49 +0200
committerChristian Mauderer <christian.mauderer@embedded-brains.de>2018-04-10 08:55:28 +0200
commita6a6d54909304ad8a401b8b3c946469bdb29c50f (patch)
treeb7d60474a0780228e8f0e11d8b4e142a886cfff9 /waf_libbsd.py
parentd797c5dcd2230772a80567ea20ac7820a03fb165 (diff)
downloadrtems-libbsd-a6a6d54909304ad8a401b8b3c946469bdb29c50f.tar.bz2
waf: Fix freebsd-to-rtems.py.
Update #3351
Diffstat (limited to 'waf_libbsd.py')
-rw-r--r--waf_libbsd.py156
1 files changed, 0 insertions, 156 deletions
diff --git a/waf_libbsd.py b/waf_libbsd.py
index eddfaf99..05293061 100644
--- a/waf_libbsd.py
+++ b/waf_libbsd.py
@@ -49,133 +49,6 @@ if windows:
else:
host_shell = ''
-def _cflagsIncludes(cflags, includes):
- if type(cflags) is not list:
- if cflags is not None:
- _cflags = cflags.split(' ')
- else:
- _cflags = [None]
- else:
- _cflags = cflags
- if type(includes) is not list:
- _includes = [includes]
- else:
- _includes = includes
- return _cflags, _includes
-
-class SourceFileFragmentComposer(builder.BuildSystemFragmentComposer):
-
- def __init__(self, cflags = "default", includes = None):
- self.cflags, self.includes = _cflagsIncludes(cflags, includes)
-
- def compose(self, path):
- if None in self.includes:
- flags = self.cflags
- else:
- flags = self.cflags + self.includes
- return ['sources', flags, ('default', None)], [path], self.cflags, self.includes
-
-class SourceFileIfHeaderComposer(SourceFileFragmentComposer):
-
- def __init__(self, headers, cflags = "default", includes = None):
- if headers is not list:
- headers = [headers]
- self.headers = headers
- super(SourceFileIfHeaderComposer, self).__init__(cflags = cflags, includes = includes)
-
- def compose(self, path):
- r = SourceFileFragmentComposer.compose(self, path)
- define_keys = ''
- for h in self.headers:
- h = h.upper()
- for c in '\/-.':
- h = h.replace(c, '_')
- define_keys += ' ' + h
- r[0][2] = (define_keys.strip(), self.headers)
- return r
-
-class TestFragementComposer(builder.BuildSystemFragmentComposer):
-
- def __init__(self, testName, fileFragments, runTest = True, netTest = False):
- self.testName = testName
- self.fileFragments = fileFragments
- self.runTest = runTest
- self.netTest = netTest
-
- def compose(self, path):
- return ['tests', self.testName, ('default', None)], { 'files': self.fileFragments,
- 'run': self.runTest,
- 'net': self.netTest }
-
-class TestIfHeaderComposer(TestFragementComposer):
-
- def __init__(self, testName, headers, fileFragments, runTest = True, netTest = False):
- if headers is not list:
- headers = [headers]
- self.headers = headers
- super(TestIfHeaderComposer, self).__init__(testName, fileFragments,
- runTest = runTest, netTest = netTest)
-
- def compose(self, path):
- r = TestFragementComposer.compose(self, path)
- define_keys = ''
- for h in self.headers:
- h = h.upper()
- for c in '\/-.':
- h = h.replace(c, '_')
- define_keys += ' ' + h
- r[0][2] = (define_keys.strip(), self.headers)
- return r
-
-class KVMSymbolsFragmentComposer(builder.BuildSystemFragmentComposer):
-
- def compose(self, path):
- return ['KVMSymbols', 'files', ('default', None)], [path], self.includes
-
-class RPCGENFragmentComposer(builder.BuildSystemFragmentComposer):
-
- def compose(self, path):
- return ['RPCGen', 'files', ('default', None)], [path]
-
-class RouteKeywordsFragmentComposer(builder.BuildSystemFragmentComposer):
-
- def compose(self, path):
- return ['RouteKeywords', 'files', ('default', None)], [path]
-
-class LexFragmentComposer(builder.BuildSystemFragmentComposer):
-
- def __init__(self, sym, dep, cflags = None, includes = None):
- self.sym = sym
- self.dep = dep
- self.cflags, self.includes = _cflagsIncludes(cflags, includes)
-
- def compose(self, path):
- d = { 'file': path,
- 'sym': self.sym,
- 'dep': self.dep }
- if None not in self.cflags:
- d['cflags'] = self.cflags
- if None not in self.includes:
- d['includes'] = self.includes
- return ['lex', path, ('default', None)], d
-
-class YaccFragmentComposer(builder.BuildSystemFragmentComposer):
-
- def __init__(self, sym, header, cflags = None, includes = None):
- self.sym = sym
- self.header = header
- self.cflags, self.includes = _cflagsIncludes(cflags, includes)
-
- def compose(self, path):
- d = { 'file': path,
- 'sym': self.sym,
- 'header': self.header }
- if None not in self.cflags:
- d['cflags'] = self.cflags
- if None not in self.includes:
- d['includes'] = self.includes
- return ['yacc', path, ('default', None)], d
-
#
# The waf builder for libbsd.
#
@@ -202,35 +75,6 @@ class Builder(builder.ModuleManager):
sources = sorted(files)
return sources
- def setGenerators(self):
- #
- # Called when the builder.ModuleManager.__init__ is run
- #
- self.generator['convert'] = builder.Converter
- self.generator['no-convert'] = builder.NoConverter
- self.generator['from-FreeBSD-to-RTEMS-UserSpaceSourceConverter'] = builder.FromFreeBSDToRTEMSUserSpaceSourceConverter
- self.generator['from-RTEMS-To-FreeBSD-SourceConverter'] = builder.FromRTEMSToFreeBSDSourceConverter
- self.generator['buildSystemFragmentComposer'] = builder.BuildSystemFragmentComposer
-
- self.generator['file'] = builder.File
-
- self.generator['path'] = builder.PathComposer
- self.generator['freebsd-path'] = builder.FreeBSDPathComposer
- self.generator['rtems-path'] = builder.RTEMSPathComposer
- self.generator['cpu-path'] = builder.CPUDependentFreeBSDPathComposer
- self.generator['target-src-cpu--path'] = builder.TargetSourceCPUDependentPathComposer
-
- self.generator['source'] = SourceFileFragmentComposer
- self.generator['test'] = TestFragementComposer
- self.generator['kvm-symbols'] = KVMSymbolsFragmentComposer
- self.generator['rpc-gen'] = RPCGENFragmentComposer
- self.generator['route-keywords'] = RouteKeywordsFragmentComposer
- self.generator['lex'] = LexFragmentComposer
- self.generator['yacc'] = YaccFragmentComposer
-
- self.generator['source-if-header'] = SourceFileIfHeaderComposer
- self.generator['test-if-header'] = TestIfHeaderComposer
-
def generate(self, rtems_version):
def _dataInsert(data, cpu, frag):