From c9d71db1e56ce77584903589ce15f90b8ac0821b Mon Sep 17 00:00:00 2001 From: Tom Zander Date: Mon, 15 Feb 2016 10:55:04 +0000 Subject: [PATCH 1/2] Allow src!=build dir building --- src/Makefile.am | 4 ++-- src/Makefile.qt.include | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 4c12e550b4d..aa7679ca5ed 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,8 +7,8 @@ AM_CPPFLAGS = $(HARDENED_CPPFLAGS) if EMBEDDED_LEVELDB LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/include LEVELDB_CPPFLAGS += -I$(srcdir)/leveldb/helpers/memenv -LIBLEVELDB += $(builddir)/leveldb/libleveldb.a -LIBMEMENV += $(builddir)/leveldb/libmemenv.a +LIBLEVELDB += $(top_srcdir)/src/leveldb/libleveldb.a +LIBMEMENV += $(top_srcdir)/src/leveldb/libmemenv.a # NOTE: This dependency is not strictly necessary, but without it make may try to build both in parallel, which breaks the LevelDB build system in a race $(LIBLEVELDB): $(LIBMEMENV) diff --git a/src/Makefile.qt.include b/src/Makefile.qt.include index a390d96a9f0..76354e6bdda 100644 --- a/src/Makefile.qt.include +++ b/src/Makefile.qt.include @@ -156,6 +156,10 @@ QT_MOC = \ qt/overviewpage.moc \ qt/rpcconsole.moc +if ENABLE_WALLET +MOC_DEFS += -DENABLE_WALLET=1 +endif + QT_QRC_CPP = qt/qrc_bitcoin.cpp QT_QRC = qt/bitcoin.qrc QT_QRC_LOCALE_CPP = qt/qrc_bitcoin_locale.cpp From 40bae4917ecf213f5206ceab7d0e87e0e4df46b5 Mon Sep 17 00:00:00 2001 From: Tom Zander Date: Wed, 17 Feb 2016 14:05:49 +0000 Subject: [PATCH 2/2] Make the rpc tests work when src!=builddir --- configure.ac | 1 + qa/pull-tester/rpc-tests.py | 5 +++-- qa/pull-tester/tests_config.py.in | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index d556f38c373..1f2552db5f0 100644 --- a/configure.ac +++ b/configure.ac @@ -940,6 +940,7 @@ AC_SUBST(MINIUPNPC_LIBS) AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py]) AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh]) AC_CONFIG_FILES([qa/pull-tester/tests_config.py],[chmod +x qa/pull-tester/tests_config.py]) +AC_CONFIG_FILES([qa/pull-tester/rpc-tests.py:qa/pull-tester/rpc-tests.py],[chmod +x qa/pull-tester/rpc-tests.py]) dnl boost's m4 checks do something really nasty: they export these vars. As a dnl result, they leak into secp256k1's configure and crazy things happen. diff --git a/qa/pull-tester/rpc-tests.py b/qa/pull-tester/rpc-tests.py index d0cdf703581..9069454f820 100755 --- a/qa/pull-tester/rpc-tests.py +++ b/qa/pull-tester/rpc-tests.py @@ -62,6 +62,7 @@ for arg in sys.argv[1:]: #Set env vars buildDir = BUILDDIR +sourceDir = SOURCEDIR if "BITCOIND" not in os.environ: os.environ["BITCOIND"] = buildDir + '/src/bitcoind' + EXEEXT if "BITCOINCLI" not in os.environ: @@ -142,10 +143,10 @@ def runtests(): print("Initializing coverage directory at %s\n" % coverage.dir) if(ENABLE_WALLET == 1 and ENABLE_UTILS == 1 and ENABLE_BITCOIND == 1): - rpcTestDir = buildDir + '/qa/rpc-tests/' + rpcTestDir = sourceDir + '/qa/rpc-tests/' run_extended = '-extended' in opts cov_flag = coverage.flag if coverage else '' - flags = " --srcdir %s/src %s %s" % (buildDir, cov_flag, passOn) + flags = " --srcdir %s/src %s %s" % (sourceDir, cov_flag, passOn) #Run Tests for i in range(len(testScripts)): diff --git a/qa/pull-tester/tests_config.py.in b/qa/pull-tester/tests_config.py.in index 937b4231f12..021dd96d026 100644 --- a/qa/pull-tester/tests_config.py.in +++ b/qa/pull-tester/tests_config.py.in @@ -4,6 +4,7 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. BUILDDIR="@abs_top_builddir@" +SOURCEDIR="@abs_top_srcdir@" EXEEXT="@EXEEXT@" # These will turn into comments if they were disabled when configuring.