From 8ad062d3350cdce6bfc7389fd9973c25712b81e3 Mon Sep 17 00:00:00 2001 From: "Sergey A." Date: Wed, 13 Mar 2024 01:22:31 +0300 Subject: [PATCH] refactor(packaging): explicit make output Shows exactly what is going on. Also fixes a minor issue of not cleaning `./docs/*.7.gz` --- Makefile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 86bb9e84..17b070ef 100644 --- a/Makefile +++ b/Makefile @@ -14,21 +14,23 @@ run: @cargo run docs: -install: build + @echo -n "Generating docs with scdoc and gzip ... " @for scd in ./docs/*.scd; do \ scdoc < "$$scd" | gzip --best > "$${scd%.scd}.gz" & \ done + @echo "done!" install: build docs - @mkdir -p $(TARGET_DIR) - @cp $(SOURCE_DIR)/$(BINARY) $(TARGET_DIR) + @mkdir -pv $(TARGET_DIR) + @cp -v $(SOURCE_DIR)/$(BINARY) $(TARGET_DIR) @chmod +x $(TARGET_DIR)/$(BINARY) - @find ./docs -type f -iname "*.1.gz" -exec cp {} $(MAN1_DIR) \; - @find ./docs -type f -iname "*.7.gz" -exec cp {} $(MAN7_DIR) \; + @cp -v ./docs/wayshot.1.gz $(MAN1_DIR) + @cp -v ./docs/wayshot.7.gz $(MAN7_DIR) + uninstall: - @rm -f $(TARGET_DIR)/$(BINARY) - @rm -f /usr/share/man/**/wayshot.* + @rm -fv $(TARGET_DIR)/$(BINARY) + @rm -fv /usr/share/man/**/wayshot.* check: @cargo fmt @@ -37,7 +39,7 @@ check: clean: @cargo clean - @rm -f ./docs/*.1.gz + @rm -fv ./docs/*.gz setup: @rustup install stable