mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-16 04:24:56 +02:00
Makefile: Add install target
This commit is contained in:
parent
8b927ed366
commit
1294537734
1 changed files with 12 additions and 3 deletions
15
Makefile
15
Makefile
|
|
@ -1,12 +1,21 @@
|
|||
|
||||
GO=go
|
||||
PROGRAM=build/thalos-server
|
||||
PROGRAM=thalos-server
|
||||
PREFIX=/usr/local
|
||||
BINDIR=$(PREFIX)/bin
|
||||
CFGDIR=$(PREFIX)/etc
|
||||
|
||||
.PHONY: $(PROGRAM) test
|
||||
.PHONY: build test
|
||||
|
||||
$(PROGRAM) :
|
||||
build: build/$(PROGRAM)
|
||||
|
||||
build/$(PROGRAM) :
|
||||
$(GO) build -o $@ cmd/main/main.go
|
||||
|
||||
install: build
|
||||
install -D build/$(PROGRAM) $(DESTDIR)$(BINDIR)/$(PROGRAM)
|
||||
install -m 644 -D config.example.yml $(DESTDIR)$(CFGDIR)/thalos/config.yml
|
||||
|
||||
test:
|
||||
$(GO) test -v ./...
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue