forked from DataDog/go-sqllexer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (37 loc) · 1005 Bytes
/
Makefile
File metadata and controls
46 lines (37 loc) · 1005 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
41
42
43
44
45
46
.PHONY: build clean install test help
# Binary name
BINARY_NAME=sqllexer
# Build directory
BUILD_DIR=bin
# Default target
all: build
# Build the binary
build:
@echo "Building $(BINARY_NAME)..."
@mkdir -p $(BUILD_DIR)
go build -o $(BUILD_DIR)/$(BINARY_NAME) ./cmd/sqllexer
# Install the binary to GOPATH/bin
install: build
@echo "Installing $(BINARY_NAME)..."
cp $(BUILD_DIR)/$(BINARY_NAME) $(shell go env GOPATH)/bin/
# Run tests
test:
@echo "Running tests..."
go test -v ./...
# Run benchmarks
bench:
@echo "Running benchmarks..."
go test -bench=. -benchmem ./...
# Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
rm -rf $(BUILD_DIR)
# Show help
help:
@echo "Available targets:"
@echo " build - Build the binary for current platform"
@echo " install - Install binary to GOPATH/bin"
@echo " test - Run tests"
@echo " bench - Run benchmarks"
@echo " clean - Clean build artifacts"
@echo " help - Show this help message"