注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

老狗的博客

尽管每一步都很微小,但我确认我在进步

 
 
 

日志

 
 
关于我
sky

认真生活,努力工作 热爱技术,关注DB,存储,分布式,中间层,java,c++,php

网易考拉推荐

mongodb编译  

2016-06-23 16:24:26|  分类: 默认分类 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

SCons is an Open Source software construction tool—that is, a next-generation build tool. Think of SCons as an improved, cross-platform substitute for the classic Make utility with integrated functionality similar to autoconf/automake and compiler caches such as ccache. In short, SCons is an easier, more reliable and faster way to build software.

scons是一个开源的软件构建工具,下一代编译工具,可以把scons看做改进的,跨平台的类似于autoconf/automake的编译组件,也包括类似于ccache的编译cache, scons是一个更简单,更可靠,更快速的编译软件

What makes SCons better?

  • Configuration files are Python scripts--use the power of a real programming language to solve build problems.
  • 配置文件是python脚本,用程序语言来解决编译问题
  • Reliable, automatic dependency analysis built-in for C, C++ and Fortran--no more "make depend" or "make clean" to get all of the dependencies. Dependency analysis is easily extensible through user-defined dependency Scanners for other languages or file types.
  • 内建了c/c++/fortan的依赖解析器
  • Built-in support for C, C++, D, Java, Fortran, Yacc, Lex, Qt and SWIG, and building TeX and LaTeX documents. Easily extensible through user-defined Builders for other languages or file types.
  • Building from central repositories of source code and/or pre-built targets.
  • Built-in support for fetching source files from SCCS, RCS, CVS, BitKeeper and Perforce.
  • Built-in support for Microsoft Visual Studio .NET and past Visual Studio versions, including generation of .dsp, .dsw, .sln and .vcproj files.
  • Reliable detection of build changes using MD5 signatures; optional, configurable support for traditional timestamps.
  • Improved support for parallel builds--like make -j but keeps N jobs running simultaneously regardless of directory hierarchy.
  • Integrated Autoconf-like support for finding #include files, libraries, functions and typedefs.
  • Global view of all dependencies--no more multiple build passes or reordering targets to build everything.
  • Ability to share built files in a cache to speed up multiple builds--like ccache but for any type of target file, not just C/C++ compilation.
  • Designed from the ground up for cross-platform builds, and known to work on Linux, other POSIX systems (including AIX, BSD systems, HP/UX, IRIX and Solaris), Windows NT, Mac OS X, and OS/2.

[test@-bash]$ scons -h
scons: Reading SConscript files ...
scons: done reading SConscript files.
usage: scons [OPTION] [TARGET] ...

SCons Options:
  -b, -d, -e, -m, -S, -t, -w, --environment-overrides, --no-keep-going,
  --no-print-directory, --print-directory, --stop, --touch
                              Ignored for compatibility.
  -c, --clean, --remove       Remove specified targets and dependencies.
  -C DIR, --directory=DIR     Change to DIR before doing anything.
  --cache-debug=FILE          Print CacheDir debug info to FILE.
  --cache-disable, --no-cache
                              Do not retrieve built targets from CacheDir.
  --cache-force, --cache-populate
                              Copy already-built targets into the CacheDir.
  --cache-readonly            Do not update CacheDir with built targets.
  --cache-show                Print build actions for files from CacheDir.
  --config=MODE               Controls Configure subsystem: auto, force,
                                cache.
  -D                          Search up directory tree for SConstruct,
                                build all Default() targets.
  --debug=TYPE                Print various types of debugging information:
                                count, duplicate, explain, findlibs, includes,
                                memoizer, memory, objects, pdb, prepare,
                                presub, stacktrace, time.
  --diskcheck=TYPE            Enable specific on-disk checks.
  --duplicate=DUPLICATE       Set the preferred duplication methods. Must be
                                one of hard-soft-copy, soft-hard-copy,
                                hard-copy, soft-copy, copy
  -f FILE, --file=FILE, --makefile=FILE, --sconstruct=FILE
                              Read FILE as the top-level SConstruct file.
  -h, --help                  Print defined help message, or this one.
  -H, --help-options          Print this message and exit.
  -i, --ignore-errors         Ignore errors from build actions.
  -I DIR, --include-dir=DIR   Search DIR for imported Python modules.
  --implicit-cache            Cache implicit dependencies
  --implicit-deps-changed     Ignore cached implicit dependencies.
  --implicit-deps-unchanged   Ignore changes in implicit dependencies.
  --interact, --interactive   Run in interactive mode.
  -j N, --jobs=N              Allow N jobs at once.
  -k, --keep-going            Keep going when a target can't be made.
  --max-drift=N               Set maximum system clock drift to N seconds.
  --md5-chunksize=N           Set chunk-size for MD5 signature computation to
                                N kilobytes.
  -n, --no-exec, --just-print, --dry-run, --recon
                              Don't build; just print commands.
  --no-site-dir               Don't search or use the usual site_scons dir.
  --profile=FILE              Profile SCons and put results in FILE.
  -q, --question              Don't build; exit status says if up to date.
  -Q                          Suppress "Reading/Building" progress messages.
  --random                    Build dependencies in random order.
  -s, --silent, --quiet       Don't print commands.
  --site-dir=DIR              Use DIR instead of the usual site_scons dir.
  --stack-size=N              Set the stack size of the threads used to run
                                jobs to N kilobytes.
  --taskmastertrace=FILE      Trace Node evaluation to FILE.
  --tree=OPTIONS              Print a dependency tree in various formats: all,
                                derived, prune, status.
  -u, --up, --search-up       Search up directory tree for SConstruct,
                                build targets at or below current directory.
  -U                          Search up directory tree for SConstruct,
                                build Default() targets from local SConscript.
  -v, --version               Print the SCons version number and exit.
  --warn=WARNING-SPEC, --warning=WARNING-SPEC
                              Enable or disable warnings.
  -Y REPOSITORY, --repository=REPOSITORY, --srcdir=REPOSITORY
                              Search REPOSITORY for source and target files.

