go-org-orgwiki/Makefile
Niklas Fasching fa13957511 README: Remove deprecated install target and check for go in setup
seems like i removed that target at some point and forgot to update the
readme. As installing go is os specific let's just check for go instead and
let the user handle the installing.
2022-03-19 18:39:14 +01:00

44 lines
922 B
Makefile

.PHONY: default
default: test
go-org: *.go */*.go go.mod go.sum
go get -d ./...
go build .
.PHONY: build
build: go-org
.PHONY: test
test:
go get -d -t ./...
go test ./... -v
.PHONY: setup
setup:
git config core.hooksPath etc/githooks
command -v go > /dev/null || (echo "go not installed" && false)
.PHONY: preview
preview: generate
xdg-open docs/index.html
.PHONY: generate
generate: generate-gh-pages generate-fixtures
.PHONY: generate-gh-pages
generate-gh-pages: build
./etc/generate-gh-pages
.PHONY: generate-fixtures
generate-fixtures: build
./etc/generate-fixtures
.PHONY: fuzz
fuzz: build
@echo also see "http://lcamtuf.coredump.cx/afl/README.txt"
go get github.com/dvyukov/go-fuzz/go-fuzz
go get github.com/dvyukov/go-fuzz/go-fuzz-build
mkdir -p fuzz fuzz/corpus
cp org/testdata/*.org fuzz/corpus
go-fuzz-build github.com/niklasfasching/go-org/org
go-fuzz -bin=./org-fuzz.zip -workdir=fuzz