From 21d4cbf1ad7f2492e56fa5e6012ac3810d132f00 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Sat, 27 Jan 2018 20:46:41 -0800 Subject: [PATCH] Move submodules into deps/ --- .gitmodules | 6 +++--- configure.ac | 43 +++++++++++++++++++++---------------- boost => deps/boost | 0 gecko-dev => deps/gecko-dev | 0 rocksdb => deps/rocksdb | 0 tools/boostrap.sh | 6 ++++-- tools/buildjs.sh | 4 ++-- tools/buildrocks.sh | 4 ++-- 8 files changed, 35 insertions(+), 28 deletions(-) rename boost => deps/boost (100%) rename gecko-dev => deps/gecko-dev (100%) rename rocksdb => deps/rocksdb (100%) diff --git a/.gitmodules b/.gitmodules index 136b15309..7a8bc63e1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,10 +1,10 @@ [submodule "rocksdb"] - path = rocksdb + path = deps/rocksdb url = https://github.com/facebook/rocksdb.git [submodule "gecko-dev"] - path = gecko-dev + path = deps/gecko-dev url = https://github.com/mozilla/gecko-dev.git branch = esr45 [submodule "boost"] - path = boost + path = deps/boost url = https://github.com/boostorg/boost.git diff --git a/configure.ac b/configure.ac index c27e78f5b..bb0a29d66 100644 --- a/configure.ac +++ b/configure.ac @@ -748,15 +748,15 @@ AC_HELP_STRING([--with-included-boost[[[=shared]]]], [Use the boost sources from AM_COND_IF([MINGW], [ BTOOLSET="mingw" - boost_libdir="$PWD/boost/stage/lib" + boost_libdir="$PWD/deps/boost/stage/lib" ], [ dnl the CXX may have a space and then arguments so we must chop them BTOOLSET=`echo $CXX | cut -d' ' -f1` - boost_libdir="$PWD/boost/lib" + boost_libdir="$PWD/deps/boost/lib" ]) AC_SUBST(BOOST_LDFLAGS, ["-L$boost_libdir"]) - AC_SUBST(BOOST_CPPFLAGS, ["-isystem $PWD/boost/include"]) + AC_SUBST(BOOST_CPPFLAGS, ["-isystem $PWD/deps/boost/include"]) AC_MSG_CHECKING([whether to use shared boost]) if [[ $withval = "shared" ]]; then @@ -770,9 +770,10 @@ AC_HELP_STRING([--with-included-boost[[[=shared]]]], [Use the boost sources from boost_linkage="$withval" boost_version="boost-${BOOST_VERSION_MIN}.${BOOST_VERSION_MIN_PATCH}" bash tools/boostrap.sh $BTOOLSET $BOOST_BUILT_LIBS $boost_variant $withval multi $boost_version - if [[ $? != 0 ]]; then + AS_IF([ test $? != 0 ], + [ AC_MSG_ERROR([Failed to build included boost.]) - fi + ]) AC_DEFINE(HAVE_LIB_BOOST_SYSTEM, 1, [Define if you have boost_system]) AC_MSG_NOTICE([Bootstrapping boost: done]) @@ -831,25 +832,29 @@ AC_HELP_STRING([--with-included-rocksdb[[[=shared]]]], [Use the RocksDB sources AC_MSG_RESULT([yes]) with_included_rocksdb="yes" - AC_SUBST(ROCKSDB_CPPFLAGS, ["-isystem $PWD/rocksdb/include"]) - AC_SUBST(ROCKSDB_LDFLAGS, ["-L$PWD/rocksdb/"]) + AC_SUBST(ROCKSDB_CPPFLAGS, ["-isystem $PWD/deps/rocksdb/include"]) + AC_SUBST(ROCKSDB_LDFLAGS, ["-L$PWD/deps/rocksdb/"]) AC_MSG_CHECKING([whether to use shared RocksDB]) if [[ $withval = "shared" ]]; then AC_MSG_RESULT([yes]) rocksdb_linkage="shared_lib" AC_MSG_NOTICE([Shared RocksDB linkage requires running charybdis with an intact build directory]) - ROCKSDB_LDFLAGS+=" -Wl,-rpath=$PWD/rocksdb/" + ROCKSDB_LDFLAGS+=" -Wl,-rpath=$PWD/deps/rocksdb/" AC_SUBST(ROCKSDB_LIBS, ["-lrocksdb"]) else AC_MSG_RESULT([no]) rocksdb_linkage="static_lib" AC_MSG_NOTICE([static RocksDB linkage requires multiple dependencies]) AC_MSG_NOTICE([| You will need: bzip2, zlib, snappy]) - AC_SUBST(ROCKSDB_LIBS, ["$PWD/rocksdb/librocksdb.a"]) + AC_SUBST(ROCKSDB_LIBS, ["$PWD/deps/rocksdb/librocksdb.a"]) fi bash tools/buildrocks.sh $rocksdb_linkage + AS_IF([ test $? != 0 ], + [ + AC_MSG_ERROR([Failed to build RocksDB]) + ]) ],[ AC_MSG_RESULT([no]) with_included_rocksdb="no" @@ -877,13 +882,13 @@ AC_HELP_STRING([--with-included-js[[[=shared]]]], [Use the JS engine (SpiderMonk with_included_js="yes" AC_SUBST(JS_CPPFLAGS) - JS_CPPFLAGS+=" -isystem $PWD/gecko-dev/js/src/build_OPT.OBJ/dist/include" - #JS_CPPFLAGS+=" -I$PWD/gecko-dev/js/src/build_OPT.OBJ/dist/include" + JS_CPPFLAGS+=" -isystem $PWD/deps/gecko-dev/js/src/build_OPT.OBJ/dist/include" + #JS_CPPFLAGS+=" -I$PWD/deps/gecko-dev/js/src/build_OPT.OBJ/dist/include" AC_SUBST(JS_LDFLAGS) - JS_LDFLAGS+=" -L$PWD/gecko-dev/js/src/build_OPT.OBJ/dist/sdk/lib" - JS_LDFLAGS+=" -L$PWD/gecko-dev/js/src/build_OPT.OBJ/intl/icu/target/lib" - JS_LDFLAGS+=" -L$PWD/gecko-dev/js/src/build_OPT.OBJ/js/src" + JS_LDFLAGS+=" -L$PWD/deps/gecko-dev/js/src/build_OPT.OBJ/dist/sdk/lib" + JS_LDFLAGS+=" -L$PWD/deps/gecko-dev/js/src/build_OPT.OBJ/intl/icu/target/lib" + JS_LDFLAGS+=" -L$PWD/deps/gecko-dev/js/src/build_OPT.OBJ/js/src" AC_SUBST(JS_LIBS) JS_LIBS+=" -lmozjs-52" @@ -892,17 +897,17 @@ AC_HELP_STRING([--with-included-js[[[=shared]]]], [Use the JS engine (SpiderMonk dnl !!!! dnl HACK BUG-WORKAROUND - Mozilla forgot to include this in their lib? dnl Runtime segfault (unresolved dynamic function address) if this is not specified - #JS_LIBS+=" $PWD/gecko-dev/js/src/build_OPT.OBJ/mfbt/Unified_cpp_mfbt0.o" - #JS_LIBS+=" $PWD/gecko-dev/js/src/build_OPT.OBJ/mfbt/Unified_cpp_mfbt1.o" - JS_LIBS+=" $PWD/gecko-dev/js/src/build_OPT.OBJ/mozglue/misc/TimeStamp.o" + #JS_LIBS+=" $PWD/deps/gecko-dev/js/src/build_OPT.OBJ/mfbt/Unified_cpp_mfbt0.o" + #JS_LIBS+=" $PWD/deps/gecko-dev/js/src/build_OPT.OBJ/mfbt/Unified_cpp_mfbt1.o" + JS_LIBS+=" $PWD/deps/gecko-dev/js/src/build_OPT.OBJ/mozglue/misc/TimeStamp.o" AC_MSG_CHECKING([whether to use shared JS engine]) if [[ $withval = "shared" ]]; then AC_MSG_RESULT([yes]) AC_MSG_NOTICE([Shared SpiderMonkey linkage requires running charybdis with an intact build directory]) js_linkage="shared" - JS_LDFLAGS+=" -Wl,-rpath=$PWD/gecko-dev/js/src/build_OPT.OBJ/dist/sdk/lib" - JS_LDFLAGS+=" -Wl,-rpath=$PWD/gecko-dev/js/src/build_OPT.OBJ/intl/icu/target/lib" + JS_LDFLAGS+=" -Wl,-rpath=$PWD/deps/gecko-dev/js/src/build_OPT.OBJ/dist/sdk/lib" + JS_LDFLAGS+=" -Wl,-rpath=$PWD/deps/gecko-dev/js/src/build_OPT.OBJ/intl/icu/target/lib" else AC_MSG_RESULT([no]) js_linkage="static" diff --git a/boost b/deps/boost similarity index 100% rename from boost rename to deps/boost diff --git a/gecko-dev b/deps/gecko-dev similarity index 100% rename from gecko-dev rename to deps/gecko-dev diff --git a/rocksdb b/deps/rocksdb similarity index 100% rename from rocksdb rename to deps/rocksdb diff --git a/tools/boostrap.sh b/tools/boostrap.sh index 26b2902a4..e95fc0b06 100755 --- a/tools/boostrap.sh +++ b/tools/boostrap.sh @@ -86,8 +86,8 @@ USERDIR=$PWD ### Populate the boost submodule directory. run cd $TOPDIR -run git submodule update --init boost -run cd boost +run git submodule update --init deps/boost +run cd deps/boost ### Build toolsy run git submodule update --init --recursive --checkout tools/build @@ -165,6 +165,8 @@ run git submodule update --init --recursive --checkout libs/algorithm run git submodule update --init --recursive --checkout libs/locale +run git submodule update --init --recursive --checkout libs/gil + ### Install should go right into this local submodule repository run ./bootstrap.sh --prefix=$PWD --libdir=$PWD/lib --with-libraries=$BLIBS $BSFLAGS run ./b2 -d0 headers diff --git a/tools/buildjs.sh b/tools/buildjs.sh index 156e699ca..2b7bb5374 100755 --- a/tools/buildjs.sh +++ b/tools/buildjs.sh @@ -44,8 +44,8 @@ echo "*** Building SpiderMonkey... " USERDIR=$PWD # Save current dir and return to it later -run git submodule update --init --remote gecko-dev -run cd gecko-dev +run git submodule update --init --remote deps/gecko-dev +run cd deps/gecko-dev #run git fetch --depth=1 origin $BRANCH run git checkout $BRANCH diff --git a/tools/buildrocks.sh b/tools/buildrocks.sh index 81cf06934..348c77f22 100755 --- a/tools/buildrocks.sh +++ b/tools/buildrocks.sh @@ -44,9 +44,9 @@ echo "*** Building RocksDB... " USERDIR=$PWD # Save current dir and return to it later -run git submodule update --init rocksdb +run git submodule update --init deps/rocksdb -run cd rocksdb +run cd deps/rocksdb run git checkout v5.5.3 CFLAGS=-fPIC run make -j$JOBS $LINKAGE run cd $USERDIR # Return to user's original directory