Changeset View
Changeset View
Standalone View
Standalone View
depends/funcs.mk
Show First 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | |||||
$(1)_built=$$($(1)_build_dir)/.stamp_built | $(1)_built=$$($(1)_build_dir)/.stamp_built | ||||
$(1)_configured=$$($(1)_build_dir)/.stamp_configured | $(1)_configured=$$($(1)_build_dir)/.stamp_configured | ||||
$(1)_staged=$$($(1)_staging_dir)/.stamp_staged | $(1)_staged=$$($(1)_staging_dir)/.stamp_staged | ||||
$(1)_postprocessed=$$($(1)_staging_prefix_dir)/.stamp_postprocessed | $(1)_postprocessed=$$($(1)_staging_prefix_dir)/.stamp_postprocessed | ||||
$(1)_download_path_fixed=$(subst :,\:,$$($(1)_download_path)) | $(1)_download_path_fixed=$(subst :,\:,$$($(1)_download_path)) | ||||
#default commands | #default commands | ||||
# The default behavior for tar will try to set ownership when running as uid 0 and may not succeed, --no-same-owner disables this behavior | |||||
$(1)_fetch_cmds ?= $(call fetch_file,$(1),$(subst \:,:,$$($(1)_download_path_fixed)),$$($(1)_download_file),$($(1)_file_name),$($(1)_sha256_hash)) | $(1)_fetch_cmds ?= $(call fetch_file,$(1),$(subst \:,:,$$($(1)_download_path_fixed)),$$($(1)_download_file),$($(1)_file_name),$($(1)_sha256_hash)) | ||||
$(1)_extract_cmds ?= mkdir -p $$($(1)_extract_dir) && echo "$$($(1)_sha256_hash) $$($(1)_source)" > $$($(1)_extract_dir)/.$$($(1)_file_name).hash && $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$$($(1)_file_name).hash && tar --strip-components=1 -xf $$($(1)_source) | $(1)_extract_cmds ?= mkdir -p $$($(1)_extract_dir) && echo "$$($(1)_sha256_hash) $$($(1)_source)" > $$($(1)_extract_dir)/.$$($(1)_file_name).hash && $(build_SHA256SUM) -c $$($(1)_extract_dir)/.$$($(1)_file_name).hash && tar --no-same-owner --strip-components=1 -xf $$($(1)_source) | ||||
$(1)_preprocess_cmds ?= | $(1)_preprocess_cmds ?= | ||||
$(1)_build_cmds ?= | $(1)_build_cmds ?= | ||||
$(1)_config_cmds ?= | $(1)_config_cmds ?= | ||||
$(1)_stage_cmds ?= | $(1)_stage_cmds ?= | ||||
$(1)_set_vars ?= | $(1)_set_vars ?= | ||||
all_sources+=$$($(1)_fetched) | all_sources+=$$($(1)_fetched) | ||||
▲ Show 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | |||||
$($(1)_preprocessed): | $($(1)_extracted) | $($(1)_preprocessed): | $($(1)_extracted) | ||||
$(AT)echo Preprocessing $(1)... | $(AT)echo Preprocessing $(1)... | ||||
$(AT)mkdir -p $$(@D) $($(1)_patch_dir) | $(AT)mkdir -p $$(@D) $($(1)_patch_dir) | ||||
$(AT)$(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;) | $(AT)$(foreach patch,$($(1)_patches),cd $(PATCHES_PATH)/$(1); cp $(patch) $($(1)_patch_dir) ;) | ||||
$(AT)cd $$(@D); $(call $(1)_preprocess_cmds, $(1)) | $(AT)cd $$(@D); $(call $(1)_preprocess_cmds, $(1)) | ||||
$(AT)touch $$@ | $(AT)touch $$@ | ||||
$($(1)_configured): | $($(1)_dependencies) $($(1)_preprocessed) | $($(1)_configured): | $($(1)_dependencies) $($(1)_preprocessed) | ||||
$(AT)echo Configuring $(1)... | $(AT)echo Configuring $(1)... | ||||
$(AT)rm -rf $(host_prefix); mkdir -p $(host_prefix)/lib; cd $(host_prefix); $(foreach package,$($(1)_all_dependencies), tar xf $($(package)_cached); ) | $(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); ) | ||||
$(AT)mkdir -p $$(@D) | $(AT)mkdir -p $$(@D) | ||||
$(AT)+cd $$(@D); $($(1)_config_env) $(call $(1)_config_cmds, $(1)) | $(AT)+cd $$(@D); $($(1)_config_env) $(call $(1)_config_cmds, $(1)) | ||||
$(AT)touch $$@ | $(AT)touch $$@ | ||||
$($(1)_built): | $($(1)_configured) | $($(1)_built): | $($(1)_configured) | ||||
$(AT)echo Building $(1)... | $(AT)echo Building $(1)... | ||||
$(AT)mkdir -p $$(@D) | $(AT)mkdir -p $$(@D) | ||||
$(AT)+cd $$(@D); $($(1)_build_env) $(call $(1)_build_cmds, $(1)) | $(AT)+cd $$(@D); $($(1)_build_env) $(call $(1)_build_cmds, $(1)) | ||||
$(AT)touch $$@ | $(AT)touch $$@ | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |