github.com/hashicorp/hcl/v2@v2.20.0/hclwrite/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  
    11  fuzz-exec-%: fuzz%-fuzz.zip
    12  	go-fuzz -bin=./fuzz$*-fuzz.zip -workdir=$(FUZZ_WORK_DIR)
    13  
    14  fuzz%-fuzz.zip: %/fuzz.go
    15  	go-fuzz-build -x github.com/hashicorp/hcl/v2/hclwrite/fuzz/$*
    16  
    17  tools:
    18  	go get -u github.com/dvyukov/go-fuzz/go-fuzz
    19  	go get -u github.com/dvyukov/go-fuzz/go-fuzz-build
    20  
    21  clean:
    22  	rm fuzz*-fuzz.zip
    23  
    24  .PHONY: tools clean fuzz-config
    25  .PRECIOUS: fuzzconfig-fuzz.zip