Add a scaner for .isa files. Ordering it turns out is rather important
authorAli Saidi <saidi@eecs.umich.edu>
Tue, 31 Jan 2006 18:52:23 +0000 (13:52 -0500)
committerAli Saidi <saidi@eecs.umich.edu>
Tue, 31 Jan 2006 18:52:23 +0000 (13:52 -0500)
here, so it has to be defined before the rule to  that calls
isa_parser.py

--HG--
extra : convert_revision : dbba3c7ee71ca8ca1fcbf5ee65ae83b4ecb63649

SConscript

index 7ea1e7638fb029645fe05bd66e894ce92343b234..5b4361298033f063c4c43c571d4498b688807c60 100644 (file)
@@ -384,6 +384,25 @@ if env['USE_MYSQL']:
 for opt in env.ExportOptions:
     env.ConfigFile(opt)
 
+###################################################
+#
+# Add an SCons scanner for ISA files
+#
+###################################################
+def ISAScan():
+   return SCons.Scanner.Classic("ISAScan",
+                                "$ISASUFFIXES",
+                                "SRCDIR",
+                                '^[ \t]*##[ \t]*include[ \t]*"([^>"]+)"')
+
+def ISAPath(env, dir, a=None):
+   return (Dir(env['SRCDIR']), Dir('.'))   
+
+iscan = Scanner(function = ISAScan().scan, skeys = [".isa", ".ISA"],
+                path_function = ISAPath)
+env.Append(SCANNERS = iscan)
+
 ###################################################
 #
 # Special build rules.