mirror of https://github.com/restic/restic.git
commit
6bab4a8eda
12
Makefile
12
Makefile
|
@ -14,19 +14,21 @@ SFTP_PATH ?= /usr/lib/ssh/sftp-server
|
||||||
CMDS=$(patsubst cmd/%,%,$(wildcard cmd/*))
|
CMDS=$(patsubst cmd/%,%,$(wildcard cmd/*))
|
||||||
CMDS_DEBUG=$(patsubst %,%.debug,$(CMDS))
|
CMDS_DEBUG=$(patsubst %,%.debug,$(CMDS))
|
||||||
|
|
||||||
|
SOURCE=$(wildcard *.go) $(wildcard */*.go) $(wildcard */*/*.go)
|
||||||
|
|
||||||
export GOPATH GOX_OS
|
export GOPATH GOX_OS
|
||||||
|
|
||||||
all: restic
|
all: restic
|
||||||
|
|
||||||
.gopath:
|
.gopath:
|
||||||
mkdir -p .gopath/src/github.com/restic
|
mkdir -p .gopath/src/github.com/restic
|
||||||
ln -sf ../../../.. .gopath/src/github.com/restic/restic
|
ln -snf ../../../.. .gopath/src/github.com/restic/restic
|
||||||
|
|
||||||
%: cmd/% .gopath
|
%: cmd/% .gopath $(SOURCE)
|
||||||
cd $(BASEPATH) && \
|
cd $(BASEPATH) && \
|
||||||
go build -a -ldflags "-s" -o $@ ./$<
|
go build -a -ldflags "-s" -o $@ ./$<
|
||||||
|
|
||||||
%.debug: cmd/% .gopath
|
%.debug: cmd/% .gopath $(SOURCE)
|
||||||
cd $(BASEPATH) && \
|
cd $(BASEPATH) && \
|
||||||
go build -a -tags debug -ldflags "-s" -o $@ ./$<
|
go build -a -tags debug -ldflags "-s" -o $@ ./$<
|
||||||
|
|
||||||
|
@ -42,7 +44,7 @@ bench: .gopath
|
||||||
cd $(BASEPATH) && \
|
cd $(BASEPATH) && \
|
||||||
go test $(GOTESTFLAGS) -bench ./...
|
go test $(GOTESTFLAGS) -bench ./...
|
||||||
|
|
||||||
gox: .gopath
|
gox: .gopath $(SOURCE)
|
||||||
cd $(BASEPATH) && \
|
cd $(BASEPATH) && \
|
||||||
gox -verbose -os "$(GOX_OS)" ./cmd/restic
|
gox -verbose -os "$(GOX_OS)" ./cmd/restic
|
||||||
|
|
||||||
|
@ -54,7 +56,7 @@ test-integration: .gopath restic restic.debug dirdiff
|
||||||
cd $(BASEPATH)/backend && \
|
cd $(BASEPATH)/backend && \
|
||||||
go test $(GOTESTFLAGS) -test.sftppath $(SFTP_PATH) ./...
|
go test $(GOTESTFLAGS) -test.sftppath $(SFTP_PATH) ./...
|
||||||
|
|
||||||
all.cov: .gopath
|
all.cov: .gopath $(SOURCE)
|
||||||
cd $(BASEPATH) && \
|
cd $(BASEPATH) && \
|
||||||
./coverage_all.sh all.cov
|
./coverage_all.sh all.cov
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue