Changeset View
Changeset View
Standalone View
Standalone View
depends/funcs.mk
Show First 20 Lines • Show All 164 Lines • ▼ Show 20 Lines | $($(1)_fetched): | ||||
$(AT)cd $$(@D); $(call $(1)_fetch_cmds,$(1)) | $(AT)cd $$(@D); $(call $(1)_fetch_cmds,$(1)) | ||||
$(AT)cd $($(1)_source_dir); $(foreach source,$($(1)_all_sources),$(build_SHA256SUM) $(source) >> $$(@);) | $(AT)cd $($(1)_source_dir); $(foreach source,$($(1)_all_sources),$(build_SHA256SUM) $(source) >> $$(@);) | ||||
$(AT)touch $$@ | $(AT)touch $$@ | ||||
$($(1)_extracted): | $($(1)_fetched) | $($(1)_extracted): | $($(1)_fetched) | ||||
$(AT)echo Extracting $(1)... | $(AT)echo Extracting $(1)... | ||||
$(AT)mkdir -p $$(@D) | $(AT)mkdir -p $$(@D) | ||||
$(AT)cd $$(@D); $(call $(1)_extract_cmds,$(1)) | $(AT)cd $$(@D); $(call $(1)_extract_cmds,$(1)) | ||||
$(AT)touch $$@ | $(AT)touch $$@ | ||||
$($(1)_preprocessed): | $($(1)_dependencies) $($(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)_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 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) | ||||
Show All 20 Lines | $($(1)_cached_checksum): $($(1)_cached) | ||||
$(AT)cd $$(@D); $(build_SHA256SUM) $$(<F) > $$(@) | $(AT)cd $$(@D); $(build_SHA256SUM) $$(<F) > $$(@) | ||||
.PHONY: $(1) | .PHONY: $(1) | ||||
$(1): | $($(1)_cached_checksum) | $(1): | $($(1)_cached_checksum) | ||||
.SECONDARY: $($(1)_cached) $($(1)_postprocessed) $($(1)_staged) $($(1)_built) $($(1)_configured) $($(1)_preprocessed) $($(1)_extracted) $($(1)_fetched) | .SECONDARY: $($(1)_cached) $($(1)_postprocessed) $($(1)_staged) $($(1)_built) $($(1)_configured) $($(1)_preprocessed) $($(1)_extracted) $($(1)_fetched) | ||||
endef | endef | ||||
stages = fetched extracted preprocessed configured built staged postprocessed cached cached_checksum | |||||
define ext_add_stages | |||||
$(foreach stage,$(stages), | |||||
$(1)_$(stage): $($(1)_$(stage)) | |||||
.PHONY: $(1)_$(stage)) | |||||
endef | |||||
# These functions create the build targets for each package. They must be | # These functions create the build targets for each package. They must be | ||||
# broken down into small steps so that each part is done for all packages | # broken down into small steps so that each part is done for all packages | ||||
# before moving on to the next step. Otherwise, a package's info | # before moving on to the next step. Otherwise, a package's info | ||||
# (build-id for example) would only be available to another package if it | # (build-id for example) would only be available to another package if it | ||||
# happened to be computed already. | # happened to be computed already. | ||||
#set the type for host/build packages. | #set the type for host/build packages. | ||||
$(foreach native_package,$(native_packages),$(eval $(native_package)_type=build)) | $(foreach native_package,$(native_packages),$(eval $(native_package)_type=build)) | ||||
Show All 22 Lines |