Skip to content

Commit 5a2ed87

Browse files
committed
Make examples buildable from make
1 parent 316b327 commit 5a2ed87

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ BENCHMARK_FILTER ?= .
4444
FULL_GOPATH = $(GOPATH)/src/github.com/prometheus/client_golang
4545
FULL_GOPATH_BASE = $(GOPATH)/src/github.com/prometheus
4646

47-
MAKE_ARTIFACTS = search_index $(BUILD_PATH)
47+
MAKE_ARTIFACTS = search_index $(BUILD_PATH) example_random example_simple
4848

4949
all: test
5050

@@ -70,6 +70,12 @@ build: source_path dependencies
7070
dependencies: source_path $(GOCC)
7171
$(GO) get -d -t ./...
7272

73+
example_random: source_path dependencies examples/random/main.go
74+
$(GO) build -o example_random examples/random/main.go
75+
76+
example_simple: source_path dependencies examples/simple/main.go
77+
$(GO) build -o example_simple examples/simple/main.go
78+
7379
test: build
7480
$(GO) test ./...
7581

0 commit comments

Comments
 (0)