github.com/cycloss/advent-of-code@v0.0.0-20221210145555-15039b95faa6/makefile (about) 1 2 3 .DEFAULT_GOAL := help 4 .PHONY: help, dart, go 5 6 help: ## Show this help 7 @grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) |\ 8 awk 'BEGIN {FS = ":.*?## "}; {printf "%-30s %s\n", $$1, $$2}' 9 10 go: ## Run an Advent of Code solution written in go 11 @cd ${year} && go run "bin/${year}.go" 12 13 dart: ## Run an Advent of Code solution written in dart 14 @cd ${year} && dart run "bin/${year}.dart" ${day} 15 16 usage: ## Print the usage instructions for running this makefile 17 @echo "Select a target for make depending on the implementation language of the solution." 18 @echo "A `year=xxxx` variable **must** be provided." 19 @echo "A `day=x` variable _may_ be provided. Without it, all solutions implemented in the target language for the selected year will be run" 20 @echo "Example: make dart year=2022 day=1"