github.com/hashicorp/hcl/v2@v2.20.0/hclsyntax/fuzz/Makefile (about)

     1  
     2  ifndef FUZZ_WORK_DIR
     3  $(error FUZZ_WORK_DIR is not set)
     4  endif
     5  
     6  default:
     7  	@echo "See README.md for usage instructions"
     8  
     9  fuzz-config: fuzz-exec-config
    10  fuzz-expr: fuzz-exec-expr
    11  fuzz-template: fuzz-exec-template
    12  fuzz-traversal: fuzz-exec-traversal
    13  
    14  fuzz-exec-%: fuzz%-fuzz.zip
    15  	go-fuzz -bin=./fuzz$*-fuzz.zip -workdir=$(FUZZ_WORK_DIR)
    16  
    17  fuzz%-fuzz.zip: %/fuzz.go
    18  	go-fuzz-build github.com/hashicorp/hcl/v2/hclsyntax/fuzz/$*
    19  
    20  tools:
    21  	go get -u github.com/dvyukov/go-fuzz/go-fuzz
    22  	go get -u github.com/dvyukov/go-fuzz/go-fuzz-build
    23  
    24  clean:
    25  	rm fuzz*-fuzz.zip
    26  
    27  .PHONY: tools clean fuzz-config fuzz-expr fuzz-template fuzz-traversal
    28  .PRECIOUS: fuzzconfig-fuzz.zip fuzzexpr-fuzz.zip fuzztemplate-fuzz.zip fuzztraversal-fuzz.zip