github.com/anchore/syft@v1.4.2-0.20240516191711-1bec1fc5d397/syft/file/cataloger/executable/test-fixtures/elf/Makefile (about) 1 BIN=./bin 2 TOOL_IMAGE=localhost/syft-bin-build-tools:latest 3 VERIFY_FILE=actual_verify 4 5 all: build verify 6 7 tools-check: 8 @sha256sum -c Dockerfile.sha256 || (echo "Tools Dockerfile has changed" && exit 1) 9 10 # for selfrando... 11 # docker buildx build --platform linux/amd64 -t $(TOOL_IMAGE) . 12 13 tools: 14 @(docker inspect $(TOOL_IMAGE) > /dev/null && make tools-check) || (docker build -t $(TOOL_IMAGE) . && sha256sum Dockerfile > Dockerfile.sha256) 15 16 build: tools 17 mkdir -p $(BIN) 18 docker run -i -v $(shell pwd):/mount -w /mount/project $(TOOL_IMAGE) make 19 20 verify: tools 21 @rm -f $(VERIFY_FILE) 22 docker run -i -v $(shell pwd):/mount -w /mount/project $(TOOL_IMAGE) make verify > $(VERIFY_FILE) 23 @python ./differ expected_verify $(VERIFY_FILE) 24 25 debug: 26 docker run -i --rm -v $(shell pwd):/mount -w /mount/project $(TOOL_IMAGE) bash 27 28 cache.fingerprint: 29 @find project Dockerfile Makefile -type f -exec md5sum {} + | awk '{print $1}' | sort | tee cache.fingerprint 30 31 clean: 32 rm -f $(BIN)/* 33 34 .PHONY: build verify debug build-image build-bins clean dockerfile-check cache.fingerprint