gitlab.com/CoiaPrant/sqlite3@v1.19.1/internal/libc2/Makefile (about)

     1  # Copyright 2019 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\|internal\/bin'
     9  
    10  all: editor
    11  	date
    12  	go version 2>&1 | tee log
    13  	gofmt -l -s -w *.go
    14  	go test -i
    15  	go test 2>&1 -timeout 1h | tee -a log
    16  	#TODO GOOS=linux GOARCH=arm go build
    17  	#TODO GOOS=linux GOARCH=arm64 go build
    18  	#TODO GOOS=linux GOARCH=386 go build
    19  	GOOS=linux GOARCH=amd64 go build
    20  	#TODO GOOS=windows GOARCH=386 go build
    21  	#TODO GOOS=windows GOARCH=amd64 go build
    22  	go vet 2>&1 | grep -v $(ngrep) || true
    23  	golint 2>&1 | grep -v $(ngrep) || true
    24  	make todo
    25  	misspell *.go
    26  	staticcheck | grep -v 'lexer\.go\|parser\.go' || true
    27  	maligned || true
    28  	grep -n 'FAIL\|PASS' log 
    29  	go version
    30  	date 2>&1 | tee -a log
    31  
    32  clean:
    33  	go clean
    34  	rm -f *~ *.test *.out test.db* tt4-test*.db* test_sv.* testdb-*
    35  
    36  cover:
    37  	t=$(shell tempfile) ; go test -coverprofile $$t && go tool cover -html $$t && unlink $$t
    38  
    39  cpu: clean
    40  	go test -run @ -bench . -cpuprofile cpu.out
    41  	go tool pprof -lines *.test cpu.out
    42  
    43  edit:
    44  	gvim -p Makefile *.go &
    45  
    46  editor:
    47  	gofmt -l -s -w *.go
    48  	go test 2>&1 | tee log
    49  
    50  internalError:
    51  	egrep -ho '"internal error.*"' *.go | sort | cat -n
    52  
    53  later:
    54  	@grep -n $(grep) LATER * || true
    55  	@grep -n $(grep) MAYBE * || true
    56  
    57  mem: clean
    58  	go test -run @ -bench . -memprofile mem.out
    59  	go tool pprof -lines -web -alloc_space *.test mem.out
    60  
    61  nuke: clean
    62  	go clean -i
    63  
    64  todo:
    65  	@grep -nr $(grep) ^[[:space:]]*_[[:space:]]*=[[:space:]][[:alpha:]][[:alnum:]]* * | grep -v $(ngrep) || true
    66  	@grep -nr $(grep) TODO * | grep -v $(ngrep) || true
    67  	@grep -nr $(grep) BUG * | grep -v $(ngrep) || true
    68  	@grep -nr $(grep) [^[:alpha:]]println * | grep -v $(ngrep) || true