Skip to content

Commit f67b5dc

Browse files
committed
Merge #20734: build: Make platform-specific targets available for proper platform builds only
3d31abb build: Make Windows-specific targets available for Windows builds only (Hennadii Stepanov) 92990e2 build: Make macOS-specific targets available for macOS builds only (Hennadii Stepanov) Pull request description: On master (f1dbf92) it is possible to point `make` to macOS and Windows specific targets even the build system is configured to build for Linux platforms: ``` $ make Bitcoin-Core.dmg ... $ make bitcoin-21.99.0-win64-setup ... ``` Such behavior makes no sense, and it is confused. Fixed in this PR. ACKs for top commit: fanquake: ACK 3d31abb - tested that nonsensical targets are no longer available. i.e Tree-SHA512: bbd8450bf98fbccb0b828df2f753ed0dbbd203defa2f58ce21390ee2ea183c95d8ff585d62d52be870dbf0158e2bb0fbd47eda026b80174ee6fd617473f5ac03
2 parents 7ce7ce5 + 3d31abb commit f67b5dc

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Makefile.am

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ COVERAGE_INFO = $(COV_TOOL_WRAPPER) baseline.info \
7878
dist-hook:
7979
-$(GIT) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR) -C $(top_distdir) -xf -
8080

81+
if TARGET_WINDOWS
8182
$(BITCOIN_WIN_INSTALLER): all-recursive
8283
$(MKDIR_P) $(top_builddir)/release
8384
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(BITCOIND_BIN) $(top_builddir)/release
@@ -90,6 +91,10 @@ $(BITCOIN_WIN_INSTALLER): all-recursive
9091
echo error: could not build $@
9192
@echo built $@
9293

94+
deploy: $(BITCOIN_WIN_INSTALLER)
95+
endif
96+
97+
if TARGET_DARWIN
9398
$(OSX_APP)/Contents/PkgInfo:
9499
$(MKDIR_P) $(@D)
95100
@echo "APPL????" > $@
@@ -133,7 +138,7 @@ $(OSX_BACKGROUND_IMAGE): $(OSX_BACKGROUND_IMAGE).png $(OSX_BACKGROUND_IMAGE)@2x.
133138
tiffutil -cathidpicheck $^ -out $@
134139

135140
deploydir: $(OSX_DMG)
136-
else
141+
else !BUILD_DARWIN
137142
APP_DIST_DIR=$(top_builddir)/dist
138143
APP_DIST_EXTRAS=$(APP_DIST_DIR)/.background/$(OSX_BACKGROUND_IMAGE) $(APP_DIST_DIR)/.DS_Store $(APP_DIST_DIR)/Applications
139144

@@ -160,15 +165,11 @@ $(APP_DIST_DIR)/$(OSX_APP)/Contents/MacOS/Bitcoin-Qt: $(OSX_APP_BUILT) $(OSX_PAC
160165
INSTALLNAMETOOL=$(INSTALLNAMETOOL) OTOOL=$(OTOOL) STRIP=$(STRIP) $(PYTHON) $(OSX_DEPLOY_SCRIPT) $(OSX_APP) $(OSX_VOLNAME) -translations-dir=$(QT_TRANSLATION_DIR)
161166

162167
deploydir: $(APP_DIST_EXTRAS)
163-
endif
168+
endif !BUILD_DARWIN
164169

165-
if TARGET_DARWIN
166170
appbundle: $(OSX_APP_BUILT)
167171
deploy: $(OSX_DMG)
168172
endif
169-
if TARGET_WINDOWS
170-
deploy: $(BITCOIN_WIN_INSTALLER)
171-
endif
172173

173174
$(BITCOIN_QT_BIN): FORCE
174175
$(MAKE) -C src qt/$(@F)

0 commit comments

Comments
 (0)