ruby: Added a Scons option to prevent HTML file creation

This commit is contained in:
Brad Beckmann 2010-01-29 20:29:33 -08:00
parent 057f5898ca
commit 90aab239a1
2 changed files with 13 additions and 4 deletions

View file

@ -87,8 +87,11 @@ def slicc_emitter(target, source, env):
print "SLICC writing C++ files..."
slicc.writeCodeFiles(pdir)
print "SLICC writing HTML files..."
slicc.writeHTMLFiles(hdir)
if env['NO_HTML']:
print "skipping HTML file creation"
else:
print "SLICC writing HTML files..."
slicc.writeHTMLFiles(hdir)
return target, source
def slicc_action(target, source, env):
@ -114,8 +117,11 @@ def slicc_action(target, source, env):
print "SLICC writing C++ files..."
slicc.writeCodeFiles(pdir)
print "SLICC writing HTML files..."
slicc.writeHTMLFiles(hdir)
if env['NO_HTML']:
print "skipping HTML file creation"
else:
print "SLICC writing HTML files..."
slicc.writeHTMLFiles(hdir)
slicc_builder = Builder(action=slicc_action, emitter=slicc_emitter)

View file

@ -55,3 +55,6 @@ opt = EnumVariable('PROTOCOL', 'Coherence Protocol for Ruby', 'MOESI_CMP_directo
sticky_vars.AddVariables(opt)
export_vars += ['PROTOCOL']
opt = BoolVariable('NO_HTML', 'Do not create HTML files', False)
sticky_vars.AddVariables(opt)