summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2006-06-09 23:18:46 -0400
committerSteve Reinhardt <stever@eecs.umich.edu>2006-06-09 23:18:46 -0400
commit95019d0c6f1675f42d899f2899e06d3017088f25 (patch)
tree7618cd95da8299faff8dd682e088ee707cae6a7f /SConstruct
parent6de5d73a999240f92f050393bb10028968275835 (diff)
parent29e34a739b991af8d8e1eafe75ecb0904c324dc8 (diff)
downloadgem5-95019d0c6f1675f42d899f2899e06d3017088f25.tar.xz
Merge vm1.(none):/home/stever/bk/newmem
into vm1.(none):/home/stever/bk/newmem-py src/python/m5/__init__.py: src/sim/syscall_emul.cc: Hand merge. --HG-- extra : convert_revision : e2542735323e648383c89382421d98a7d1d761bf
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct21
1 files changed, 20 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index afb2a2a6e..fb6bc609e 100644
--- a/SConstruct
+++ b/SConstruct
@@ -158,6 +158,12 @@ env = Environment(ENV = os.environ, # inherit user's environment vars
env.SConsignFile("sconsign")
+# Default duplicate option is to use hard links, but this messes up
+# when you use emacs to edit a file in the target dir, as emacs moves
+# file to file~ then copies to file, breaking the link. Symbolic
+# (soft) links work better.
+env.SetOption('duplicate', 'soft-copy')
+
# I waffle on this setting... it does avoid a few painful but
# unnecessary builds, but it also seems to make trivial builds take
# noticeably longer.
@@ -193,6 +199,19 @@ env.Append(LIBS = py_version_name)
if sys.exec_prefix != '/usr':
env.Append(LIBPATH = os.path.join(sys.exec_prefix, 'lib'))
+# Set up SWIG flags & scanner
+
+env.Append(SWIGFLAGS=Split('-c++ -python -modern $_CPPINCFLAGS'))
+
+import SCons.Scanner
+
+swig_inc_re = '^[ \t]*[%,#][ \t]*(?:include|import)[ \t]*(<|")([^>"]+)(>|")'
+
+swig_scanner = SCons.Scanner.ClassicCPP("SwigScan", ".i", "CPPPATH",
+ swig_inc_re)
+
+env.Append(SCANNERS = swig_scanner)
+
# Other default libraries
env.Append(LIBS=['z'])
@@ -469,7 +488,7 @@ for build_path in build_paths:
# to the configured options. It returns a list of environments,
# one for each variant build (debug, opt, etc.)
envList = SConscript('src/SConscript', build_dir = build_path,
- exports = 'env', duplicate = False)
+ exports = 'env')
# Set up the regression tests for each build.
# for e in envList: