Skip to content

Songmu/make2help

Folders and files

NameName
Last commit message
Last commit date

Latest commit

7d76187 · Jul 13, 2022

History

47 Commits
Jul 13, 2022
Jun 19, 2016
Jun 12, 2016
Oct 22, 2019
Oct 27, 2019
Jul 13, 2022
Oct 27, 2019
Jun 12, 2016
Jul 13, 2022
Jul 13, 2022
Jul 13, 2022
Jul 13, 2022
Jul 13, 2022
Jul 13, 2022
Jul 13, 2022
Jul 13, 2022
Feb 21, 2019
Jun 12, 2016

Repository files navigation

make2help

Test Status MIT License PkgGoDev

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 install.

% go install github.com/Songmu/make2help/cmd/make2help@latest

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 ./...

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

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

Author

Songmu