/ lsf / Makefile
swadhinbiswas Feat:Moved to Rust · 2/15/2026
a330027
36 lines · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
SHELL := /usr/bin/env bash
PREFIX ?= /usr/local
BINDIR := $(PREFIX)/bin

.PHONY: help release clean install uninstall remove

help:
	@echo "Available targets:"
	@echo "  install                Build and install lsf to $(BINDIR)"
	@echo "  uninstall/remove       Remove lsf from $(BINDIR)"
	@echo "  release VERSION=x.y.z  Build release artifacts into dist/"
	@echo "  clean                  Remove dist/ and target/"

install:
	cargo build --release
	install -Dm755 target/release/lsf "$(DESTDIR)$(BINDIR)/lsf"
	@echo "lsf installed to $(BINDIR)/lsf"

uninstall:
	rm -f "$(DESTDIR)$(BINDIR)/lsf"
	@echo "lsf removed from $(BINDIR)/lsf"

remove: uninstall

release:
	@if [[ -z "$$VERSION" ]]; then \
		echo "ERROR: VERSION is required. Usage: make release VERSION=x.y.z"; \
		exit 1; \
	fi
	@chmod +x tools/release.sh
	@./tools/release.sh "$$VERSION"

clean:
	rm -rf dist
	cargo clean