Skip to content

Commit

Permalink
Merge pull request #61 from jl777/master
Browse files Browse the repository at this point in the history
master update
  • Loading branch information
ca333 authored Dec 10, 2017
2 parents 30188de + 65cddb3 commit 6755ad9
Show file tree
Hide file tree
Showing 89 changed files with 5,351 additions and 1,964 deletions.
217 changes: 123 additions & 94 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ BITCOIND_BIN=$(top_builddir)/src/zcashd$(EXEEXT)
BITCOIN_CLI_BIN=$(top_builddir)/src/zcash-cli$(EXEEXT)
BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)

##OSX_APP=Bitcoin-Qt.app
##OSX_DMG=Bitcoin-Core.dmg
##OSX_BACKGROUND_IMAGE=background.tiff
##OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
##OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
##OSX_BASE_LPROJ_DIR=$(top_srcdir)/contrib/macdeploy/Base.lproj/InfoPlist.strings
##OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
##OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed
##OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW
if TARGET_DARWIN
OSX_APP=Bitcoin-Qt.app
OSX_DMG=Bitcoin-Core.dmg
OSX_BACKGROUND_IMAGE=background.tiff
OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
OSX_BASE_LPROJ_DIR=$(top_srcdir)/contrib/macdeploy/Base.lproj/InfoPlist.strings
OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed
OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW
endif

DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)

Expand All @@ -35,14 +37,15 @@ WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
$(top_srcdir)/share/pixmaps/nsis-header.bmp \
$(top_srcdir)/share/pixmaps/nsis-wizard.bmp

##OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) $(OSX_BASE_LPROJ_DIR) \
## $(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_IMAGE) \
## $(top_srcdir)/contrib/macdeploy/DS_Store \
## $(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \
## $(top_srcdir)/contrib/macdeploy/detached-sig-create.sh

if TARGET_DARWIN
OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) $(OSX_BASE_LPROJ_DIR) \
$(top_srcdir)/contrib/macdeploy/$(OSX_BACKGROUND_IMAGE) \
$(top_srcdir)/contrib/macdeploy/DS_Store \
$(top_srcdir)/contrib/macdeploy/detached-sig-apply.sh \
$(top_srcdir)/contrib/macdeploy/detached-sig-create.sh
endif

if BUILD_DARWIN
if TARGET_DARWIN
COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
baseline_filtered.info block_test_filtered.info \
Expand All @@ -53,7 +56,7 @@ COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
baseline_filtered.info block_test_filtered.info \
leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info \
zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info
#zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info
endif

