tool/depot: make DEPOT_TOOL_DIR customizable

By replacing the formerly hard-coded $(GENODE_DIR)/tool/depot/ by the
variable DEPOT_TOOL_DIR, the depot tools can be hosted outside the
Genode source tree, i.e., as part of the Goa tool.
This commit is contained in:
Norman Feske 2022-05-17 14:17:01 +02:00 committed by Christian Helmuth
parent 19b6f88c33
commit b081988e66
5 changed files with 26 additions and 17 deletions

View File

@ -22,8 +22,10 @@ endef
export GENODE_DIR := $(realpath $(dir $(MAKEFILE_LIST))/../..)
include $(GENODE_DIR)/tool/depot/mk/front_end.inc
include $(GENODE_DIR)/tool/depot/mk/categorize_args.inc
DEPOT_TOOL_DIR ?= $(GENODE_DIR)/tool/depot
include $(DEPOT_TOOL_DIR)/mk/front_end.inc
include $(DEPOT_TOOL_DIR)/mk/categorize_args.inc
#
@ -42,7 +44,7 @@ pkg_src_archives = $(call _pkg_archives_of_type,src,$1)
pkg_raw_archives = $(call _pkg_archives_of_type,raw,$1)
pkg_pkg_archives = $(call _pkg_archives_of_type,pkg,$1)
include $(GENODE_DIR)/tool/depot/mk/dependencies.inc
include $(DEPOT_TOOL_DIR)/mk/dependencies.inc
#

View File

@ -18,15 +18,16 @@ endef
export GENODE_DIR := $(realpath $(dir $(MAKEFILE_LIST))/../..)
PUBLIC_DIR ?= $(GENODE_DIR)/public
PUBLIC_DIR ?= $(GENODE_DIR)/public
DEPOT_TOOL_DIR ?= $(GENODE_DIR)/tool/depot
include $(GENODE_DIR)/tool/depot/mk/front_end.inc
include $(DEPOT_TOOL_DIR)/mk/front_end.inc
# sanitize arguments
ARGS := $(subst ..,__,$(MAKECMDGOALS))
DEPENDENCIES_CMD = $(GENODE_DIR)/tool/depot/dependencies $(ARGS)
DOWNLOAD_CMD = $(GENODE_DIR)/tool/depot/mk/downloader VERBOSE=$(VERBOSE)
DEPENDENCIES_CMD = $(DEPOT_TOOL_DIR)/dependencies $(ARGS)
DOWNLOAD_CMD = $(DEPOT_TOOL_DIR)/mk/downloader VERBOSE=$(VERBOSE)
.PHONY: download
download:

View File

@ -8,9 +8,10 @@
export GENODE_DIR := $(realpath $(dir $(MAKEFILE_LIST))/../../..)
REMOTE_DIR ?= $(GENODE_DIR)/remote
PUBLIC_DIR ?= $(GENODE_DIR)/public
DEPOT_DIR ?= $(GENODE_DIR)/depot
REMOTE_DIR ?= $(GENODE_DIR)/remote
PUBLIC_DIR ?= $(GENODE_DIR)/public
DEPOT_DIR ?= $(GENODE_DIR)/depot
DEPOT_TOOL_DIR ?= $(GENODE_DIR)/tool/depot
define HELP_MESSAGE
@ -22,7 +23,7 @@ define HELP_MESSAGE
endef
include $(GENODE_DIR)/tool/depot/mk/front_end.inc
include $(DEPOT_TOOL_DIR)/mk/front_end.inc
TARGETS := $(addprefix $(DEPOT_DIR)/,$(MAKECMDGOALS))
@ -37,7 +38,7 @@ TARGETS := $(addprefix $(DEPOT_DIR)/,$(MAKECMDGOALS))
ARCHIVES := $(MAKECMDGOALS)
include $(GENODE_DIR)/tool/depot/mk/gpg.inc
include $(DEPOT_TOOL_DIR)/mk/gpg.inc
$(DEPOT_DIR)/% : $(PUBLIC_DIR)/%.tar.xz $(PUBLIC_DIR)/%.tar.xz.sig
$(VERBOSE)pubkey_file=$(call pubkey_path,$*); \

View File

@ -5,7 +5,9 @@
TARGET := $(firstword $(sort $(MAKECMDGOALS)))
.PHONY: $(TARGET)
include $(GENODE_DIR)/tool/depot/mk/common.inc
DEPOT_TOOL_DIR ?= $(GENODE_DIR)/tool/depot
include $(DEPOT_TOOL_DIR)/mk/common.inc
# list of all repositories located at '<genode-dir>/repos/'
REPOSITORIES ?= $(shell find $(GENODE_DIR)/repos -follow -mindepth 1 -maxdepth 1 -type d)

View File

@ -28,11 +28,12 @@ endef
export GENODE_DIR := $(realpath $(dir $(MAKEFILE_LIST))/../..)
PUBLIC_DIR ?= $(GENODE_DIR)/public
PUBLIC_DIR ?= $(GENODE_DIR)/public
DEPOT_TOOL_DIR ?= $(GENODE_DIR)/tool/depot
XZ_THREADS ?= 1
include $(GENODE_DIR)/tool/depot/mk/front_end.inc
include $(DEPOT_TOOL_DIR)/mk/front_end.inc
#
@ -40,7 +41,9 @@ include $(GENODE_DIR)/tool/depot/mk/front_end.inc
#
ifneq ($(MAKECMDGOALS),)
DEPENDENCIES_CMD := $(GENODE_DIR)/tool/depot/dependencies DEPOT_DIR="$(DEPOT_DIR)" $(MAKECMDGOALS)
DEPENDENCIES_CMD := $(DEPOT_TOOL_DIR)/dependencies DEPOT_DIR="$(DEPOT_DIR)" \
DEPOT_TOOL_DIR="$(DEPOT_TOOL_DIR)" \
$(MAKECMDGOALS)
DEPENDENCIES_RESULT := $(shell $(DEPENDENCIES_CMD) 2> /dev/null || true)
endif
@ -85,7 +88,7 @@ index_missing_error:
# Generate compressed and signed archives and index files
#
include $(GENODE_DIR)/tool/depot/mk/gpg.inc
include $(DEPOT_TOOL_DIR)/mk/gpg.inc
MISSING_PUBKEY_FILES := $(sort \
$(foreach A,$(ARCHIVES),\