Skip to content

Commit 9b35518

Browse files
committed
depends, moveonly: split up int_get_build_id function
Move parts of the int_get_build_id into a new int_get_build_properties function. There is no change in behavior. This just organizes assignments better so some build properties can be used to help compute build ids in the next commit.
1 parent 2d373e2 commit 9b35518

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

depends/funcs.mk

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,23 @@ $(eval $(1)_build_id:=$(shell echo -n "$($(1)_build_id_long)" | $(build_SHA256SU
5454
final_build_id_long+=$($(package)_build_id_long)
5555

5656
#compute package-specific paths
57-
$(1)_build_subdir?=.
58-
$(1)_download_file?=$($(1)_file_name)
59-
$(1)_source_dir:=$(SOURCES_PATH)
60-
$(1)_source:=$$($(1)_source_dir)/$($(1)_file_name)
6157
$(1)_staging_dir=$(base_staging_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)
6258
$(1)_staging_prefix_dir:=$$($(1)_staging_dir)$($($(1)_type)_prefix)
6359
$(1)_extract_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)
64-
$(1)_download_dir:=$(base_download_dir)/$(1)-$($(1)_version)
6560
$(1)_build_dir:=$$($(1)_extract_dir)/$$($(1)_build_subdir)
6661
$(1)_cached_checksum:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz.hash
6762
$(1)_patch_dir:=$(base_build_dir)/$(host)/$(1)/$($(1)_version)-$($(1)_build_id)/.patches-$($(1)_build_id)
68-
$(1)_prefixbin:=$($($(1)_type)_prefix)/bin/
6963
$(1)_cached:=$(BASE_CACHE)/$(host)/$(1)/$(1)-$($(1)_version)-$($(1)_build_id).tar.gz
7064
$(1)_build_log:=$(BASEDIR)/$(1)-$($(1)_version)-$($(1)_build_id).log
65+
endef
66+
67+
define int_get_build_properties
68+
$(1)_build_subdir?=.
69+
$(1)_download_file?=$($(1)_file_name)
70+
$(1)_source_dir:=$(SOURCES_PATH)
71+
$(1)_source:=$$($(1)_source_dir)/$($(1)_file_name)
72+
$(1)_download_dir:=$(base_download_dir)/$(1)-$($(1)_version)
73+
$(1)_prefixbin:=$($($(1)_type)_prefix)/bin/
7174
$(1)_all_sources=$($(1)_file_name) $($(1)_extra_sources)
7275

7376
#stamps
@@ -288,6 +291,9 @@ $(foreach package,$(all_packages),$(eval $(call int_vars,$(package))))
288291
$(foreach native_package,$(native_packages),$(eval include packages/$(native_package).mk))
289292
$(foreach package,$(packages),$(eval include packages/$(package).mk))
290293

294+
#set build properties for included package files
295+
$(foreach package,$(all_packages),$(eval $(call int_get_build_properties,$(package))))
296+
291297
#compute a hash of all files that comprise this package's build recipe
292298
$(foreach package,$(all_packages),$(eval $(call int_get_build_recipe_hash,$(package))))
293299

0 commit comments

Comments
 (0)