Changeset 5ae0a03 in rtems-libbsd for freebsd-to-rtems.py


Ignore:
Timestamp:
Dec 11, 2013, 3:41:53 PM (6 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
4.11, c1e05b9ea378b2971e3d7704779112b4bc4296da, freebsd-9.3, 4a77611a223ea883fb548679b516d326a020d447
Children:
f574d27
Parents:
90916f1
git-author:
Sebastian Huber <sebastian.huber@…> (12/11/13 15:41:53)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/16/13 14:34:46)
Message:

Add and use FreeBSDPathComposer()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • freebsd-to-rtems.py

    r90916f1 r5ae0a03  
    268268class PathComposer(object):
    269269        def composeFreeBSDPath(self, path):
     270                return path
     271
     272        def composeRTEMSPath(self, path, prefix):
     273                path = prefix + path
     274                return path
     275
     276class FreeBSDPathComposer(PathComposer):
     277        def composeFreeBSDPath(self, path):
    270278                return FreeBSD_DIR + '/' + path
    271279
     
    281289                return path
    282290
    283 class CPUDependentPathComposer(PathComposer):
     291class CPUDependentPathComposer(FreeBSDPathComposer):
    284292        def composeRTEMSPath(self, path, prefix):
    285293                path = super(CPUDependentPathComposer, self).composeRTEMSPath(path, prefix)
     
    581589
    582590        def addHeaderFiles(self, files):
    583                 self.files = self.addFiles(self.files, files, PathComposer(), FromFreeBSDToRTEMSHeaderConverter(), FromRTEMSToFreeBSDHeaderConverter(), assertHeaderFile)
     591                self.files = self.addFiles(self.files, files, FreeBSDPathComposer(), FromFreeBSDToRTEMSHeaderConverter(), FromRTEMSToFreeBSDHeaderConverter(), assertHeaderFile)
    584592
    585593        def addUserSpaceHeaderFiles(self, files):
    586                 self.files = self.addFiles(self.files, files, PathComposer(), FromFreeBSDToRTEMSUserSpaceHeaderConverter(), FromRTEMSToFreeBSDHeaderConverter(), assertHeaderFile)
     594                self.files = self.addFiles(self.files, files, FreeBSDPathComposer(), FromFreeBSDToRTEMSUserSpaceHeaderConverter(), FromRTEMSToFreeBSDHeaderConverter(), assertHeaderFile)
    587595
    588596        def addRTEMSHeaderFiles(self, files):
     
    597605
    598606        def addSourceFiles(self, files):
    599                 self.files = self.addFiles(self.files, files, PathComposer(), FromFreeBSDToRTEMSSourceConverter(), FromRTEMSToFreeBSDSourceConverter(), assertSourceFile, SourceFileMakefileFragmentComposer())
     607                self.files = self.addFiles(self.files, files, FreeBSDPathComposer(), FromFreeBSDToRTEMSSourceConverter(), FromRTEMSToFreeBSDSourceConverter(), assertSourceFile, SourceFileMakefileFragmentComposer())
    600608
    601609        def addUserSpaceSourceFiles(self, files):
    602                 self.files = self.addFiles(self.files, files, PathComposer(), FromFreeBSDToRTEMSUserSpaceSourceConverter(), FromRTEMSToFreeBSDSourceConverter(), assertSourceFile, SourceFileMakefileFragmentComposer())
     610                self.files = self.addFiles(self.files, files, FreeBSDPathComposer(), FromFreeBSDToRTEMSUserSpaceSourceConverter(), FromRTEMSToFreeBSDSourceConverter(), assertSourceFile, SourceFileMakefileFragmentComposer())
    603611
    604612        def addRTEMSSourceFiles(self, files):
     
    21462154                        '\t     rpcgen -h -o $@ $<\n'
    21472155
    2148 userSpace.addFile(File('include/rpc/rpcb_prot.x', PathComposer(), Converter(), Converter(), RPCGENMakefileFragmentComposer()))
     2156userSpace.addFile(File('include/rpc/rpcb_prot.x', FreeBSDPathComposer(), Converter(), Converter(), RPCGENMakefileFragmentComposer()))
    21492157
    21502158class RouteKeywordsMakefileFragmentComposer(MakefileFragmentComposer):
     
    21592167                        '\trm -f ' + tmpPath + '\n'
    21602168
    2161 userSpace.addFile(File('sbin/route/keywords', PathComposer(), Converter(), Converter(), RouteKeywordsMakefileFragmentComposer()))
     2169userSpace.addFile(File('sbin/route/keywords', FreeBSDPathComposer(), Converter(), Converter(), RouteKeywordsMakefileFragmentComposer()))
    21622170
    21632171class LexMakefileFragmentComposer(MakefileFragmentComposer):
     
    21902198                        '\tmv ' + self.sym + '.tab.h ' + hdr + '\n'
    21912199
    2192 rtems.addFile(File('lib/libc/net/nslexer.l', PathComposer(), Converter(), Converter(), LexMakefileFragmentComposer('_nsyy', 'nsparser.c')))
    2193 rtems.addFile(File('lib/libc/net/nsparser.y', PathComposer(), Converter(), Converter(), YaccMakefileFragmentComposer('_nsyy', 'nsparser.h')))
    2194 rtems.addFile(File('lib/libipsec/policy_token.l', PathComposer(), Converter(), Converter(), LexMakefileFragmentComposer('__libipsecyy', 'policy_parse.c')))
    2195 rtems.addFile(File('lib/libipsec/policy_parse.y', PathComposer(), Converter(), Converter(), YaccMakefileFragmentComposer('__libipsecyy', 'y.tab.h')))
     2200rtems.addFile(File('lib/libc/net/nslexer.l', FreeBSDPathComposer(), Converter(), Converter(), LexMakefileFragmentComposer('_nsyy', 'nsparser.c')))
     2201rtems.addFile(File('lib/libc/net/nsparser.y', FreeBSDPathComposer(), Converter(), Converter(), YaccMakefileFragmentComposer('_nsyy', 'nsparser.h')))
     2202rtems.addFile(File('lib/libipsec/policy_token.l', FreeBSDPathComposer(), Converter(), Converter(), LexMakefileFragmentComposer('__libipsecyy', 'policy_parse.c')))
     2203rtems.addFile(File('lib/libipsec/policy_parse.y', FreeBSDPathComposer(), Converter(), Converter(), YaccMakefileFragmentComposer('__libipsecyy', 'y.tab.h')))
    21962204
    21972205userSpace.addUserSpaceSourceFiles(
Note: See TracChangeset for help on using the changeset viewer.