Permalink
Browse files

SCons refactoring, cleans up building and testing the C++ client.

This patch does the following:

1.) Remove pcre.h dependencies in the C++ client, and remove some other
unnecessary dependencies.
2.) Clean up how we build the client from the client source tarball, so it's
more like how we build it from the git repo / full source tarball.
3.) Fix up our "scons" so you only have to write "scons ." to build all of our
binaries, the binary archive (zip or tgz) and client source archive (zip or
tgz).
4.) Fix up SCons aliases "core", "tools", and "all".
5.) Let user specify the name of the client tarball via a SCons command line
switch.

Resolves SERVER-4231, SERVER-5255.
  • Loading branch information...
1 parent f9c8560 commit d67ce1cd31f6ea2e766d5c201ab5430735cbb3b8 Andy Schwerin committed with andy10gen Mar 7, 2012
Showing with 3,328 additions and 2,920 deletions.
  1. +45 −0 SConscript.buildinfo
  2. +72 −108 SConstruct
  3. +59 −0 buildscripts/build_and_test_client.py
  4. +116 −0 buildscripts/make_archive.py
  5. +58 −75 distsrc/client/SConstruct
  6. +133 −0 src/SConscript.client
  7. +43 −117 src/mongo/SConscript
  8. +26 −12 src/mongo/client/dbclient.cpp
  9. +7 −1,040 src/mongo/client/dbclient.h
  10. +14 −10 src/mongo/client/dbclient_rs.cpp
  11. +9 −2 src/mongo/client/dbclient_rs.h
  12. +10 −7 src/mongo/client/dbclientcursor.cpp
  13. +8 −4 src/mongo/client/dbclientcursor.h
  14. +1,056 −0 src/mongo/client/dbclientinterface.h
  15. +7 −3 src/mongo/client/distlock.cpp
  16. +1 −1 src/mongo/client/examples/first.cpp
  17. +9 −11 src/mongo/client/examples/second.cpp
  18. +6 −4 src/mongo/client/gridfs.cpp
  19. +12 −8 src/mongo/client/parallel.h
  20. +6 −3 src/mongo/client/syncclusterconnection.cpp
  21. +43 −0 src/mongo/db/authlevel.h
  22. +1 −0 src/mongo/db/client.h
  23. +1 −0 src/mongo/db/d_concurrency.cpp
  24. +2 −2 src/mongo/db/database.h
  25. +0 −1 src/mongo/db/dbmessage.h
  26. +1 −0 src/mongo/db/dur_journal.cpp
  27. +8 −5 src/mongo/db/extsort.h
  28. +1 −0 src/mongo/db/index.h
  29. +1 −1 src/mongo/db/instance.h
  30. +2 −61 src/mongo/db/namespace-inl.h
  31. +9 −781 src/mongo/db/namespace.cpp
  32. +6 −598 src/mongo/db/namespace.h
  33. +84 −0 src/mongo/db/namespace_details-inl.h
  34. +801 −0 src/mongo/db/namespace_details.cpp
  35. +610 −0 src/mongo/db/namespace_details.h
  36. +10 −8 src/mongo/db/pdfile.h
  37. +5 −20 src/mongo/db/security.h
  38. +4 −2 src/mongo/s/shard.h
  39. +11 −10 src/mongo/s/strategy_shard.cpp
  40. +10 −9 src/mongo/tools/restore.cpp
  41. +5 −4 src/mongo/tools/tool.cpp
  42. +12 −9 src/mongo/util/mmap.cpp
  43. +4 −4 src/mongo/util/version.h
View
@@ -0,0 +1,45 @@
+# -*- mode: python; -*-
+
+# This SConscript describes construction of buildinfo.cpp, which is independent of the
+# build variant's target.
+
+import os
+import sys
+
+import buildscripts.utils
+
+Import('env windows')
+
+def getSysInfo():
+ if windows:
+ return "windows " + str( sys.getwindowsversion() )
+ else:
+ return " ".join( os.uname() )
+
+buildinfo_filename = '#build/buildinfo.cpp'
+
+buildinfo_template = '''
+#include <string>
+#include <boost/version.hpp>
+
+#include "mongo/util/version.h"
+
+namespace mongo {
+ const char * gitVersion() { return "%(git_version)s"; }
+ std::string sysInfo() { return "%(sys_info)s BOOST_LIB_VERSION=" BOOST_LIB_VERSION ; }
+} // namespace mongo
+'''
+
+def generate_buildinfo(env, target, source, **kw):
+ contents = str(source[0]) % dict(git_version=buildscripts.utils.getGitVersion(),
+ sys_info=getSysInfo())
+ out = open(str(target[0]), 'wb')
+ try:
+ out.write(contents)
+ finally:
+ out.close()
+
+env.Command(buildinfo_filename, Value(buildinfo_template), generate_buildinfo)
+env.AlwaysBuild(buildinfo_filename)
+env.Install('$BUILD_DIR/mongo', buildinfo_filename)
+env.Install('$BUILD_DIR/client_build/mongo', buildinfo_filename)
Oops, something went wrong.

0 comments on commit d67ce1c

Please sign in to comment.