2018-05-16 12:23:42 +02:00
|
|
|
BIN := gowebdav
|
|
|
|
SRC := $(wildcard *.go) cmd/gowebdav/main.go
|
2014-10-23 10:39:47 +02:00
|
|
|
|
2018-05-16 12:23:42 +02:00
|
|
|
all: test cmd
|
2014-10-23 10:39:47 +02:00
|
|
|
|
2018-05-16 12:23:42 +02:00
|
|
|
cmd: ${BIN}
|
2014-10-23 10:39:47 +02:00
|
|
|
|
2018-05-16 12:23:42 +02:00
|
|
|
${BIN}: ${SRC}
|
|
|
|
go build -o $@ ./cmd/gowebdav
|
2014-10-23 10:39:47 +02:00
|
|
|
|
2014-10-23 11:15:28 +02:00
|
|
|
test:
|
2018-05-17 00:05:28 +02:00
|
|
|
go test -v ./...
|
2014-10-23 11:15:28 +02:00
|
|
|
|
2018-05-16 13:52:24 +02:00
|
|
|
api:
|
|
|
|
@sed '/^## API$$/,$$d' -i README.md
|
|
|
|
@echo '## API' >> README.md
|
|
|
|
@godoc2md github.com/studio-b12/gowebdav | sed '/^$$/N;/^\n$$/D' |\
|
|
|
|
sed '2d' |\
|
|
|
|
sed 's/\/src\/github.com\/studio-b12\/gowebdav\//https:\/\/github.com\/studio-b12\/gowebdav\/blob\/master\//g' |\
|
|
|
|
sed 's/\/src\/target\//https:\/\/github.com\/studio-b12\/gowebdav\/blob\/master\//g' |\
|
|
|
|
sed 's/^#/##/g' >> README.md
|
|
|
|
|
2014-10-23 10:39:47 +02:00
|
|
|
clean:
|
2018-05-16 12:23:42 +02:00
|
|
|
@rm -f ${BIN}
|
2014-10-23 10:39:47 +02:00
|
|
|
|
2018-05-16 13:52:24 +02:00
|
|
|
.PHONY: all cmd clean test api
|