From 137e4ed9d74891349de1b0da1e0cf2653ea92c5e Mon Sep 17 00:00:00 2001 From: Max Mahn Date: Wed, 20 May 2026 09:23:50 -0400 Subject: initial commit --- Makefile | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 + + -- cgit v1.2.3