From 1538e9e0c0140b985b7bad957da5c9978c352cf6 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 30 Nov 2020 19:13:08 +0000 Subject: [PATCH] fancier clean target Signed-off-by: Ian Jackson --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a98abccc..bc628b6f 100644 --- a/Makefile +++ b/Makefile @@ -57,6 +57,13 @@ BUNDLE_SOURCES_CMD ?= $(NAILING_CARGO) --- $(BUNDLE_SOURCES) USVG_CMD ?= $(NAILING_CARGO_JUST_RUN) $(USVG) WASM_PACK_CMD ?= $(NAILING_CARGO) --linkfarm=git --- $(WASM_PACK) +clean-nailing: + $(NAILING_CARGO_JUST_RUN) \ + sh -c 'cd "$1"; find -mindepth 1 -maxdepth 1 -print0 | xargs -0r rm -rf --' \ + $(abspath $(BUILD_SUBDIR)/$(notdir $(PWD))) + +else +clean-nailing: endif # Cargo.nail BUILD_SUBDIR ?= ../Build @@ -266,7 +273,7 @@ deploy: stamp/cargo.deploy-build bundled-sources assets libraries #---------- clean ---------- -clean: +clean: clean-nailing rm -f templates/script.js library/*/*.usvg stamp/* rm -rf target $(NAILING_CARGO_JUST_RUN) rm -rf target -- 2.30.2