-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 753 Bytes
/
Copy pathMakefile
File metadata and controls
40 lines (30 loc) · 753 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
37
38
39
40
# Makefile for Persephone (Purr) - Git-like VCS in Go
BINARY_NAME=purr
MAIN_PATH=./cmd/purr
GO=go
.PHONY: all build install dev clean test fmt help
# Default target
all: build
## help: Show available commands
help:
@echo "Available targets:"
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
## build: Build the binary
build:
$(GO) build -o $(BINARY_NAME) $(MAIN_PATH)
## install: Install to GOPATH/bin
install:
$(GO) install $(MAIN_PATH)
## dev: Run without building (e.g., make dev ARGS="init")
dev:
$(GO) run $(MAIN_PATH) $(ARGS)
## clean: Remove build artifacts
clean:
$(GO) clean
rm -f $(BINARY_NAME) $(BINARY_NAME).exe
## test: Run tests
test:
$(GO) test -v ./...
## fmt: Format code
fmt:
$(GO) fmt ./...