Skip to content
Utility for self-documented Makefile
Go Makefile
Branch: master
Clone or download
Songmu Checking in changes prior to tagging of version v0.1.1
## [v0.1.1](v0.1.0...v0.1.1) (2019-08-19)

* update deps [#7](#7) ([Songmu](https://github.com/Songmu))
* fix built in target validation logic [#6](#6) ([shumon84](https://github.com/shumon84))
Latest commit 1fdda8f Aug 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin adjust makefile Jun 19, 2016
cmd/make2help initial commit Jun 12, 2016
testdata add test Aug 19, 2019
.gitignore initial commit Jun 12, 2016
.travis.yml udpate metafiles Feb 21, 2019
CHANGELOG.md
LICENSE
Makefile
README.md fix output Jun 12, 2016
cli.go
go.mod
go.sum update deps Aug 19, 2019
make2help.go
make2help_test.go
rules.go use standard sort package and drop patrickmn/sortutil Feb 21, 2019
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

You can’t perform that action at this time.