make2help

package module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2016 License: MIT Imports: 12 Imported by: 0

README

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CLI

type CLI struct {
	OutStream, ErrStream io.Writer
}

CLI is struct for command line tool

func (*CLI) Run

func (cli *CLI) Run(argv []string) int

Run the make2help

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL