Max Mahn

aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMax Mahn <mahn.maxwell@proton.me>2026-05-20 09:23:50 -0400
committerMax Mahn <mahn.maxwell@proton.me>2026-05-20 09:23:50 -0400
commit137e4ed9d74891349de1b0da1e0cf2653ea92c5e (patch)
tree29f913c45c081ec52269362eb2ce7f6f18d09070 /Makefile
initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile37
1 files changed, 37 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..04e10b8
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,37 @@
+## see LICENSE file for licensing information ##
+
+
+INSTALL_DIR = /usr/bin
+SYS_CFG_DIR = /etc
+
+
+
+.PHONY: main install check clean uninstall
+
+NAME = mktree
+
+main : bin/mktree bin/mktree.1.gz
+
+bin/mktree.1.gz : doc/mktree.1
+ @awk -f make.awk $< | gzip -c > $@
+
+bin/mktree : src/main.sh src/args.sh src/util.sh
+ @awk -f make.awk $< > $@
+ @chmod +x $@
+
+install : main
+ cp bin/$(NAME) $(INSTALL_DIR)/
+ cp -r def/* $(SYS_CFG_DIR)/mktree/
+
+check :
+ @mkdir -p src inc res bin
+ @[[ -f src/main.sh ]] && echo "Done: Yup, the main file is there." || echo "Error: Were did the script go?"
+
+clean :
+ @rm -f bin/*
+
+uninstall :
+ rm -f $(INSTALL_DIR)/$(NAME)
+ rm -rf $(SYS_CFG_DIR)/mktree
+
+