Skip to content

Commit fde0ac4

Browse files
committed
Merge #8133: build: Finish up out-of-tree changes
d1a3d57 bulid: fix "make translate" when out-of-tree (Cory Fields) 340012d build: add temporary fix for "bad magic number" error in out-of-tree builds (Cory Fields) 142ffc7 travis: use out-of-tree build (Cory Fields) 92e37a3 build: fix out-of-tree 'make deploy' for osx (Cory Fields) ab95d5d build: a few ugly hacks to get the rpc tests working out-of-tree (Cory Fields) fc4ad0c build: more out-of-tree fixups (Cory Fields) 0cb0f26 build: out-of-tree fixups (Cory Fields)
2 parents 9201ce8 + d1a3d57 commit fde0ac4

File tree

9 files changed

+80
-25
lines changed

9 files changed

+80
-25
lines changed

.travis.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,8 @@ script:
7272
- BITCOIN_CONFIG_ALL="--disable-dependency-tracking --prefix=$TRAVIS_BUILD_DIR/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib"
7373
- depends/$HOST/native/bin/ccache --max-size=$CCACHE_SIZE
7474
- test -n "$USE_SHELL" && eval '"$USE_SHELL" -c "./autogen.sh"' || ./autogen.sh
75-
- ./configure --cache-file=config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
76-
- make distdir PACKAGE=bitcoin VERSION=$HOST
77-
- cd bitcoin-$HOST
78-
- ./configure --cache-file=../config.cache $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
75+
- mkdir build && cd build
76+
- ../configure $BITCOIN_CONFIG_ALL $BITCOIN_CONFIG || ( cat config.log && false)
7977
- make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && make $GOAL V=1 ; false )
8078
- export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib
8179
- if [ "$RUN_TESTS" = "true" ]; then make $MAKEJOBS check VERBOSE=1; fi

Makefile.am

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ OSX_DSSTORE_GEN=$(top_srcdir)/contrib/macdeploy/custom_dsstore.py
2828
OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
2929
OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
3030
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
31-
OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed
31+
OSX_PLIST=$(top_builddir)/share/qt/Info.plist #not installed
3232
OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW
3333

3434
DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
@@ -53,18 +53,8 @@ COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
5353
leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info
5454

5555
dist-hook:
56-
-$(MAKE) -C $(top_distdir)/src/leveldb clean
57-
-$(MAKE) -C $(top_distdir)/src/secp256k1 distclean
5856
-$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
5957

