gitlab.com/vegasq/sqlite@v1.0.0/Makefile (about) 1 # Copyright 2017 The Sqlite Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style 3 # license that can be found in the LICENSE file. 4 5 .PHONY: all clean cover cpu editor internalError later mem nuke todo edit 6 7 grep=--include=*.go --include=*.l --include=*.y --include=*.yy 8 ngrep='TODOOK\|parser\.go\|scanner\.go\|.*_string\.go' 9 10 all: editor 11 go test 2>&1 | tee log 12 go vet 2>&1 | grep -v $(ngrep) || true 13 golint 2>&1 | grep -v $(ngrep) || true 14 make todo 15 unused . || true 16 misspell *.go 17 gosimple || true 18 maligned || true 19 unconvert -apply 20 21 clean: 22 go clean 23 rm -f *~ *.test *.out test.db* tt4-test*.db* test_sv.* testdb-* 24 25 cover: 26 t=$(shell tempfile) ; go test -coverprofile $$t && go tool cover -html $$t && unlink $$t 27 28 cpu: clean 29 go test -run @ -bench . -cpuprofile cpu.out 30 go tool pprof -lines *.test cpu.out 31 32 edit: 33 @ 1>/dev/null 2>/dev/null gvim -p Makefile main.c *.go 34 35 editor: 36 gofmt -l -s -w *.go 37 indent -linux *.c 38 go test -i 39 40 internalError: 41 egrep -ho '"internal error.*"' *.go | sort | cat -n 42 43 later: 44 @grep -n $(grep) LATER * || true 45 @grep -n $(grep) MAYBE * || true 46 47 mem: clean 48 go test -run @ -bench . -memprofile mem.out -memprofilerate 1 -timeout 24h 49 go tool pprof -lines -web -alloc_space *.test mem.out 50 51 nuke: clean 52 go clean -i 53 54 todo: 55 @grep -nr $(grep) ^[[:space:]]*_[[:space:]]*=[[:space:]][[:alpha:]][[:alnum:]]* * | grep -v $(ngrep) || true 56 @grep -nr $(grep) TODO * | grep -v $(ngrep) || true 57 @grep -nr $(grep) BUG * | grep -v $(ngrep) || true 58 @grep -nr $(grep) [^[:alpha:]]println * | grep -v $(ngrep) || true