Changeset 01855a5 in rtems-libbsd for builder.py


Ignore:
Timestamp:
May 7, 2018, 8:19:28 AM (18 months ago)
Author:
Christian Mauderer <christian.mauderer@…>
Branches:
c1e05b9ea378b2971e3d7704779112b4bc4296da, 4a77611a223ea883fb548679b516d326a020d447
Children:
09bbedc
Parents:
879eaa7
git-author:
Christian Mauderer <christian.mauderer@…> (05/07/18 08:19:28)
git-committer:
Christian Mauderer <christian.mauderer@…> (08/01/18 07:55:27)
Message:

waf: Allow to only generate lex and yacc.

In some applications, it's usefull if the files generated by lex or yacc
are not build automatically. With that it is for example possible to
create a wrapper source file that sets some defines before the generated
code is parsed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • builder.py

    r879eaa7 r01855a5  
    548548class LexFragmentComposer(BuildSystemFragmentComposer):
    549549
    550     def __init__(self, sym, dep, cflags = None, includes = None):
     550    def __init__(self, sym, dep, cflags = None, includes = None, build = True):
    551551        self.sym = sym
    552552        self.dep = dep
    553553        self.cflags, self.includes = _cflagsIncludes(cflags, includes)
     554        self.build = build
    554555
    555556    def compose(self, path):
    556557        d = { 'file': path,
    557558              'sym': self.sym,
    558               'dep': self.dep }
     559              'dep': self.dep,
     560              'build': self.build }
    559561        if None not in self.cflags:
    560562            d['cflags'] = self.cflags
     
    565567class YaccFragmentComposer(BuildSystemFragmentComposer):
    566568
    567     def __init__(self, sym, header, cflags = None, includes = None):
     569    def __init__(self, sym, header, cflags = None, includes = None, build = True):
    568570        self.sym = sym
    569571        self.header = header
    570572        self.cflags, self.includes = _cflagsIncludes(cflags, includes)
     573        self.build = build
    571574
    572575    def compose(self, path):
    573576        d = { 'file': path,
    574577              'sym': self.sym,
    575               'header': self.header }
     578              'header': self.header,
     579              'build': self.build }
    576580        if None not in self.cflags:
    577581            d['cflags'] = self.cflags
Note: See TracChangeset for help on using the changeset viewer.