60-
distcheck-hook:
61-
$(MKDIR_P) $(top_distdir)/_build/src/leveldb
62-
cp -rf $(top_srcdir)/src/leveldb/* $(top_distdir)/_build/src/leveldb/
63-
-$(MAKE) -C $(top_distdir)/_build/src/leveldb clean
64-
65-
distcleancheck:
66-
@:
67-
6858
$(BITCOIN_WIN_INSTALLER): all-recursive
6959
$(MKDIR_P) $(top_builddir)/release
7060
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
@@ -234,7 +224,11 @@ EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.py qa/rpc-
234224

235225
CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
236226

227+
# This file is problematic for out-of-tree builds if it exists.
228+
DISTCLEANFILES = qa/pull-tester/tests_config.pyc
229+
237230
.INTERMEDIATE: $(COVERAGE_INFO)
238231

239232
clean-local:
240233
rm -rf coverage_percent.txt test_bitcoin.coverage/ total.coverage/ qa/tmp/ cache/ $(OSX_APP)
234+
rm -rf qa/pull-tester/__pycache__

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,6 +1060,7 @@ AC_SUBST(MINIUPNPC_LIBS)
10601060
AC_CONFIG_FILES([Makefile src/Makefile share/setup.nsi share/qt/Info.plist src/test/buildenv.py])
10611061
AC_CONFIG_FILES([qa/pull-tester/run-bitcoind-for-test.sh],[chmod +x qa/pull-tester/run-bitcoind-for-test.sh])
10621062
AC_CONFIG_FILES([qa/pull-tester/tests_config.py],[chmod +x qa/pull-tester/tests_config.py])
1063+
AC_CONFIG_LINKS([qa/pull-tester/rpc-tests.py:qa/pull-tester/rpc-tests.py])
10631064

10641065
dnl boost's m4 checks do something really nasty: they export these vars. As a
10651066
dnl result, they leak into secp256k1's configure and crazy things happen.

qa/pull-tester/rpc-tests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import tempfile
3030
import re
3131

32+
sys.path.append("qa/pull-tester/")
3233
from tests_config import *
3334

3435
BOLD = ("","")
@@ -37,7 +38,7 @@
3738
# terminal via ANSI escape sequences:
3839
BOLD = ('\033[0m', '\033[1m')
3940

40-
RPC_TESTS_DIR = BUILDDIR + '/qa/rpc-tests/'
41+
RPC_TESTS_DIR = SRCDIR + '/qa/rpc-tests/'
4142

4243
#If imported values are not defined then set to zero (or disabled)
4344
if 'ENABLE_WALLET' not in vars():

qa/pull-tester/tests_config.py.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# Distributed under the MIT software license, see the accompanying
44
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

6+
SRCDIR="@abs_top_srcdir@"
67
BUILDDIR="@abs_top_builddir@"
78
EXEEXT="@EXEEXT@"
89

src/Makefile.am

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,8 @@ CTAES_DIST += crypto/ctaes/ctaes.h
418418
CTAES_DIST += crypto/ctaes/README.md
419419
CTAES_DIST += crypto/ctaes/test.c
420420

421-
CLEANFILES = leveldb/libleveldb.a leveldb/libmemenv.a
422-
CLEANFILES += $(EXTRA_LIBRARIES)
421+
CLEANFILES = $(EXTRA_LIBRARIES)
422+
423423
CLEANFILES += *.gcda *.gcno
424424
CLEANFILES += compat/*.gcda compat/*.gcno
425425
CLEANFILES += consensus/*.gcda consensus/*.gcno
@@ -435,14 +435,14 @@ CLEANFILES += zmq/*.gcda zmq/*.gcno
435435

436436
DISTCLEANFILES = obj/build.h
437437

438-
EXTRA_DIST = leveldb $(CTAES_DIST)
438+
EXTRA_DIST = $(CTAES_DIST)
439439

440440
clean-local:
441-
-$(MAKE) -C leveldb clean
442441
-$(MAKE) -C secp256k1 clean
443442
-$(MAKE) -C univalue clean
444443
-rm -f leveldb/*/*.gcda leveldb/*/*.gcno leveldb/helpers/memenv/*.gcda leveldb/helpers/memenv/*.gcno
445444
-rm -f config.h
445+
-rm -rf test/__pycache__
446446

447447
.rc.o:
448448
@test -f $(WINDRES)

src/Makefile.leveldb.include

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,61 @@ leveldb_libleveldb_a_CPPFLAGS = $(AM_CPPFLAGS) $(LEVELDB_CPPFLAGS_INT) $(LEVELDB
2626
leveldb_libleveldb_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
2727

2828
leveldb_libleveldb_a_SOURCES=
29+
leveldb_libleveldb_a_SOURCES += leveldb/port/atomic_pointer.h
30+
leveldb_libleveldb_a_SOURCES += leveldb/port/port_example.h
31+
leveldb_libleveldb_a_SOURCES += leveldb/port/port_posix.h
32+
leveldb_libleveldb_a_SOURCES += leveldb/port/win/stdint.h
33+
leveldb_libleveldb_a_SOURCES += leveldb/port/port.h
34+
leveldb_libleveldb_a_SOURCES += leveldb/port/port_win.h
35+
leveldb_libleveldb_a_SOURCES += leveldb/port/thread_annotations.h
36+
leveldb_libleveldb_a_SOURCES += leveldb/include/leveldb/db.h
37+
leveldb_libleveldb_a_SOURCES += leveldb/include/leveldb/options.h
38+
leveldb_libleveldb_a_SOURCES += leveldb/include/leveldb/comparator.h
39+
leveldb_libleveldb_a_SOURCES += leveldb/include/leveldb/filter_policy.h
40+
leveldb_libleveldb_a_SOURCES += leveldb/include/leveldb/slice.h
41+
leveldb_libleveldb_a_SOURCES += leveldb/include/leveldb/table_builder.h
42+
leveldb_libleveldb_a_SOURCES += leveldb/include/leveldb/env.h
43+
leveldb_libleveldb_a_SOURCES += leveldb/include/leveldb/c.h
44+
leveldb_libleveldb_a_SOURCES += leveldb/include/leveldb/iterator.h
45+
leveldb_libleveldb_a_SOURCES += leveldb/include/leveldb/cache.h
46+
leveldb_libleveldb_a_SOURCES += leveldb/include/leveldb/dumpfile.h
47+
leveldb_libleveldb_a_SOURCES += leveldb/include/leveldb/table.h
48+
leveldb_libleveldb_a_SOURCES += leveldb/include/leveldb/write_batch.h
49+
leveldb_libleveldb_a_SOURCES += leveldb/include/leveldb/status.h
50+
leveldb_libleveldb_a_SOURCES += leveldb/db/log_format.h
51+
leveldb_libleveldb_a_SOURCES += leveldb/db/memtable.h
52+
leveldb_libleveldb_a_SOURCES += leveldb/db/version_set.h
53+
leveldb_libleveldb_a_SOURCES += leveldb/db/write_batch_internal.h
54+
leveldb_libleveldb_a_SOURCES += leveldb/db/filename.h
55+
leveldb_libleveldb_a_SOURCES += leveldb/db/version_edit.h
56+
leveldb_libleveldb_a_SOURCES += leveldb/db/dbformat.h
57+
leveldb_libleveldb_a_SOURCES += leveldb/db/builder.h
58+
leveldb_libleveldb_a_SOURCES += leveldb/db/log_writer.h
59+
leveldb_libleveldb_a_SOURCES += leveldb/db/db_iter.h
60+
leveldb_libleveldb_a_SOURCES += leveldb/db/skiplist.h
61+
leveldb_libleveldb_a_SOURCES += leveldb/db/db_impl.h
62+
leveldb_libleveldb_a_SOURCES += leveldb/db/table_cache.h
63+
leveldb_libleveldb_a_SOURCES += leveldb/db/snapshot.h
64+
leveldb_libleveldb_a_SOURCES += leveldb/db/log_reader.h
65+
leveldb_libleveldb_a_SOURCES += leveldb/table/filter_block.h
66+
leveldb_libleveldb_a_SOURCES += leveldb/table/block_builder.h
67+
leveldb_libleveldb_a_SOURCES += leveldb/table/block.h
68+
leveldb_libleveldb_a_SOURCES += leveldb/table/two_level_iterator.h
69+
leveldb_libleveldb_a_SOURCES += leveldb/table/merger.h
70+
leveldb_libleveldb_a_SOURCES += leveldb/table/format.h
71+
leveldb_libleveldb_a_SOURCES += leveldb/table/iterator_wrapper.h
72+
leveldb_libleveldb_a_SOURCES += leveldb/util/crc32c.h
73+
leveldb_libleveldb_a_SOURCES += leveldb/util/arena.h
74+
leveldb_libleveldb_a_SOURCES += leveldb/util/random.h
75+
leveldb_libleveldb_a_SOURCES += leveldb/util/posix_logger.h
76+
leveldb_libleveldb_a_SOURCES += leveldb/util/hash.h
77+
leveldb_libleveldb_a_SOURCES += leveldb/util/histogram.h
78+
leveldb_libleveldb_a_SOURCES += leveldb/util/coding.h
79+
leveldb_libleveldb_a_SOURCES += leveldb/util/testutil.h
80+
leveldb_libleveldb_a_SOURCES += leveldb/util/mutexlock.h
81+
leveldb_libleveldb_a_SOURCES += leveldb/util/logging.h
82+
leveldb_libleveldb_a_SOURCES += leveldb/util/testharness.h
83+
2984
leveldb_libleveldb_a_SOURCES += leveldb/db/builder.cc
3085
leveldb_libleveldb_a_SOURCES += leveldb/db/c.cc
3186
leveldb_libleveldb_a_SOURCES += leveldb/db/dbformat.cc
@@ -76,3 +131,4 @@ endif
76131
leveldb_libmemenv_a_CPPFLAGS = $(leveldb_libleveldb_a_CPPFLAGS)
77132
leveldb_libmemenv_a_CXXFLAGS = $(leveldb_libleveldb_a_CXXFLAGS)
78133
leveldb_libmemenv_a_SOURCES = leveldb/helpers/memenv/memenv.cc
134+
leveldb_libmemenv_a_SOURCES += leveldb/helpers/memenv/memenv.h

src/Makefile.qt.include

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -390,19 +390,20 @@ QT_QM=$(QT_TS:.ts=.qm)
390390

391391
SECONDARY: $(QT_QM)
392392

393-
qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wallet_a_SOURCES)
393+
$(srcdir)/qt/bitcoinstrings.cpp: $(libbitcoin_server_a_SOURCES) $(libbitcoin_wallet_a_SOURCES)
394394
@test -n $(XGETTEXT) || echo "xgettext is required for updating translations"
395395
$(AM_V_GEN) cd $(srcdir); XGETTEXT=$(XGETTEXT) PACKAGE_NAME="$(PACKAGE_NAME)" COPYRIGHT_HOLDERS="$(COPYRIGHT_HOLDERS)" COPYRIGHT_HOLDERS_SUBSTITUTION="$(COPYRIGHT_HOLDERS_SUBSTITUTION)" $(PYTHON) ../share/qt/extract_strings_qt.py $^
396396

397-
translate: qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM)
397+
translate: $(srcdir)/qt/bitcoinstrings.cpp $(QT_FORMS_UI) $(QT_FORMS_UI) $(BITCOIN_QT_CPP) $(BITCOIN_QT_H) $(BITCOIN_MM)
398398
@test -n $(LUPDATE) || echo "lupdate is required for updating translations"
399-
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts qt/locale/bitcoin_en.ts
399+
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(LUPDATE) $^ -locations relative -no-obsolete -ts $(srcdir)/qt/locale/bitcoin_en.ts
400400

401401
$(QT_QRC_LOCALE_CPP): $(QT_QRC_LOCALE) $(QT_QM)
402402
@test -f $(RCC)
403-
@test -f $(@D)/$(<F) || cp -f $< $(@D)
404-
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin_locale $(@D)/$(<F) | \
403+
@cp -f $< $(@D)/temp_$(<F)
404+
$(AM_V_GEN) QT_SELECT=$(QT_SELECT) $(RCC) -name bitcoin_locale $(@D)/temp_$(<F) | \
405405
$(SED) -e '/^\*\*.*Created:/d' -e '/^\*\*.*by:/d' > $@
406+
@rm $(@D)/temp_$(<F)
406407

407408
$(QT_QRC_CPP): $(QT_QRC) $(QT_FORMS_H) $(RES_ICONS) $(RES_IMAGES) $(RES_MOVIES) $(PROTOBUF_H)
408409
@test -f $(RCC)

src/Makefile.test.include

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ CLEAN_BITCOIN_TEST = test/*.gcda test/*.gcno $(GENERATED_TEST_FILES)
125125

126126
CLEANFILES += $(CLEAN_BITCOIN_TEST)
127127

128+
# This file is problematic for out-of-tree builds if it exists.
129+
DISTCLEANFILES += test/buildenv.pyc
130+
128131
bitcoin_test: $(TEST_BINARY)
129132

130133
bitcoin_test_check: $(TEST_BINARY) FORCE

0 commit comments

Comments
 (0)