2015-01-14 16:32:37 +00:00
|
|
|
.PHONY: clean all test release debug
|
2014-08-05 21:13:19 +00:00
|
|
|
|
2015-01-14 16:32:37 +00:00
|
|
|
GOFLAGS=
|
|
|
|
#GOFLAGS+=-race
|
2014-11-24 21:19:48 +00:00
|
|
|
|
2015-01-14 16:49:17 +00:00
|
|
|
all: release
|
2015-01-14 16:32:37 +00:00
|
|
|
|
|
|
|
release:
|
|
|
|
for dir in cmd/* ; do \
|
|
|
|
test -f "$$dir/Makefile" && \
|
|
|
|
(GOFLAGS="$(GOFLAGS)" make -C "$$dir") \
|
|
|
|
done
|
|
|
|
|
|
|
|
debug:
|
2014-08-06 18:09:41 +00:00
|
|
|
for dir in cmd/* ; do \
|
2015-01-14 16:32:37 +00:00
|
|
|
test -f "$$dir/Makefile" && \
|
|
|
|
(GOFLAGS="$(GOFLAGS)" make -C "$$dir" debug) \
|
2014-08-06 18:09:41 +00:00
|
|
|
done
|
2015-01-14 16:32:37 +00:00
|
|
|
|
|
|
|
test: release debug
|
|
|
|
go test -v ./...
|
|
|
|
test/run.sh cmd/restic:cmd/dirdiff
|
|
|
|
|
2015-01-14 16:43:41 +00:00
|
|
|
test-%: test/test-%.sh release debug
|
2015-01-14 16:32:37 +00:00
|
|
|
echo $*
|
|
|
|
test/run.sh cmd/restic:cmd/dirdiff "test/$@.sh"
|
2014-08-05 21:13:19 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
go clean
|
2014-08-06 18:09:41 +00:00
|
|
|
for dir in cmd/* ; do \
|
2015-01-14 16:32:37 +00:00
|
|
|
test -f "$$dir/Makefile" && \
|
|
|
|
(make -C "$$dir" clean) \
|
2014-08-06 18:09:41 +00:00
|
|
|
done
|