Utility for self-documented Makefile
Go Makefile Shell
Latest commit 471212f Jun 19, 2016 @Songmu adjust makefile
Permalink
Failed to load latest commit information.
_tools
bin
cmd/make2help
testdata
.gitignore
.goxc.json
.travis.yml
CHANGELOG.md
LICENSE
Makefile
README.md
cli.go
make2help.go
make2help_test.go
rules.go
rules_test.go

README.md

make2help

Build Status MIT License GoDoc

Description

Utility for self-documented Makefile

It scans Makefiles and shows rules with documents. It considers the comment line started with double hash (##) just before a rule is written as document of the rule.

Installation

Binaries are available.

https://github.com/Songmu/make2help/releases

You can also go get.

% go get github.com/Songmu/make2help/cmd/make2help

Synopsis

% make2help
cover:             Take coverage
deps:              Install dependencies
dev-deps:          Install dependencies
help:              Show help
lint:              Lint
release:           Release the binaries
test:              Run tests

Options

-all                display all rules in the Makefiles

Example

With defining help target in Makefile and setting it to .DEFAULT_GOAL, you can see help messages just type make.

.DEFAULT_GOAL := help

## Run tests
test: deps
    go test ./...

## Install dependencies
deps:
    go get -d -v -t ./...

## Show help
help:
    @make2help $(MAKEFILE_LIST)

.PHONY: test deps help
% make
deps:              Install dependencies
help:              Show help
test:              Run tests

Author

Songmu