66.1.2
by Jeroen Vermeulen
Document. |
1 |
# Build, and run tests.
|
66.1.4
by Jeroen Vermeulen
Review suggestions from Gavin. |
2 |
check: examples |
122.4.1
by Julian Edwards
Make 'make check' verbose enough to show actual tests flying by |
3 |
go test -gocheck.v=true ./... |
66.1.4
by Jeroen Vermeulen
Review suggestions from Gavin. |
4 |
|
146.1.6
by Julian Edwards
tweaks and improvements from Gavin's review |
5 |
debug-test: |
146.1.1
by Julian Edwards
Add a debug build target to Makefile |
6 |
go test -c -gcflags "-N -l" |
7 |
gdb gwacl.test |
|
8 |
$(RM) gwacl.test |
|
9 |
||
102.1.1
by Gavin Panella
The examples depend on all the non-test source code. |
10 |
all_source := $(shell find . -name '*.go' ! -name '*_test.go') |
11 |
||
90.2.2
by Gavin Panella
Change the example scripts to be called 'run'. |
12 |
example_source := $(wildcard example/*/run.go) |
66.1.4
by Jeroen Vermeulen
Review suggestions from Gavin. |
13 |
example_binaries := $(patsubst %.go,%,$(example_source)) |
66.1.1
by Jeroen Vermeulen
Add Makefile with 2 main targets: check and clean. |
14 |
|
66.1.2
by Jeroen Vermeulen
Document. |
15 |
# Clean up binaries.
|
66.1.1
by Jeroen Vermeulen
Add Makefile with 2 main targets: check and clean. |
16 |
clean: |
66.1.4
by Jeroen Vermeulen
Review suggestions from Gavin. |
17 |
$(RM) $(example_binaries) |
66.1.1
by Jeroen Vermeulen
Add Makefile with 2 main targets: check and clean. |
18 |
|
66.1.3
by Jeroen Vermeulen
Add 'format' target. |
19 |
# Reformat the source files to match our layout standards.
|
93.1.1
by Jeroen Vermeulen
Always run 'simplify' as part of 'format'. Subject to further improvement, but not urgent. |
20 |
# This includes gofmt's "simplify" option to streamline the source code.
|
66.1.3
by Jeroen Vermeulen
Add 'format' target. |
21 |
format: |
72.1.2
by Jeroen Vermeulen
Add 'simplify' target. |
22 |
./utilities/format -s |
23 |
||
66.1.2
by Jeroen Vermeulen
Document. |
24 |
# Build the examples (we have no tests for them).
|
66.1.4
by Jeroen Vermeulen
Review suggestions from Gavin. |
25 |
examples: $(example_binaries) |
26 |
||
102.1.1
by Gavin Panella
The examples depend on all the non-test source code. |
27 |
%: %.go $(all_source) |
66.1.4
by Jeroen Vermeulen
Review suggestions from Gavin. |
28 |
go build -o $@ $<
|
29 |
||
146.1.1
by Julian Edwards
Add a debug build target to Makefile |
30 |
.PHONY: check clean format examples debug_check |