Skip to content

Commit b4e74f9

Browse files
author
MarcoFalke
committed
Merge bitcoin#15446: Improve depends debuggability
6d44c5e depends: Add commands for each package for each stage (Carl Dong) 80f0e05 depends: Preprocessing doesn't care about deps (Carl Dong) Pull request description: Adds make targets for each package for each stage, e.g. ```sh make zeromq_configured ``` ACKs for commit 6d44c5: MarcoFalke: ACK 6d44c5e (Haven't looked at the code changes, but adding this feature makes sense) ryanofsky: ACK 6d44c5e Tree-SHA512: f1ac0aecfd2372aed09ca63603e2634552cb3f6ff9d610f958e2a66952d7d9e870b4c32b7d996886879e6d3016532272e8b1a10c13ed7b31009c6c96f786db9f
2 parents 327d274 + 6d44c5e commit b4e74f9

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

depends/Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -192,4 +192,6 @@ download-win:
192192
@$(MAKE) -s HOST=x86_64-w64-mingw32 download-one
193193
download: download-osx download-linux download-win
194194

195+
$(foreach package,$(all_packages),$(eval $(call ext_add_stages,$(package))))
196+
195197
.PHONY: install cached clean clean-all download-one download-osx download-linux download-win download check-packages check-sources

depends/funcs.mk

+10-2
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,13 @@ $($(1)_extracted): | $($(1)_fetched)
171171
$(AT)mkdir -p $$(@D)
172172
$(AT)cd $$(@D); $(call $(1)_extract_cmds,$(1))
173173
$(AT)touch $$@
174-
$($(1)_preprocessed): | $($(1)_dependencies) $($(1)_extracted)
174+
$($(1)_preprocessed): | $($(1)_extracted)
175175
$(AT)echo Preprocessing $(1)...
176176
$(AT)mkdir -p $$(@D) $($(1)_patch_dir)
177177
$(AT)$(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;)
178178
$(AT)cd $$(@D); $(call $(1)_preprocess_cmds, $(1))
179179
$(AT)touch $$@
180-
$($(1)_configured): | $($(1)_preprocessed)
180+
$($(1)_configured): | $($(1)_dependencies) $($(1)_preprocessed)
181181
$(AT)echo Configuring $(1)...
182182
$(AT)rm -rf $(host_prefix); mkdir -p $(host_prefix)/lib; cd $(host_prefix); $(foreach package,$($(1)_all_dependencies), tar --no-same-owner -xf $($(package)_cached); )
183183
$(AT)mkdir -p $$(@D)
@@ -214,6 +214,14 @@ $(1): | $($(1)_cached_checksum)
214214

215215
endef
216216

217+
stages = fetched extracted preprocessed configured built staged postprocessed cached cached_checksum
218+
219+
define ext_add_stages
220+
$(foreach stage,$(stages),
221+
$(1)_$(stage): $($(1)_$(stage))
222+
.PHONY: $(1)_$(stage))
223+
endef
224+
217225
# These functions create the build targets for each package. They must be
218226
# broken down into small steps so that each part is done for all packages
219227
# before moving on to the next step. Otherwise, a package's info

0 commit comments

Comments
 (0)