Skip to content

Instantly share code, notes, and snippets.

@tyndyll
Forked from prwhite/Makefile
Created June 23, 2017 23:06
Show Gist options
  • Select an option

  • Save tyndyll/dec008a5ec007fe0fc4191d5c7bbdabe to your computer and use it in GitHub Desktop.

Select an option

Save tyndyll/dec008a5ec007fe0fc4191d5c7bbdabe to your computer and use it in GitHub Desktop.

Revisions

  1. @prwhite prwhite revised this gist Dec 29, 2013. 1 changed file with 10 additions and 11 deletions.
    21 changes: 10 additions & 11 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -1,19 +1,18 @@
    # Add the following 'help' target to your Makefile
    # And add help text after each target name starting with '##'

    # And add help text after each target name starting with '\#\#'
    help: ## Show this help.
    @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'

    @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
    # Everything below is an example

    target00: ## This message will show up when typing 'make help'
    @echo does nothing

    @echo does nothing
    target01: ## This message will also show up when typing 'make help'
    @echo does something

    @echo does something
    # Remember that targets can have multiple entries (if your target specifications are very long, etc.)
    target02: ## This message will show up too!!!
    target02: target00 target01
    @echo does even more

    @echo does even more
  2. @prwhite prwhite created this gist Dec 29, 2013.
    19 changes: 19 additions & 0 deletions Makefile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    # Add the following 'help' target to your Makefile
    # And add help text after each target name starting with '##'

    help: ## Show this help.
    @fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'

    # Everything below is an example

    target00: ## This message will show up when typing 'make help'
    @echo does nothing

    target01: ## This message will also show up when typing 'make help'
    @echo does something

    # Remember that targets can have multiple entries (if your target specifications are very long, etc.)
    target02: ## This message will show up too!!!
    target02: target00 target01
    @echo does even more