summarylogtreecommitdiffstats
path: root/makefile.patch
blob: d3d1824ba1fba47b09b0f8ec5a8c1136a9fc05f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff --git a/Makefile b/Makefile
index 100c00f..7a7fd38 100644
--- a/Makefile
+++ b/Makefile
@@ -227,3 +227,19 @@ $(patsubst %,build/%.go,$(BENCHMARKS)): build/%.go: %.py $(COMPILER)
 $(BENCHMARK_BINS): build/benchmarks/%_benchmark: build/benchmarks/%.go $(RUNTIME) $(STDLIB)
 	@mkdir -p $(@D)
 	@go build -o $@ $<
+
+# ------------------------------------------------------------------------------
+# Installation
+# ------------------------------------------------------------------------------
+
+install:
+	install -d $(DESTDIR)/usr/lib/go
+	install -d $(DESTDIR)/usr/bin
+	install -Dm755 tools/benchcmp $(DESTDIR)/usr/bin/benchcmp
+	install -Dm755 tools/coverparse $(DESTDIR)/usr/bin/coverparse
+	install -Dm755 tools/diffrange $(DESTDIR)/usr/bin/diffrange
+	install -Dm755 tools/grumpc $(DESTDIR)/usr/bin/grumpc
+	install -Dm755 tools/grumprun $(DESTDIR)/usr/bin/grumprun
+	cp -rv --no-preserve=ownership build/bin build/lib $(DESTDIR)/usr/
+	cp -rv --no-preserve=ownership build/pkg build/src $(DESTDIR)/usr/lib/go/
+