make only toolchain-shell interactive, only delete dirs if they exist
This commit is contained in:
parent
a65be367d9
commit
dafafd5d6c
16
Makefile
16
Makefile
|
@ -66,7 +66,7 @@ toolchain: \
|
||||||
# Launch a shell inside the toolchain container
|
# Launch a shell inside the toolchain container
|
||||||
.PHONY: toolchain-shell
|
.PHONY: toolchain-shell
|
||||||
toolchain-shell: toolchain
|
toolchain-shell: toolchain
|
||||||
$(call toolchain,bash --norc)
|
$(call toolchain,bash --norc,--interactive)
|
||||||
|
|
||||||
# Pin all packages in toolchain container to latest versions
|
# Pin all packages in toolchain container to latest versions
|
||||||
.PHONY: toolchain-update
|
.PHONY: toolchain-update
|
||||||
|
@ -74,7 +74,6 @@ toolchain-update:
|
||||||
docker run \
|
docker run \
|
||||||
--rm \
|
--rm \
|
||||||
--tty \
|
--tty \
|
||||||
--interactive \
|
|
||||||
--platform=linux/$(ARCH) \
|
--platform=linux/$(ARCH) \
|
||||||
--env LOCAL_USER=$(UID):$(GID) \
|
--env LOCAL_USER=$(UID):$(GID) \
|
||||||
--volume $(PWD)/$(CONFIG_DIR):/config \
|
--volume $(PWD)/$(CONFIG_DIR):/config \
|
||||||
|
@ -87,9 +86,14 @@ toolchain-update:
|
||||||
|
|
||||||
.PHONY: toolchain-clean
|
.PHONY: toolchain-clean
|
||||||
toolchain-clean:
|
toolchain-clean:
|
||||||
chmod -R u+w $(CACHE_DIR_ROOT)
|
if [ -d "$(CACHE_DIR_ROOT)" ]; then \
|
||||||
rm -rf $(CACHE_DIR_ROOT) $(OUT_DIR)
|
chmod -R u+w $(CACHE_DIR_ROOT); \
|
||||||
docker image rm -f $(IMAGE)
|
rm -rf $(CACHE_DIR_ROOT); \
|
||||||
|
fi
|
||||||
|
if [ -d "$(OUT_DIR)" ]; then \
|
||||||
|
rm -rf $(OUT_DIR); \
|
||||||
|
fi
|
||||||
|
docker image rm -f $(IMAGE) || :
|
||||||
|
|
||||||
.PHONY: reproduce
|
.PHONY: reproduce
|
||||||
reproduce: toolchain-clean
|
reproduce: toolchain-clean
|
||||||
|
@ -212,7 +216,7 @@ define toolchain
|
||||||
docker run \
|
docker run \
|
||||||
--rm \
|
--rm \
|
||||||
--tty \
|
--tty \
|
||||||
--interactive \
|
$(2) \
|
||||||
--env UID=$(UID) \
|
--env UID=$(UID) \
|
||||||
--env GID=$(GID) \
|
--env GID=$(GID) \
|
||||||
--platform=linux/$(ARCH) \
|
--platform=linux/$(ARCH) \
|
||||||
|
|
Loading…
Reference in New Issue