Skip to content

Commit

Permalink
refactor(packaging): explicit make output
Browse files Browse the repository at this point in the history
Shows exactly what is going on.

Also fixes a minor issue of not cleaning `./docs/*.7.gz`
  • Loading branch information
murlakatamenka committed Mar 12, 2024
1 parent 596f25b commit 8ad062d
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -37,7 +39,7 @@ check:

clean:
@cargo clean
@rm -f ./docs/*.1.gz
@rm -fv ./docs/*.gz

setup:
@rustup install stable
Expand Down

0 comments on commit 8ad062d

Please sign in to comment.