diff options
author | Luke Chen <luke.chen@mongodb.com> | 2022-02-02 15:00:17 +1100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-02-02 04:51:20 +0000 |
commit | 5fea92ae32c7265a957ed760946f75b7c75c0e2e (patch) | |
tree | d6fbf3ea747337e0148dca2c1e64f13654a39e5e /src/third_party/wiredtiger/dist | |
parent | 5f19771466dff7642eacbc2dfe4d4bfb1074b8a4 (diff) | |
download | mongo-5fea92ae32c7265a957ed760946f75b7c75c0e2e.tar.gz |
Import wiredtiger: 0d65fabfca1e3435e8f8298a98d4fc91c56e331c from branch mongodb-master
ref: 9e92b73891..0d65fabfca
for: 5.3.0
WT-7598 Remove autoconf & scons build systems
Diffstat (limited to 'src/third_party/wiredtiger/dist')
-rwxr-xr-x | src/third_party/wiredtiger/dist/s_all | 6 | ||||
-rw-r--r-- | src/third_party/wiredtiger/dist/s_clang-scan | 25 | ||||
-rw-r--r-- | src/third_party/wiredtiger/dist/s_clang-tidy | 14 | ||||
-rwxr-xr-x | src/third_party/wiredtiger/dist/s_copyright | 2 | ||||
-rw-r--r-- | src/third_party/wiredtiger/dist/s_copyright.list | 1 | ||||
-rwxr-xr-x | src/third_party/wiredtiger/dist/s_export | 4 | ||||
-rwxr-xr-x | src/third_party/wiredtiger/dist/s_release | 9 | ||||
-rwxr-xr-x | src/third_party/wiredtiger/dist/s_style | 1 | ||||
-rwxr-xr-x | src/third_party/wiredtiger/dist/s_tags | 6 | ||||
-rwxr-xr-x | src/third_party/wiredtiger/dist/s_version | 46 | ||||
-rwxr-xr-x | src/third_party/wiredtiger/dist/s_win | 45 |
11 files changed, 27 insertions, 132 deletions
diff --git a/src/third_party/wiredtiger/dist/s_all b/src/third_party/wiredtiger/dist/s_all index 916115ca3ee..d6511a483d6 100755 --- a/src/third_party/wiredtiger/dist/s_all +++ b/src/third_party/wiredtiger/dist/s_all @@ -36,11 +36,6 @@ done echo "Updating files that include the package version" && sh ./s_version $force -test "$reconf" -eq 0 || { - (echo "Rebuilding GNU tools library support" && - cd ../build_posix && 2>&1 sh ./reconf | sed -e 's/^/ /') -} - errchk() { if ! `test -s $2`; then @@ -116,7 +111,6 @@ COMMANDS=" 2>&1 ./s_typedef -c > ${t_pfx}s_typedef_c 2>&1 ./s_void > ${t_pfx}s_void 2>&1 ./s_whitespace > ${t_pfx}s_whitespace -2>&1 ./s_win > ${t_pfx}s_win 2>&1 python function.py > ${t_pfx}py_function 2>&1 python style.py > ${t_pfx}py_style" diff --git a/src/third_party/wiredtiger/dist/s_clang-scan b/src/third_party/wiredtiger/dist/s_clang-scan index 9a5ee3d4587..5235a069c60 100644 --- a/src/third_party/wiredtiger/dist/s_clang-scan +++ b/src/third_party/wiredtiger/dist/s_clang-scan @@ -1,9 +1,11 @@ #! /bin/sh -t=__wt.$$ +t_out=__wt.$$.out +t_err=__wt.$$.err a=__wt.$$.a b=__wt.$$.b -trap 'rm -rf $a $b $t' 0 1 2 3 13 15 +t_build=__s_clang_scan_tmp_build +trap 'rm -rf $a $b $t_out $t_err $t_build' 0 1 2 3 13 15 # Find the top-level WiredTiger directory and move to there. top=`git rev-parse --show-toplevel` && cd $top || exit 1 @@ -32,26 +34,25 @@ echo "$0: scan-build: $scan" # Remove old reports. rm -rf clangScanBuildReports && mkdir clangScanBuildReports +rm -rf ${t_build} && mkdir ${t_build} -sh autogen.sh > /dev/null || exit 1 - +cd ${t_build} args="-o clangScanBuildReports" args="$args --use-cc=$compiler" args="$args -disable-checker core.NullDereference" -$scan $args ./configure 'CFLAGS=-g' \ - --disable-shared --enable-diagnostic --enable-strict > /dev/null -$scan $args make -j 8 wt 1>/dev/null 2>$t - -make -j 8 distclean > /dev/null +$scan $args cmake CMAKE_C_FLAGS=-g \ + -DENABLE_STATIC=1 -DENABLE_SHARED=0 -DHAVE_DIAGNOSTIC=1 -DENABLE_STRICT=1 ../.> /dev/null +$scan $args make -j 8 wt 1>../$t_out 2>../$t_err +cd .. -grep 'No bugs found' $t > /dev/null && exit 0 +grep 'No bugs found' $t_out > /dev/null && exit 0 # Compare the set of errors/warnings and exit success when they're expected. # clang-scan outputs errors/warnings with a leading file path followed by a # colon, followed by the string "error:" or "warning:". cat dist/s_clang-scan.diff | egrep '^[a-z\./].*error: |^[a-z\./].*warning: ' | sed -e 's/:.*:.*://' | sort > $a -cat $t | +cat $t_err | egrep '^[a-z\./].*error: |^[a-z\./].*warning: ' | sed -e 's/:.*:.*://' | sort > $b diff $a $b > /dev/null && exit 0 @@ -59,5 +60,5 @@ echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" echo 'scan-build output differs from expected:' echo '<<<<<<<<<< Expected >>>>>>>>>> Current' echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" -diff dist/s_clang-scan.diff $t +diff dist/s_clang-scan.diff $t_err exit 1 diff --git a/src/third_party/wiredtiger/dist/s_clang-tidy b/src/third_party/wiredtiger/dist/s_clang-tidy index 784bdb1c413..b0f928054ae 100644 --- a/src/third_party/wiredtiger/dist/s_clang-tidy +++ b/src/third_party/wiredtiger/dist/s_clang-tidy @@ -1,7 +1,8 @@ #! /bin/sh t=__wt.$$ -trap 'rm -rf $t' 0 1 2 3 13 15 +t_pfx=__s_clang_tidy_tmp_ +trap 'rm -rf $t $t_pfx*' 0 1 2 3 13 15 # Find the top-level WiredTiger directory and move to there. top=`git rev-parse --show-toplevel` && cd $top || exit 1 @@ -23,13 +24,14 @@ if test -z "$tidy"; then fi echo "$0: clang-tidy: $tidy" -(sh autogen.sh && - ./configure --enable-diagnostic --enable-strict) > /dev/null || exit 1 +rm -rf ${t_pfx}build && mkdir ${t_pfx}build +(cd ${t_pfx}build && + cmake -DHAVE_DIAGNOSTIC=1 -DENABLE_STRICT=1 ../.) > /dev/null || exit 1 # We need a custom wiredtiger_config.h, clang-tidy doesn't know where to # find the x86intrin.h include file. -cp wiredtiger_config.h $t -sed '/HAVE_X86INTRIN_H/d' < $t > wiredtiger_config.h +cp ${t_pfx}build/config/wiredtiger_config.h $t +sed '/HAVE_X86INTRIN_H/d' < $t > ${t_pfx}build/config/wiredtiger_config.h # We need a custom verify_build.h, clang-tidy doesn't like the magic. f=src/include/verify_build.h @@ -37,7 +39,7 @@ cat $f > $f.save echo '#define WT_STATIC_ASSERT(a)' > $f def="-D_GNU_SOURCE" -inc="-I. -Isrc/include" +inc="-I${t_pfx}build/config -I${t_pfx}build/include -Isrc/include" args="-checks=*" args="$args,-android-cloexec-fopen" diff --git a/src/third_party/wiredtiger/dist/s_copyright b/src/third_party/wiredtiger/dist/s_copyright index 4b3ed9fc0d9..98d1b45e1b2 100755 --- a/src/third_party/wiredtiger/dist/s_copyright +++ b/src/third_party/wiredtiger/dist/s_copyright @@ -112,7 +112,7 @@ fi -o -name '*.py' \ -o -name '*.swig' | sed -e '/Makefile.in/d' \ - -e '/^build_posix\//d' \ + -e '/^cmake\//d' \ -e '/checksum\/power8\//d' \ -e '/checksum\/zseries\//d' \ -e '/\/3rdparty\//d' \ diff --git a/src/third_party/wiredtiger/dist/s_copyright.list b/src/third_party/wiredtiger/dist/s_copyright.list index 8f4534c2670..8488696cfb9 100644 --- a/src/third_party/wiredtiger/dist/s_copyright.list +++ b/src/third_party/wiredtiger/dist/s_copyright.list @@ -1,7 +1,6 @@ skip bench/workgen/workgen/workgen.py skip bench/workgen/workgen_wrap.cxx skip cmake/install/wiredtiger.pc.in -skip build_win/wiredtiger_config.h skip dist/api_config.py skip dist/api_config_gen.py skip dist/api_data.py diff --git a/src/third_party/wiredtiger/dist/s_export b/src/third_party/wiredtiger/dist/s_export index 8615f1415b2..f2c093b1b2e 100755 --- a/src/third_party/wiredtiger/dist/s_export +++ b/src/third_party/wiredtiger/dist/s_export @@ -42,14 +42,12 @@ check() # This check would normally be done after the library is built, but this way # we don't forget about a symbol during development. We usually build in the -# top-level or build_posix directories, check the previously built library, +# top-level directories, check the previously built library, # if it exists. And, allow this script to be run from the top-level directory # as well as locally. (??? this last wasn't true before my changes and still # isn't) # # Check all library images that appear; typically they will be one of -# ../build_posix/.libs/libwiredtiger.$ext (autotools build) -# ../.libs/libwiredtiger.$ext (autotools build at top level) # ../build/libwiredtiger.$ext (cmake build) # ../cmake_build/libwiredtiger.$ext (cmake build) diff --git a/src/third_party/wiredtiger/dist/s_release b/src/third_party/wiredtiger/dist/s_release index f55247f6fe2..f96b96e683e 100755 --- a/src/third_party/wiredtiger/dist/s_release +++ b/src/third_party/wiredtiger/dist/s_release @@ -32,15 +32,6 @@ fi echo "Running 'dist/s_all' in the release tree" (cd "$DEST/dist" && env WT_RELEASE_BUILD=yes sh s_all -A > /dev/null) -echo "Running swig to generate the Python API" -(cd "$DEST/build_posix" && - ../configure --enable-python && - (cd lang/python && make ../../../lang/python/wiredtiger_wrap.c) && - make distclean && - find . -type d -a -empty | xargs rmdir && - find . -type d -a -empty | xargs rmdir && - find . -type d -a -empty | xargs rmdir) > /dev/null - echo "Building documentation" (cd "$DEST/dist" && sh s_docs > /dev/null) diff --git a/src/third_party/wiredtiger/dist/s_style b/src/third_party/wiredtiger/dist/s_style index dfee7284c38..0b94f582332 100755 --- a/src/third_party/wiredtiger/dist/s_style +++ b/src/third_party/wiredtiger/dist/s_style @@ -20,7 +20,6 @@ if [ $# -ne 1 ]; then -name '*.[chsy]' -o -name '*.in' -o -name '*.dox' -o -name '*.cxx' -o -name '*.py' -o -name '*.cmake' -o -name '*.i' | sed -e '/Makefile.in/d' \ -e '/test\/3rdparty/d' \ - -e '/build_win\/wiredtiger_config.h/d' \ -e '/checksum\/power8/d' \ -e '/checksum\/zseries/d' | xargs $xp -n 1 -I{} sh ./dist/s_style {} diff --git a/src/third_party/wiredtiger/dist/s_tags b/src/third_party/wiredtiger/dist/s_tags index 52449aca582..c5faedb034b 100755 --- a/src/third_party/wiredtiger/dist/s_tags +++ b/src/third_party/wiredtiger/dist/s_tags @@ -26,8 +26,10 @@ for i in -d -t -w --language-force=C '-I WT_GCC_FUNC_ATTRIBUTE+'; do fi done -# Generate a tags file for the standard build directory. -(cd ../build_posix && +# If it exists, generate a tags file for the build directory. The user can have +# any number of out-of-source build directories. We will just conventionally test +# for a directory named 'build'. +test -d ../build && (cd ../build && rm -f tags && ctags $flags ../src/include/*.in `find ../src -name '*.[ch]'` 2>/dev/null) diff --git a/src/third_party/wiredtiger/dist/s_version b/src/third_party/wiredtiger/dist/s_version index 63b424240c9..736a712af8a 100755 --- a/src/third_party/wiredtiger/dist/s_version +++ b/src/third_party/wiredtiger/dist/s_version @@ -3,9 +3,6 @@ # Propagate version changes to the necessary files. . ../RELEASE_INFO -m4dir=../build_posix/aclocal -rpmspec=./package/wiredtiger.spec -tmp_file=__tmp cmakedir=../cmake/configs force=no @@ -19,48 +16,6 @@ while : esac done -GenAutoconfVersion(){ - # If the version hasn't changed and we're not forcing the issue, we're done. - if test "$force" = no -a \ - -f $m4dir/version.m4 -a \ - -f $m4dir/version-set.m4 ; then - eval `grep '^VERSION_[A-Z]*=' $m4dir/version-set.m4` - if test x${WIREDTIGER_VERSION_MAJOR} = x${VERSION_MAJOR} -a \ - x${WIREDTIGER_VERSION_MINOR} = x${VERSION_MINOR} -a \ - x${WIREDTIGER_VERSION_PATCH} = x${VERSION_PATCH} ; then - return - fi - fi - dotted_version=${WIREDTIGER_VERSION_MAJOR}.${WIREDTIGER_VERSION_MINOR}.${WIREDTIGER_VERSION_PATCH} - echo "Building $m4dir/version.m4" - cat > $m4dir/version.m4 <<-END - dnl WiredTiger product version for AC_INIT. Maintained by dist/s_version - ${dotted_version} - END - - echo "Building $m4dir/version-set.m4" - cat > $m4dir/version-set.m4 <<-END - dnl build by dist/s_version - - VERSION_MAJOR=${WIREDTIGER_VERSION_MAJOR} - VERSION_MINOR=${WIREDTIGER_VERSION_MINOR} - VERSION_PATCH=${WIREDTIGER_VERSION_PATCH} - VERSION_STRING='"${WIREDTIGER_VERSION_STRING}"' - - AC_SUBST(VERSION_MAJOR) - AC_SUBST(VERSION_MINOR) - AC_SUBST(VERSION_PATCH) - AC_SUBST(VERSION_STRING) - - VERSION_NOPATCH=${WIREDTIGER_VERSION_MAJOR}.${WIREDTIGER_VERSION_MINOR} - AC_SUBST(VERSION_NOPATCH) - END - - echo "Building $rpmspec" - sed -e "s/Version: .*/Version: ${dotted_version}/" $rpmspec \ - > $tmp_file && mv $tmp_file $rpmspec -} - GenCmakeVersion(){ if test "$force" = no -a \ -f $cmakedir/version.cmake ; then @@ -81,5 +36,4 @@ GenCmakeVersion(){ END } -GenAutoconfVersion GenCmakeVersion diff --git a/src/third_party/wiredtiger/dist/s_win b/src/third_party/wiredtiger/dist/s_win deleted file mode 100755 index 5b45cacf0f4..00000000000 --- a/src/third_party/wiredtiger/dist/s_win +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -t=__wt.$$ -trap 'rm -f $t' 0 1 2 3 13 15 - -# Insulate against locale-specific sort order -LC_ALL=C -export LC_ALL - -win_config() -{ - f='../build_win/wiredtiger_config.h' - egrep '#define|#undef' \ - ../build_posix/config.hin $f | - sed 's/^.*#//' | - awk '{print $2}' | - egrep -v '^(LT_OBJDIR|PACKAGE|VERSION)' | - sort | uniq -u > $t - - test -s $t && { - echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" - echo "$f: configuration #defines do not match POSIX" - echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" - cat $t - exit 1 - } -} - -win_export() -{ - # Build the Windows list of exported symbols. - f='../build_win/wiredtiger.def' - (echo 'LIBRARY WIREDTIGER' - echo 'EXPORTS' - sed -e '/^$/d' \ - -e '/^#/d' \ - -e 's/^/ /') < s_export.list > $t - cmp $t $f > /dev/null 2>&1 || - (echo "Building $f" && rm -f $f && cp $t $f) -} - -win_config -win_export - -exit 0 |