File: Makefile

package info (click to toggle)
golang-github-juju-gomaasapi 2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 908 kB
  • sloc: makefile: 17
file content (26 lines) | stat: -rw-r--r-- 539 bytes parent folder | download | duplicates (2)
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
# Build, and run tests.
check: examples
	go test ./...

example_source := $(wildcard example/*.go)
example_binaries := $(patsubst %.go,%,$(example_source))

# Clean up binaries.
clean:
	$(RM) $(example_binaries)

# Reformat the source files to match our layout standards.
format:
	gofmt -w .

# Invoke gofmt's "simplify" option to streamline the source code.
simplify:
	gofmt -w -s .

# Build the examples (we have no tests for them).
examples: $(example_binaries)

%: %.go
	go build -o $@ $<

.PHONY: check clean format examples simplify