dist-hook:
Expand All @@ -80,68 +83,73 @@ $(BITCOIN_WIN_INSTALLER): all-recursive
$(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
$(MAKE) -C src $(patsubst src/%,%,$@)

##$(OSX_APP)/Contents/PkgInfo:
## $(MKDIR_P) $(@D)
## @echo "APPL????" > $@
##
##$(OSX_APP)/Contents/Resources/empty.lproj:
## $(MKDIR_P) $(@D)
## @touch $@
##
##$(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
## $(MKDIR_P) $(@D)
## $(INSTALL_DATA) $< $@
##
##$(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
## $(MKDIR_P) $(@D)
## $(INSTALL_DATA) $< $@
##
##$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
## $(MKDIR_P) $(@D)
## STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@
##
##$(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings: $(OSX_BASE_LPROJ_DIR)
## $(MKDIR_P) $(@D)
## $(INSTALL_DATA) $< $@
##
##OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
## $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
## $(OSX_APP)/Contents/MacOS/Bitcoin-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings
##
##if BUILD_DARWIN
##$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
## $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2
##
##deploydir: $(OSX_DMG)
##else
##APP_DIST_DIR=$(top_builddir)/dist
##APP_DIST_EXTRAS=$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE) $(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/Applications
##
##$(APP_DIST_DIR)/Applications:
## @rm -f $@
## @cd $(@D); $(LN_S) /Applications $(@F)
##
##$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt
##
##$(OSX_DMG): $(APP_DIST_EXTRAS)
## $(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Core" -no-pad -r -apple -o $@ dist
##
##$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_IMAGE)
## $(MKDIR_P) $(@D)
## $(INSTALL) $< $@
##$(APP_DIST_DIR)/.DS_Store: contrib/macdeploy/DS_Store
## $(INSTALL) $< $@
##
##$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
## INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -translations-dir=$(QT_TRANSLATION_DIR) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2
##
##deploydir: $(APP_DIST_EXTRAS)
##endif
##
##if TARGET_DARWIN
##appbundle: $(OSX_APP_BUILT)
##deploy: $(OSX_DMG)
##endif
if TARGET_DARWIN

$(OSX_APP)/Contents/PkgInfo:
$(MKDIR_P) $(@D)
@echo "APPL????" > $@

$(OSX_APP)/Contents/Resources/empty.lproj:
$(MKDIR_P) $(@D)
@touch $@

$(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
$(MKDIR_P) $(@D)
$(INSTALL_DATA) $< $@

$(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
$(MKDIR_P) $(@D)
$(INSTALL_DATA) $< $@

$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
$(MKDIR_P) $(@D)
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@

$(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings: $(OSX_BASE_LPROJ_DIR)
$(MKDIR_P) $(@D)
$(INSTALL_DATA) $< $@

OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
$(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
$(OSX_APP)/Contents/MacOS/Bitcoin-Qt $(OSX_APP)/Contents/Resources/Base.lproj/InfoPlist.strings

endif

if BUILD_DARWIN
$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
$(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2
deploydir: $(OSX_DMG)
else
APP_DIST_DIR=$(top_builddir)/dist
APP_DIST_EXTRAS=$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE) $(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/Applications
endif

if TARGET_DARWIN
$(APP_DIST_DIR)/Applications:
@rm -f $@
@cd $(@D); $(LN_S) /Applications $(@F)

$(APP_DIST_EXTRAS): $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt

$(OSX_DMG): $(APP_DIST_EXTRAS)
$(GENISOIMAGE) -no-cache-inodes -D -l -probe -V "Bitcoin-Core" -no-pad -r -apple -o $@ dist

$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE): contrib/macdeploy/$(OSX_BACKGROUND_IMAGE)
$(MKDIR_P) $(@D)
$(INSTALL) $< $@
$(APP_DIST_DIR)/.DS_Store: contrib/macdeploy/DS_Store
$(INSTALL) $< $@

$(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PACKAGING)
INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -translations-dir=$(QT_TRANSLATION_DIR) -add-qt-tr $(OSX_QT_TRANSLATIONS) -verbose 2

deploydir: $(APP_DIST_EXTRAS)
endif

if TARGET_DARWIN
appbundle: $(OSX_APP_BUILT)
deploy: $(OSX_DMG)
endif

if TARGET_WINDOWS
deploy: $(BITCOIN_WIN_INSTALLER)
Expand All @@ -161,10 +169,14 @@ baseline.info:
if BUILD_DARWIN
baseline_filtered.info: baseline.info
$(LCOV) -r $< "/usr/include/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
"$(abs_builddir)/depends/$(BUILD)/include/*.h" \
"$(abs_builddir)/depends/$(BUILD)/include/boost/*" \
"$(abs_builddir)/depends/$(BUILD)/include/gmock/*" \
"$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \
"$(abs_builddir)/src/gtest/*" \
"$(abs_builddir)/src/test/*" \
"$(abs_builddir)/src/wallet/gtest/*" \
"$(abs_builddir)/src/wallet/test/*" \
-o $@
else
baseline_filtered.info: baseline.info
Expand All @@ -186,10 +198,14 @@ leveldb_baseline.info: baseline_filtered.info
if BUILD_DARWIN
leveldb_baseline_filtered.info: leveldb_baseline.info
$(LCOV) -r $< "/usr/include/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
"$(abs_builddir)/depends/$(BUILD)/include/*.h" \
"$(abs_builddir)/depends/$(BUILD)/include/boost/*" \
"$(abs_builddir)/depends/$(BUILD)/include/gmock/*" \
"$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \
"$(abs_builddir)/src/gtest/*" \
"$(abs_builddir)/src/test/*" \
"$(abs_builddir)/src/wallet/gtest/*" \
"$(abs_builddir)/src/wallet/test/*" \
-o $@
else
leveldb_baseline_filtered.info: leveldb_baseline.info
Expand Down Expand Up @@ -217,9 +233,11 @@ test_bitcoin.info: baseline_filtered_combined.info
if BUILD_DARWIN
test_bitcoin_filtered.info: test_bitcoin.info
$(LCOV) -r $< "/usr/include/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
"$(abs_builddir)/depends/$(BUILD)/include/*.h" \
"$(abs_builddir)/depends/$(BUILD)/include/boost/*" \
"$(abs_builddir)/depends/$(BUILD)/include/gmock/*" \
"$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \
"$(abs_builddir)/src/gtest/*" \
"$(abs_builddir)/src/test/*" \
"$(abs_builddir)/src/wallet/gtest/*" \
"$(abs_builddir)/src/wallet/test/*" \
Expand Down Expand Up @@ -248,10 +266,14 @@ block_test.info: test_bitcoin_filtered.info
if BUILD_DARWIN
block_test_filtered.info: block_test.info
$(LCOV) -r $< "/usr/include/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/*.h" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/boost/*" \
"$(abs_builddir)/depends/x86_64-unknown-linux-gnu/include/gmock/*" \
"$(abs_builddir)/depends/$(BUILD)/include/*.h" \
"$(abs_builddir)/depends/$(BUILD)/include/boost/*" \
"$(abs_builddir)/depends/$(BUILD)/include/gmock/*" \
"$(abs_builddir)/depends/$(BUILD)/include/gtest/*" \
"$(abs_builddir)/src/gtest/*" \
"$(abs_builddir)/src/test/*" \
"$(abs_builddir)/src/wallet/gtest/*" \
"$(abs_builddir)/src/wallet/test/*" \
-o $@
else
block_test_filtered.info: block_test.info
Expand All @@ -276,8 +298,8 @@ zcash-gtest_coverage.info: baseline_filtered_combined.info zcash-gtest_filtered.
endif

if BUILD_DARWIN
total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info block_test_filtered.info
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a block_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info zcash-gtest_filtered.info block_test_filtered.info
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a zcash-gtest_filtered.info -a block_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
else
total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info zcash-gtest_filtered.info block_test_filtered.info
$(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a zcash-gtest_filtered.info -a block_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
Expand All @@ -288,12 +310,19 @@ test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
$(GENHTML) -s $< -o $(@D)
@touch $@

if TARGET_DARWIN
zcash-gtest.coverage/.dirstamp: zcash-gtest_coverage.info
$(GENHTML) -s $< -o $(@D)
@touch $@
cov-zcash: zcash-gtest.coverage/.dirstamp
endif

total.coverage/.dirstamp: total_coverage.info
$(GENHTML) -s $< -o $(@D)
@touch $@

if BUILD_DARWIN
cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp
cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp
else
cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp
endif
Expand Down
Loading

0 comments on commit 6755ad9

Please sign in to comment.