[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Add a Makefile
[Thread Prev] | [Thread Next]
[Date Prev] | [Date Next]
- Subject: [PATCH] Add a Makefile
- From: Rory Dudley <rory@xxxxxxx>
- Reply-to: rory@xxxxxxx
- Date: Mon, 3 Feb 2025 16:58:06 -0700
- To: lore@xxxxxxxxxxxx
Most of the commands are simply wrappers around the cargo equivalent. However, it does include commands to install and uninstall a release build of the program. --- Makefile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..65e1879 --- /dev/null +++ b/Makefile @@ -0,0 +1,29 @@ +OS = $$( uname -s ) + +all: build + +release: + cargo build --release + +build: + cargo build + +test: + cargo test + +run: + cargo run + +install: release + $$( case $(OS) in \ + ( Linux ) cat dist/etc/dwvshrc dist/etc/linuxrc > /etc/dwvshrc ;; \ + ( * ) cat dist/etc/dwvshrc > /etc/dwvshrc ;; \ + esac ) + cp -f target/release/dwvsh /usr/bin; + +uninstall: + rm -f /usr/bin/dwvsh + rm -f /etc/dwvshrc + +clean: + cargo clean -- cheers!~ Rory
Archive administrator: postmaster AT dwarvish DOT org