committed by
Christian Helmuth
parent
a4b543bc80
commit
3e95a42fae
@@ -94,9 +94,8 @@ endif
|
||||
#
|
||||
|
||||
# determine binary-archive path within the depot
|
||||
_api_subdir = $(addsuffix /,$(call file_content,$(call api_file,$(call src_of_bin,$1))))
|
||||
_dst_bin_spec_path = $(call archive_user,$1)/bin/$(call bin_archive_spec,$1)/
|
||||
dst_archive_path = $(call _dst_bin_spec_path,$1)$(call _api_subdir,$1)$(call bin_archive_recipe,$1)
|
||||
dst_archive_path = $(call _dst_bin_spec_path,$1)$(call bin_archive_recipe,$1)
|
||||
|
||||
BUILD_MK_FILE := $(DEPOT_DIR)/var/build.mk
|
||||
|
||||
|
||||
@@ -102,20 +102,10 @@ endif
|
||||
|
||||
|
||||
#
|
||||
# Look for src/api to determine whether to build a library or a target.
|
||||
# If building a library, concatenate archive dir as <apihash>/<srchash>.
|
||||
# Otherwise use <srchash> has archive dir.
|
||||
# Define build-directory location
|
||||
#
|
||||
|
||||
API_FILE := $(wildcard $(addsuffix /api,$(SRC_DIR)))
|
||||
|
||||
ifneq ($(API_FILE),)
|
||||
API := $(call file_content,$(API_FILE))
|
||||
DEPOT_ARCHIVE_DIR := $(DEPOT_BIN_DIR)/$(SPEC)/$(API)/$(VERSIONED_ARCHIVE)
|
||||
else
|
||||
DEPOT_ARCHIVE_DIR := $(DEPOT_BIN_DIR)/$(SPEC)/$(VERSIONED_ARCHIVE)
|
||||
endif
|
||||
|
||||
DEPOT_ARCHIVE_DIR := $(DEPOT_BIN_DIR)/$(SPEC)/$(VERSIONED_ARCHIVE)
|
||||
DEPOT_ARCHIVE_BUILD_DIR := $(addsuffix .build,$(DEPOT_ARCHIVE_DIR))
|
||||
|
||||
|
||||
@@ -128,7 +118,10 @@ DEPOT_ARCHIVE_BUILD_DIR := $(addsuffix .build,$(DEPOT_ARCHIVE_DIR))
|
||||
#
|
||||
|
||||
# if building a library, always incorporate the API implemented by the library
|
||||
USED_APIS += $(API)
|
||||
API_FILE := $(wildcard $(addsuffix /api,$(SRC_DIR)))
|
||||
ifneq ($(API_FILE),)
|
||||
USED_APIS += $(call file_content,$(API_FILE))
|
||||
endif
|
||||
|
||||
# incorporate all APIs used by the source archive
|
||||
USED_APIS_FILE := $(SRC_DIR)/used_apis
|
||||
|
||||
@@ -60,18 +60,13 @@ ARCHIVES(pkg) := $(sort ${ARCHIVES(pkg)} $(foreach P,${ARCHIVES(binpkg)},\
|
||||
# Extend ARCHIVES(bin) with binary-package dependencies
|
||||
#
|
||||
|
||||
_lib_api = $(call file_content,$(call api_file,$1))
|
||||
|
||||
# return binary-archive path for user ($1), architecture ($2), api ($3), and recipe ($4)
|
||||
_bin_for_src_api = $(if $3,$1/bin/$2/$3/$4,$1/bin/$2/$4)
|
||||
|
||||
# return non-empty result if source archive exists
|
||||
_src_exists = $(wildcard $(dir $(call used_apis_file,$1)))
|
||||
|
||||
# return binary-archive path for architecture $1 and source archive $2
|
||||
_bin_for_src = $(strip \
|
||||
$(if $(call _src_exists,$2),\
|
||||
$(call _bin_for_src_api,$(call archive_user,$2),$1,$(call _lib_api,$2),$(call archive_recipe,$2))))
|
||||
$(call archive_user,$2)/bin/$1/$(call archive_recipe,$2)))
|
||||
|
||||
# return list of binary archives contained in a binary package
|
||||
_binpkg_bin_archives = $(foreach S,$(call _binpkg_src_archives,$1),\
|
||||
@@ -118,6 +113,8 @@ ARCHIVES(api) := $(sort ${ARCHIVES(api)} $(foreach A,${ARCHIVES(src)},\
|
||||
# Extend ARCHIVES(api) with the APIs implemented by library ARCHIVES(src)
|
||||
#
|
||||
|
||||
_lib_api = $(call file_content,$(call api_file,$1))
|
||||
|
||||
_lib_api_archive = $(addprefix $(call archive_user,$1)/api/,$(call _lib_api,$1))
|
||||
|
||||
ARCHIVES(api) := $(sort ${ARCHIVES(api)} $(foreach A,${ARCHIVES(src)},\
|
||||
|
||||
Reference in New Issue
Block a user