Skip to content

Instantly share code, notes, and snippets.

@nobiki
Last active November 15, 2019 07:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nobiki/90dc8b3afbb794e4d636b3ae7b2c030d to your computer and use it in GitHub Desktop.
Save nobiki/90dc8b3afbb794e4d636b3ae7b2c030d to your computer and use it in GitHub Desktop.
#!/bin/bash -eu
.DEFAULT_GOAL := help
.PHONY: help
STR = foo
$(eval TS := $(shell date +%Y%m%d%H%M%S%N))
hoge: ## [hoge] make hoge STR=bar
@echo "STR: ${STR}"
@echo ${TS}
@sleep 1
@echo ${TS}
@sleep 1
@echo ${TS}
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment