Skip to content

Commit 65295cb

Browse files
authored
Merge pull request #2283 from slingamn/makefile
refactor makefile to label individual targets phony
2 parents f918e28 + f0b1f34 commit 65295cb

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.PHONY: all install build release capdefs test smoke gofmt irctest
2-
31
GIT_COMMIT := $(shell git rev-parse HEAD 2> /dev/null)
42
GIT_TAG := $(shell git tag --points-at HEAD 2> /dev/null | head -n 1)
53

@@ -9,33 +7,42 @@ export CGO_ENABLED ?= 0
97

108
capdef_file = ./irc/caps/defs.go
119

10+
.PHONY: all
1211
all: build
1312

13+
.PHONY: install
1414
install:
1515
go install -v -ldflags "-X main.commit=$(GIT_COMMIT) -X main.version=$(GIT_TAG)"
1616

17+
.PHONY: build
1718
build:
1819
go build -v -ldflags "-X main.commit=$(GIT_COMMIT) -X main.version=$(GIT_TAG)"
1920

21+
.PHONY: release
2022
release:
2123
goreleaser --skip=publish --clean
2224

25+
.PHONY: capdefs
2326
capdefs:
2427
python3 ./gencapdefs.py > ${capdef_file}
2528

29+
.PHONY: test
2630
test:
2731
python3 ./gencapdefs.py | diff - ${capdef_file}
2832
go test ./...
2933
go vet ./...
3034
./.check-gofmt.sh
3135

36+
.PHONY: smoke
3237
smoke: install
3338
ergo mkcerts --conf ./default.yaml || true
3439
ergo run --conf ./default.yaml --smoke
3540

41+
.PHONY: gofmt
3642
gofmt:
3743
./.check-gofmt.sh --fix
3844

45+
.PHONY: irctest
3946
irctest: install
4047
git submodule update --init
4148
cd irctest && make ergo

0 commit comments

Comments
 (0)