ruby: Added a Scons option to prevent HTML file creation
authorBrad Beckmann <Brad.Beckmann@amd.com>
Sat, 30 Jan 2010 04:29:33 +0000 (20:29 -0800)
committerBrad Beckmann <Brad.Beckmann@amd.com>
Sat, 30 Jan 2010 04:29:33 +0000 (20:29 -0800)
src/mem/protocol/SConscript
src/mem/protocol/SConsopts

index 8d9ebf3b17079728ea35a9c917e1bc4562c2eeb0..2c29ea37458efbd4a635cdd7ff03a4f73bf05ad7 100644 (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)
 
index 9c91bca2ba1a728d917cf71ec0c3215c01d98c58..222e8d802689e0033ea7d4493d276f83795684be 100644 (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)