summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2015-01-26 16:11:29 -0500
committerMark Benvenuto <mark.benvenuto@mongodb.com>2015-01-27 13:48:19 -0500
commit422cbb6cea5fa5be6829044215ae46dc10be5f70 (patch)
treedbfc05ee9246ad79335ac44465222aa358236957 /SConstruct
parent41e7ab083d79a650e93a34d09e01e973ca4100d9 (diff)
downloadmongo-422cbb6cea5fa5be6829044215ae46dc10be5f70.tar.gz
Add Install Target to SCons
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct13
1 files changed, 12 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index 0a03e5a84d9..5f759b538ac 100644
--- a/SConstruct
+++ b/SConstruct
@@ -33,6 +33,9 @@ AddOption("--enable-verbose", dest="verbose", action="store_true", default=False
AddOption("--enable-zlib", dest="zlib", type="string", nargs=1, action="store",
help="Use zlib compression")
+AddOption("--prefix", dest="prefix", type="string", nargs=1, action="store", default="package",
+ help="Install directory")
+
AddOption("--with-berkeley-db", dest="bdb", type="string", nargs=1, action="store",
help="Berkeley DB install path, ie, /usr/local")
@@ -172,7 +175,7 @@ replacements = {
'@wiredtiger_includes_decl@': wiredtiger_includes
}
-env.Substfile(
+wtheader = env.Substfile(
target='wiredtiger.h',
source=[
'src/include/wiredtiger.in',
@@ -348,3 +351,11 @@ for ex in examples:
else:
env.Program(ex, "examples/c/" + ex + ".c", LIBS=[wtdll[1]] + wtlibs)
+# Install Target
+#
+prefix = GetOption("prefix")
+env.Alias("install", env.Install(os.path.join(prefix, "bin"), wtbin))
+env.Alias("install", env.Install(os.path.join(prefix, "bin"), wtdll[0])) # Just the dll
+env.Alias("install", env.Install(os.path.join(prefix, "include"), wtheader))
+env.Alias("install", env.Install(os.path.join(prefix, "lib"), wtdll[1])) # Just the import lib
+env.Alias("install", env.Install(os.path.join(prefix, "lib"), wtlib))