diff options
| author | Rory Dudley | 2025-02-03 16:58:06 -0700 | 
|---|---|---|
| committer | Rory Dudley | 2025-02-03 22:35:51 -0700 | 
| commit | 78e37a7fdaaea81f8d9c93170c2adbf9515f6f8c (patch) | |
| tree | e602a4951c3ebf7b0ae8c4c35fe302708b913e6a /Makefile | |
| parent | bfbd5b7e5d2dcf6fde1c44b475ea12f09bc23fdc (diff) | |
| download | dwarvish-main.tar.gz | |
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.
Signed-off-by: Rory Dudley <[email protected]>
Notes
Notes:
    Tested on Linux and OpenBSD (i.e. GNU make and BSD make).
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 29 | 
1 files changed, 29 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0e5dfbb --- /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  | 
