summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2020-05-26 21:19:40 -0400
committerBen Morrison <ben@gbmor.dev>2020-05-26 23:53:45 -0400
commitfdf322b2d2e93428768e9207f1c62a866e7e8ef4 (patch)
treeea37f260880cc72523157fac14f804c9a9090720 /Makefile
parentcf3b6628ce4deb429fad407829b425a7377e2b5d (diff)
downloadclinte-fdf322b2d2e93428768e9207f1c62a866e7e8ef4.tar.gz
updated makefile to use printf instead of echo
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile50
1 files changed, 17 insertions, 33 deletions
diff --git a/Makefile b/Makefile
index 367552f..14fce88 100644
--- a/Makefile
+++ b/Makefile
@@ -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)