File: Makefile

package info (click to toggle)
rust-prometheus 0.13.4-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 816 kB
  • sloc: makefile: 25
file content (33 lines) | stat: -rw-r--r-- 888 bytes parent folder | download | duplicates (3)
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
27
28
29
30
31
32
33
.PHONY: all build test dev bench format clean examples gen_proto

ENABLE_FEATURES ?= default

all: format build test examples

build:
	cargo build --features="${ENABLE_FEATURES}"

test:
	cargo test --features="${ENABLE_FEATURES}" -- --nocapture

dev: format test

bench: format
	cargo bench --features=${ENABLE_FEATURES} -- --nocapture

format:
	@cargo fmt --all -- --check >/dev/null || cargo fmt --all

clean:
	cargo clean

examples:
	cargo build --example example_embed
	cargo build --example example_hyper
	cargo build --features="push" --example example_push
	cargo build --features="process" --example example_process_collector

gen_proto:
	@ which protoc >/dev/null || { echo "Please install protoc first"; exit 1; }
	@ which protoc-gen-rust >/dev/null || { echo "Please install protobuf rust plugin, cargo install protobuf"; exit 1; }
	protoc --rust_out proto proto/metrics.proto