]> Git Repo - VerusCoin.git/blame - Makefile.am
build: hook up qt translations for static osx packaging
[VerusCoin.git] / Makefile.am
CommitLineData
35b8af92
CF
1ACLOCAL_AMFLAGS = -I src/m4
2SUBDIRS = src
77a055d0 3.PHONY: deploy FORCE
35b8af92
CF
4
5GZIP_ENV="-9n"
6
7BITCOIND_BIN=$(top_builddir)/src/bitcoind$(EXEEXT)
8BITCOIN_QT_BIN=$(top_builddir)/src/qt/bitcoin-qt$(EXEEXT)
39db27ca 9BITCOIN_CLI_BIN=$(top_builddir)/src/bitcoin-cli$(EXEEXT)
2f87b38e 10BITCOIN_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
35b8af92
CF
11
12OSX_APP=Bitcoin-Qt.app
13OSX_DMG=Bitcoin-Qt.dmg
14OSX_DEPLOY_SCRIPT=$(top_srcdir)/contrib/macdeploy/macdeployqtplus
15OSX_FANCY_PLIST=$(top_srcdir)/contrib/macdeploy/fancy.plist
16OSX_INSTALLER_ICONS=$(top_srcdir)/src/qt/res/icons/bitcoin.icns
17OSX_PLIST=$(top_srcdir)/share/qt/Info.plist #not installed
01e5327c 18OSX_QT_TRANSLATIONS = da,de,es,hu,ru,uk,zh_CN,zh_TW
35b8af92 19
de21e8f1 20DIST_DOCS = $(wildcard doc/*.md) $(wildcard doc/release-notes/*.md)
6c980c7d 21
35b8af92
CF
22WINDOWS_PACKAGING = $(top_srcdir)/share/pixmaps/bitcoin.ico \
23 $(top_srcdir)/share/pixmaps/nsis-header.bmp \
24 $(top_srcdir)/share/pixmaps/nsis-wizard.bmp \
25 $(top_srcdir)/doc/README_windows.txt
26
27OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \
01e5327c
CF
28 $(top_srcdir)/contrib/macdeploy/background.png \
29 $(top_srcdir)/contrib/macdeploy/DS_Store
35b8af92
CF
30
31COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \
32 leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \
33 baseline_filtered.info block_test_filtered.info \
34 leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info
35
36dist-hook:
37 -$(MAKE) -C $(top_distdir)/src/leveldb clean
55668266 38 -$(MAKE) -C $(top_distdir)/src/secp256k1 distclean
35b8af92
CF
39 -$(GIT) archive --format=tar HEAD -- src/version.cpp | $(AMTAR) -C $(top_distdir) -xf -
40
41distcheck-hook:
42 $(MKDIR_P) $(top_distdir)/_build/src/leveldb
43 cp -rf $(top_srcdir)/src/leveldb/* $(top_distdir)/_build/src/leveldb/
44 -$(MAKE) -C $(top_distdir)/_build/src/leveldb clean
45
46distcleancheck:
47 @:
48
39db27ca 49$(BITCOIN_WIN_INSTALLER): $(BITCOIND_BIN) $(BITCOIN_QT_BIN) $(BITCOIN_CLI_BIN)
35b8af92 50 $(MKDIR_P) $(top_builddir)/release
c4a10dbb
CF
51 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
52 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_QT_BIN) $(top_builddir)/release
53 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIN_CLI_BIN) $(top_builddir)/release
35b8af92
CF
54 @test -f $(MAKENSIS) && $(MAKENSIS) $(top_builddir)/share/setup.nsi || \
55 echo error: could not build $@
56
77a055d0
CF
57$(if $(findstring src/,$(MAKECMDGOALS)),$(MAKECMDGOALS), none): FORCE
58 $(MAKE) -C src $(patsubst src/%,%,$@)
35b8af92
CF
59
60$(OSX_APP)/Contents/PkgInfo:
61 $(MKDIR_P) $(@D)
62 @echo "APPL????" > $@
63
64$(OSX_APP)/Contents/Resources/empty.lproj:
65 $(MKDIR_P) $(@D)
66 @touch $@
67
68$(OSX_APP)/Contents/Info.plist: $(OSX_PLIST)
69 $(MKDIR_P) $(@D)
76cee181 70 $(INSTALL_DATA) $< $@
35b8af92
CF
71
72$(OSX_APP)/Contents/Resources/bitcoin.icns: $(OSX_INSTALLER_ICONS)
73 $(MKDIR_P) $(@D)
76cee181 74 $(INSTALL_DATA) $< $@
35b8af92
CF
75
76$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(BITCOIN_QT_BIN)
77 $(MKDIR_P) $(@D)
c4a10dbb 78 STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $< $@
35b8af92
CF
79
80OSX_APP_BUILT=$(OSX_APP)/Contents/PkgInfo $(OSX_APP)/Contents/Resources/empty.lproj \
81 $(OSX_APP)/Contents/Resources/bitcoin.icns $(OSX_APP)/Contents/Info.plist \
82 $(OSX_APP)/Contents/MacOS/Bitcoin-Qt
83
01e5327c 84if BUILD_DARWIN
35b8af92 85$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
206a7f9d 86 $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -dmg -fancy $(OSX_FANCY_PLIST) -verbose 2
35b8af92 87
01e5327c
CF
88else
89$(OSX_DMG): $(OSX_APP_BUILT) $(OSX_PACKAGING)
206a7f9d 90 INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) -add-qt-tr $(OSX_QT_TRANSLATIONS) -translations-dir=$(QT_TRANSLATION_DIR) -verbose 2
01e5327c
CF
91 $(MKDIR_P) dist/.background
92 $(INSTALL) contrib/macdeploy/background.png dist/.background
93 $(INSTALL) contrib/macdeploy/DS_Store dist/.DS_Store
94 cd dist; $(LN_S) /Applications Applications
95 $(GENISOIMAGE) -no-cache-inodes -l -probe -V "Bitcoin-Qt" -no-pad -r -apple -o $@ dist
96endif
35b8af92
CF
97
98if TARGET_DARWIN
31127f31 99appbundle: $(OSX_APP_BUILT)
35b8af92
CF
100deploy: $(OSX_DMG)
101endif
102if TARGET_WINDOWS
103deploy: $(BITCOIN_WIN_INSTALLER)
104endif
105
106if USE_LCOV
107
108baseline.info:
109 $(LCOV) -c -i -d $(abs_builddir)/src -o $@
110
111baseline_filtered.info: baseline.info
112 $(LCOV) -r $< "/usr/include/*" -o $@
113
114leveldb_baseline.info: baseline_filtered.info
115 $(LCOV) -c -i -d $(abs_builddir)/src/leveldb -b $(abs_builddir)/src/leveldb -o $@
116
117leveldb_baseline_filtered.info: leveldb_baseline.info
118 $(LCOV) -r $< "/usr/include/*" -o $@
119
120baseline_filtered_combined.info: leveldb_baseline_filtered.info baseline_filtered.info
121 $(LCOV) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@
122
123test_bitcoin.info: baseline_filtered_combined.info
124 $(MAKE) -C src/ check
125 $(LCOV) -c -d $(abs_builddir)/src -t test_bitcoin -o $@
126 $(LCOV) -z -d $(abs_builddir)/src
127 $(LCOV) -z -d $(abs_builddir)/src/leveldb
128
129test_bitcoin_filtered.info: test_bitcoin.info
130 $(LCOV) -r $< "/usr/include/*" -o $@
131
132block_test.info: test_bitcoin_filtered.info
95fa14da 133 $(MKDIR_P) qa/tmp
f1f72e53 134 -@TIMEOUT=15 qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool 0
35b8af92
CF
135 $(LCOV) -c -d $(abs_builddir)/src --t BitcoinJBlockTest -o $@
136 $(LCOV) -z -d $(abs_builddir)/src
137 $(LCOV) -z -d $(abs_builddir)/src/leveldb
138
139block_test_filtered.info: block_test.info
140 $(LCOV) -r $< "/usr/include/*" -o $@
141
142test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info
143 $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@
144
145total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info block_test_filtered.info
146 $(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
147
148test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info
149 $(GENHTML) -s $< -o $(@D)
150 @touch $@
151
152total.coverage/.dirstamp: total_coverage.info
153 $(GENHTML) -s $< -o $(@D)
154 @touch $@
155
156cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp
157
158endif
159
160if USE_COMPARISON_TOOL
161check-local:
95fa14da 162 $(MKDIR_P) qa/tmp
a67eef17 163 @qa/pull-tester/run-bitcoind-for-test.sh $(JAVA) -jar $(JAVA_COMPARISON_TOOL) qa/tmp/compTool $(COMPARISON_TOOL_REORG_TESTS) 2>&1
35b8af92
CF
164endif
165
cb4bdd18 166EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/pull-tester.sh qa/rpc-tests $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING)
35b8af92 167
13d3adb6 168CLEANFILES = $(OSX_DMG) $(BITCOIN_WIN_INSTALLER)
35b8af92 169
31127f31 170.INTERMEDIATE: $(COVERAGE_INFO)
35b8af92
CF
171
172clean-local:
13d3adb6 173 rm -rf test_bitcoin.coverage/ total.coverage/ $(OSX_APP)
This page took 0.096145 seconds and 4 git commands to generate.