~gbmor/clinte

fdf322b2d2e93428768e9207f1c62a866e7e8ef4 — Ben Morrison 1 year, 2 months ago cf3b662
updated makefile to use printf instead of echo
1 files changed, 17 insertions(+), 33 deletions(-)

M Makefile
M Makefile => Makefile +17 -33
@@ 3,61 3,45 @@ _INSTDIR=$(PREFIX)
BINDIR?=$(_INSTDIR)/bin
DBDIR?=$(_INSTDIR)/clinte

clinte: src/main.rs src/db.rs src/logging.rs
	@echo
	@echo Building clinte. This may take a minute or two.
clinte:
	@printf "\n%s\n" "Building clinte. This may take a minute or two."
	cargo build --release
	@echo
	@echo ...Done\!
	@printf "\n%s\n" "...Done!"

.PHONY: clean
clean:
	@echo
	@echo Cleaning build cache of artifacts...
	@printf "\n%s\n" "Cleaning build cache of artifacts..."
	cargo clean
	@echo
	@echo ...Done\!
	@printf "\n%s\n" "...Done!"

.PHONY: update
update:
	@echo
	@echo Updating from upstream repository...
	@echo
	@printf "\n%s\n" "Updating from upstream repository..."
	git pull --rebase
	@echo
	@echo ...Done\!
	@printf "\n%s\n" "...Done!"

.PHONY: install
install:
	@echo
	@echo Installing clinte...
	@echo
	@echo Creating directories...
	@printf "\n%s\n" "Installing clinte..."
	@printf "\n%s\n" "Creating directories..."
	mkdir -p $(BINDIR)
	mkdir -p $(DBDIR)
	@echo
	@echo Copying files...
	@printf "\n%s\n" "Copying files..."
	install -m755 target/release/clinte $(BINDIR)
	touch $(DBDIR)/clinte.db
	chmod 666 $(DBDIR)/clinte.db
	@echo
	@echo ...Done!
	chmod 777 $(DBDIR)
	@printf "\n%s\n" "...Done!"

.PHONY: test
test:
	@echo
	@echo Running tests...
	@echo
	@printf "\n%s\n" "Running tests..."
	cargo test
	@echo
	@echo ...Done!
	@printf "\n%s\n" "...Done!"

.PHONY: uninstall
uninstall:
	@echo
	@echo Uninstalling clinte...
	@echo
	@echo Removing files
	@printf "\n%s\n" "Uninstalling clinte..."
	rm -f $(BINDIR)/clinte
	@echo
	@echo ...Done\!
	@printf "\n%s\n" "...Done!"
	@printf "%s %s\n" "The database is still intact in" $(DBDIR)