github.com/lineaje-labs/syft@v0.98.1-0.20231227153149-9e393f60ff1b/Makefile (about) 1 OWNER = anchore 2 PROJECT = syft 3 4 TOOL_DIR = .tool 5 BINNY = $(TOOL_DIR)/binny 6 TASK = $(TOOL_DIR)/task 7 8 .DEFAULT_GOAL := make-default 9 10 ## Bootstrapping targets ################################# 11 12 # note: we need to assume that binny and task have not already been installed 13 $(BINNY): 14 @mkdir -p $(TOOL_DIR) 15 @curl -sSfL https://raw.githubusercontent.com/$(OWNER)/binny/main/install.sh | sh -s -- -b $(TOOL_DIR) 16 17 # note: we need to assume that binny and task have not already been installed 18 .PHONY: task 19 $(TASK) task: $(BINNY) 20 @$(BINNY) install task -q 21 22 .PHONY: ci-bootstrap-go 23 ci-bootstrap-go: 24 go mod download 25 26 # this is a bootstrapping catch-all, where if the target doesn't exist, we'll ensure the tools are installed and then try again 27 %: 28 make $(TASK) 29 $(TASK) $@ 30 31 ## Shim targets ################################# 32 33 .PHONY: make-default 34 make-default: $(TASK) 35 @# run the default task in the taskfile 36 @$(TASK) 37 38 # for those of us that can't seem to kick the habit of typing `make ...` lets wrap the superior `task` tool 39 TASKS := $(shell bash -c "test -f $(TASK) && $(TASK) -l | grep '^\* ' | cut -d' ' -f2 | tr -d ':' | tr '\n' ' '" ) $(shell bash -c "test -f $(TASK) && $(TASK) -l | grep 'aliases:' | cut -d ':' -f 3 | tr '\n' ' ' | tr -d ','") 40 41 .PHONY: $(TASKS) 42 $(TASKS): $(TASK) 43 @$(TASK) $@ 44 45 help: $(TASK) 46 @$(TASK) -l