Skip to content

Commit

Permalink
Merge bitcoin#11435: build: Make "make clean" remove all files create…
Browse files Browse the repository at this point in the history
…d when running "make check"

f35d033 build: Make "make clean" remove all files created when running "make check" (practicalswift)

Pull request description:

  Make `make clean` remove all files created when running `make check`. More specifically: remove also `obj/build.h` and `bench/data/block413567.raw.h` as part of `make clean`.

  Before this patch:

  ```bash
  $ git clone https://github.com/bitcoin/bitcoin.git
  $ cd bitcoin/
  $ ./autogen.sh
  $ ./configure
  $ cp -r ../bitcoin ../bitcoin-before-make
  $ make check
  $ make clean
  $ cp -r ../bitcoin ../bitcoin-after-make-and-make-clean
  $ cd ..
  $ diff -rq bitcoin-before-make/ bitcoin-after-make-and-make-clean/ | grep -E "^Only in bitcoin-after-make-and-make-clean/" | grep -v dirstamp
  Only in bitcoin-after-make-and-make-clean/src/bench/data: block413567.raw.h
  Only in bitcoin-after-make-and-make-clean/src/obj: build.h
  $
  ```

  After this patch:

  ```bash
  $ git clone https://github.com/bitcoin/bitcoin.git
  $ cd bitcoin/
  $ ./autogen.sh
  $ ./configure
  $ cp -r ../bitcoin ../bitcoin-before-make
  $ make check
  $ make clean
  $ cp -r ../bitcoin ../bitcoin-after-make-and-make-clean
  $ cd ..
  $ diff -rq bitcoin-before-make/ bitcoin-after-make-and-make-clean/ | grep -E "^Only in bitcoin-after-make-and-make-clean/" | grep -v dirstamp
  $
  ```

Tree-SHA512: 953e8423485ffd415f0ade6abe0b4c407454f67c332140ef019d89db425bb4a831327b3f634b8d69b17325dcfc6e3ac72dc2ba1ce5462158eecc3c05645e93ba
  • Loading branch information
laanwj authored and PastaPastaPasta committed Dec 22, 2019
1 parent 6626da4 commit 1f2a92a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -668,11 +668,10 @@ CLEANFILES += univalue/*.gcda univalue/*.gcno
CLEANFILES += wallet/*.gcda wallet/*.gcno
CLEANFILES += wallet/test/*.gcda wallet/test/*.gcno
CLEANFILES += zmq/*.gcda zmq/*.gcno
CLEANFILES += obj/build.h

IMMER_DIST = immer

DISTCLEANFILES = obj/build.h

EXTRA_DIST = $(CTAES_DIST)
EXTRA_DIST += $(IMMER_DIST)

Expand Down
9 changes: 5 additions & 4 deletions src/Makefile.bench.include
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ bin_PROGRAMS += bench/bench_dash
BENCH_SRCDIR = bench
BENCH_BINARY = bench/bench_dash$(EXEEXT)

RAW_TEST_FILES = \
RAW_BENCH_FILES = \
bench/data/block813851.raw
GENERATED_TEST_FILES = $(RAW_TEST_FILES:.raw=.raw.h)
GENERATED_BENCH_FILES = $(RAW_BENCH_FILES:.raw=.raw.h)

bench_bench_dash_SOURCES = \
$(RAW_BENCH_FILES) \
bench/bench_dash.cpp \
bench/bench.cpp \
bench/bench.h \
Expand All @@ -36,7 +37,7 @@ bench_bench_dash_SOURCES = \
bench/prevector.cpp \
bench/string_cast.cpp

nodist_bench_bench_dash_SOURCES = $(GENERATED_TEST_FILES)
nodist_bench_bench_dash_SOURCES = $(GENERATED_BENCH_FILES)

bench_bench_dash_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(EVENT_CLFAGS) $(EVENT_PTHREADS_CFLAGS) -I$(builddir)/bench/
bench_bench_dash_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
Expand Down Expand Up @@ -64,7 +65,7 @@ endif
bench_bench_dash_LDADD += $(BACKTRACE_LIB) $(BOOST_LIBS) $(BDB_LIBS) $(SSL_LIBS) $(CRYPTO_LIBS) $(MINIUPNPC_LIBS) $(EVENT_PTHREADS_LIBS) $(EVENT_LIBS) $(BLS_LIBS)
bench_bench_dash_LDFLAGS = $(LDFLAGS_WRAP_EXCEPTIONS) $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS)

CLEAN_BITCOIN_BENCH = bench/*.gcda bench/*.gcno $(GENERATED_TEST_FILES)
CLEAN_BITCOIN_BENCH = bench/*.gcda bench/*.gcno $(GENERATED_BENCH_FILES)

CLEANFILES += $(CLEAN_BITCOIN_BENCH)

Expand Down

0 comments on commit 1f2a92a

Please sign in to comment.