File: Makefile

package info (click to toggle)
golang-github-juju-mutex 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 148 kB
  • sloc: makefile: 18
file content (20 lines) | stat: -rw-r--r-- 571 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
PROJECT := github.com/juju/mutex/v2

.PHONY: check-licence check-go check

check: check-licence check-go
	go test $(PROJECT)/...

check-licence:
	@(fgrep -rl "Licensed under the LGPLv3" .;\
		fgrep -rl "Code generated by MockGen. DO NOT EDIT." .;\
		find . -name "*.go") | sed -e 's,\./,,' | sort | uniq -u | \
		xargs -I {} echo FAIL: licence missed: {}

check-go:
	$(eval GOFMT := $(strip $(shell gofmt -l .| sed -e "s/^/ /g")))
	@(if [ x$(GOFMT) != x"" ]; then \
		echo go fmt is sad: $(GOFMT); \
		exit 1; \
	fi )
	@(go vet -all -composites=false -copylocks=false .)