mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-17 23:44:17 +08:00
respect REPO_OFFLINE when building the cookbook tool
REPO_OFFLINE=1 was already passing --offline to recipe cargo builds but the cargo build for the repo binary itself was still hitting crates.io. This fixes that and adds a cargo-fetch target to pre-populate the cache while online.
This commit is contained in:
parent
700101f28b
commit
4ed0a556ae
@ -35,11 +35,16 @@ else
|
||||
$(REPO_BIN) fetch installer redoxfs
|
||||
endif
|
||||
|
||||
CARGO_OFFLINE_FLAG=
|
||||
ifeq ($(REPO_OFFLINE),1)
|
||||
CARGO_OFFLINE_FLAG=--offline
|
||||
endif
|
||||
|
||||
$(FSTOOLS_TAG): $(CONTAINER_TAG)
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(HOST_CARGO) build --manifest-path Cargo.toml --release --locked
|
||||
$(HOST_CARGO) build --manifest-path Cargo.toml --release --locked $(CARGO_OFFLINE_FLAG)
|
||||
mkdir -p $(@D)
|
||||
touch $@
|
||||
endif
|
||||
|
||||
@ -39,6 +39,14 @@ else
|
||||
$(REPO_BIN) fetch $(COOKBOOK_OPTS) --with-package-deps
|
||||
endif
|
||||
|
||||
# Fetch Cargo dependencies for the cookbook tool (needed for REPO_OFFLINE=1 builds)
|
||||
cargo-fetch: FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
$(PODMAN_RUN) make $@
|
||||
else
|
||||
$(HOST_CARGO) fetch --manifest-path Cargo.toml --locked
|
||||
endif
|
||||
|
||||
# Find recipe for one or more targets separated by comma
|
||||
find.%: $(FSTOOLS_TAG) FORCE
|
||||
ifeq ($(PODMAN_BUILD),1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user