Local Options:
  --mute=MUTE                 do not display commandlines for compiling and
                                linking, to reduce screen noise
  --prefix=PREFIX             installation prefix
  --distname=DISTNAME         dist name (0.8.0)
  --distmod=DISTMOD           additional piece for full dist name
  --distarch=DISTARCH         override the architecture name in dist output
  --nostrip=NOSTRIP           do not strip installed binaries
  --extra-variant-dirs=EXTRA-VARIANT-DIRS
                              extra variant dir components, separated by
                                commas
  --add-branch-to-variant-dir=ADD-BRANCH-TO-VARIANT-DIR
                              add current git branch to the variant dir
  --build-dir=BUILD-DIR       build output directory
  --variant-dir=VARIANT-DIR   override variant subdirectory
  --release=RELEASE           release build
  --static=STATIC             fully static build
  --static-libstdc++=STATIC-LIBSTDC++
                              statically link libstdc++
  --lto=LTO                   enable link time optimizations (experimental,
                                except with MSVC)
  --dynamic-windows=DYNAMIC-WINDOWS
                              dynamically link on Windows
  --64=FORCE64                whether to force 64 bit
  --32=FORCE32                whether to force 32 bit
  --endian=[big|little|auto]  endianness of target platform
  --cxx=CXX                   compiler to use
  --cc=CC                     compiler to use for c
  --cc-use-shell-environment=CC-USE-SHELL-ENVIRONMENT
                              use $CC from shell for C compiler
  --cxx-use-shell-environment=CXX-USE-SHELL-ENVIRONMENT
                              use $CXX from shell for C++ compiler
  --ld=LD                     linker to use
  --c++11=[on]                enable c++11 support (required as of 3.0.5)
  --disable-minimum-compiler-version-enforcement=DISABLE-MINIMUM-COMPILER-VERS
  ION-ENFORCEMENT
                              allow use of unsupported older compilers (NEVER
                                for production builds)
  --cpppath=CPPPATH           Include path if you have headers in a
                                nonstandard directory
  --libpath=LIBPATH           Library path if you have libraries in a
                                nonstandard directory
  --extrapath=EXTRAPATH       comma separated list of add'l paths
                                (--extrapath /opt/foo/,/foo) static linking
  --extrapathdyn=EXTRAPATHDYN
                              comma separated list of add'l paths
                                (--extrapath /opt/foo/,/foo) dynamic linking
  --extralib=EXTRALIB         comma separated list of libraries  (--extralib
                                js_static,readline
  --mm=MM                     use main memory instead of memory mapped files
  --ssl=SSL                   Enable SSL
  --rocksdb=ROCKSDB           Enable RocksDB
  --wiredtiger=[on|off]       Enable wiredtiger
  --js-engine=[v8-3.12|v8-3.25|none]
                              JavaScript scripting engine implementation
  --libc++=LIBC++             use libc++ (experimental, requires clang)
  --use-glibcxx-debug=USE-GLIBCXX-DEBUG
                              Enable the glibc++ debug implementations of the
                                C++ standard libary
  --noshell=NOSHELL           don't build shell
  --safeshell=SAFESHELL       don't let shell scripts run programs (still,
                                don't run untrusted scripts)
  --win2008plus=WIN2008PLUS   use newer operating system API features
                                (deprecated, use win-version-min instead)
  --d=DEBUGBUILD              debug build no optimization, etc...
  --dd=DEBUGBUILDANDLOGGING   debug build no optimization, additional debug
                                logging, etc...
  --dbg=[on|off]              Enable runtime debugging checks
  --opt=[on|off]              Enable compile-time optimization
  --sanitize=san1,san2,...sanN
                              enable selected sanitizers
  --llvm-symbolizer=LLVM-SYMBOLIZER
                              name of (or path to) the LLVM symbolizer
  --durableDefaultOn=DURABLEDEFAULTON
                              have durable default to on
  --durableDefaultOff=DURABLEDEFAULTOFF
                              have durable default to off
  --pch=USEPCH                use precompiled headers to speed up the build
                                (experimental)
  --distcc=DISTCC             use distcc for distributing builds
  --allocator=ALLOCATOR       allocator to use (tcmalloc or system)
  --gdbserver=GDBSERVER       build in gdb server support
  --heapcheck=HEAPCHECK       link to heap-checking malloc-lib and look for
                                memory leaks during tests
  --gcov=GCOV                 compile with flags for gcov
  --smokedbprefix=SMOKEDBPREFIX
                              prefix to dbpath et al. for smoke tests
  --smokeauth=SMOKEAUTH       run smoke tests with --auth
  --use-sasl-client=USE-SASL-CLIENT
                              Support SASL authentication in the client
                                library
  --use-system-tcmalloc=USE-SYSTEM-TCMALLOC
                              use system version of tcmalloc library
  --use-system-pcre=USE-SYSTEM-PCRE
                              use system version of pcre library
  --use-system-wiredtiger=USE-SYSTEM-WIREDTIGER
                              use system version of wiredtiger library
  --internal-boost=[1.49|1.56]
                              Specify internal boost version to use
  --system-boost-lib-search-suffixes=SYSTEM-BOOST-LIB-SEARCH-SUFFIXES
                              Comma delimited sequence of boost library
                                suffixes to search
  --use-system-boost=USE-SYSTEM-BOOST
                              use system version of boost libraries
  --use-system-snappy=USE-SYSTEM-SNAPPY
                              use system version of snappy library
  --use-system-zlib=USE-SYSTEM-ZLIB
                              use system version of zlib library
  --use-system-v8=USE-SYSTEM-V8
                              use system version of v8 library
  --use-system-stemmer=USE-SYSTEM-STEMMER
                              use system version of stemmer
  --use-system-yaml=USE-SYSTEM-YAML
                              use system version of yaml
  --use-system-all=USE-SYSTEM-ALL
                              use all system libraries
  --use-new-tools=USE-NEW-TOOLS
                              put new tools in the tarball
  --use-cpu-profiler=USE-CPU-PROFILER
                              Link against the google-perftools profiler
                                library
  --build-fast-and-loose=[on|off]
                              looser dependency checking, ignored for
                                --release builds
  --disable-warnings-as-errors=DISABLE-WARNINGS-AS-ERRORS
                              Don't add -Werror to compiler command line
  --propagate-shell-environment=PROPAGATE-SHELL-ENVIRONMENT
                              Pass shell environment to sub-processes (NEVER
                                for production builds)
  --variables-help=VARIABLES-HELP
                              Print the help text for SCons variables
  --cache=CACHE               Use an object cache rather than a per-build
                                variant directory (experimental)
  --cache-dir=CACHE-DIR       Specify the directory to use for caching objects
                                if --cache is in use
  --variable-parse-mode=[auto|posix|other]
                              Select which parsing mode is used to interpret
                                command line variables
[test@-bash]$ scons --variables-help=VARIABLES-HELP
scons: Reading SConscript files ...
scons version: 2.3.4
python version: 2 7 5 'final' 0

ARFLAGS: Sets flags for the archiver
    default: None
    actual: rc

CCFLAGS: Sets flags for the C and C++ compiler
    default: None
    actual:

CFLAGS: Sets flags for the C compiler
    default: None
    actual:

CPPDEFINES: Sets pre-processor definitions for C and C++
    default: None
    actual: None

CPPPATH: Adds paths to the preprocessor search path
    default: None
    actual: None

CXXFLAGS: Sets flags for the C++ compiler
    default: None
    actual:

LIBPATH: Adds paths to the linker search path
    default: None
    actual: None

LIBS: Adds extra libraries to link against
    default: None
    actual: None

LINKFLAGS: Sets flags for the linker
    default: None
    actual:

MONGO_DIST_SRC_PREFIX: Sets the prefix for files in the source distribution archive
    default: mongodb-src-r${MONGO_VERSION}
    actual: mongodb-src-r/

MONGO_VERSION: Sets the version string for MongoDB
    default:
    actual:

MONGO_GIT_HASH: Sets the githash to store in the MongoDB version information
    default: nogitversion
    actual: nogitversion


OBJCOPY: Sets the path to objcopy
    default: /bin/objcopy
    actual: /bin/objcopy

RPATH: Set the RPATH for dynamic libraries and executables
    default: None
    actual: None

SHCCFLAGS: Sets flags for the C and C++ compiler when building shared libraries
    default: None
    actual: -fPIC

SHCFLAGS: Sets flags for the C compiler when building shared libraries
    default: None
    actual:

SHCXXFLAGS: Sets flags for the C++ compiler when building shared libraries
    default: None
    actual:

SHLINKFLAGS: Sets flags for the linker when building shared libraries
    default: None
    actual: -shared

scons -j8 --dbg=on --opt=off MONGO_VERSION="3.0.11" MONGO_GIT_HASH="none"
  评论这张
 
阅读(107)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018