Skip to content

Instantly share code, notes, and snippets.

@yuya-takeyama
Created January 6, 2012 13:37
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuya-takeyama/1570650 to your computer and use it in GitHub Desktop.
Save yuya-takeyama/1570650 to your computer and use it in GitHub Desktop.
Makefile からタスクの一覧とその説明 (コメント) を表示する
tasks:
@echo Makefile for FooBar
@echo
@echo Usage: make [task]
@echo
@echo Tasks:
@ruby -ne 'puts " #{$$1.ljust(24)} => #{$$2}" if $$_ =~ /^([a-z\-]*):(?:.*)#\s*(.*)$$/' < Makefile
foo-task: # タスクの説明
echo FOO TASK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment