Skip to content

Instantly share code, notes, and snippets.

@nobiki
Last active November 15, 2019 07:19
Show Gist options
  • Select an option

  • Save nobiki/90dc8b3afbb794e4d636b3ae7b2c030d to your computer and use it in GitHub Desktop.

Select an option

Save nobiki/90dc8b3afbb794e4d636b3ae7b2c030d to your computer and use it in GitHub Desktop.

Revisions

  1. nobiki revised this gist Nov 15, 2019. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -7,13 +7,12 @@ STR = foo
    $(eval TS := $(shell date +%Y%m%d%H%M%S%N))

    hoge: ## [hoge] make hoge STR=bar
    echo "STR: ${STR}"
    @echo "STR: ${STR}"
    @echo ${TS}
    @sleep 1
    @echo ${TS}
    @sleep 1
    @echo ${TS}
    @sleep 1

    help:
    @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
  2. nobiki revised this gist Nov 15, 2019. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -8,12 +8,12 @@ $(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}
    sleep 1
    @echo ${TS}
    @sleep 1
    @echo ${TS}
    @sleep 1
    @echo ${TS}
    @sleep 1

    help:
    @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
  3. nobiki revised this gist Nov 15, 2019. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion Makefile
    Original file line number Diff line number Diff line change
    @@ -7,8 +7,13 @@ STR = foo
    $(eval TS := $(shell date +%Y%m%d%H%M%S%N))

    hoge: ## [hoge] make hoge STR=bar
    echo ${STR}
    echo "STR: ${STR}"
    echo ${TS}
    sleep 1
    echo ${TS}
    sleep 1
    echo ${TS}
    sleep 1

    help:
    @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
  4. nobiki revised this gist Nov 15, 2019. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -4,9 +4,11 @@
    .PHONY: help

    STR = foo
    $(eval TS := $(shell date +%Y%m%d%H%M%S%N))

    hoge: ## [hoge] make hoge STR=bar
    echo ${STR}
    echo ${TS}

    help:
    @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
  5. nobiki created this gist Nov 5, 2019.
    12 changes: 12 additions & 0 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    #!/bin/bash -eu

    .DEFAULT_GOAL := help
    .PHONY: help

    STR = foo

    hoge: ## [hoge] make hoge STR=bar
    echo ${STR}

    help:
    @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'