summaryrefslogtreecommitdiff
path: root/SConscript
diff options
context:
space:
mode:
Diffstat (limited to 'SConscript')
-rw-r--r--SConscript19
1 files changed, 19 insertions, 0 deletions
diff --git a/SConscript b/SConscript
index 7ea1e7638..5b4361298 100644
--- a/SConscript
+++ b/SConscript
@@ -386,6 +386,25 @@ for opt in env.ExportOptions:
###################################################
#
+# 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.
#
###################################################