Skip to content

paulbes/makedoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

makedoc

Note: The parser component is stolen from: https://github.com/tj/mmake, and modified to work better with more complex makefiles

Simple Makefile documentation reader and writer. You can document a target by preceding it with a section of: ##

## This is the basic help
##
## This is the verbose help and it
## can span as many lines as you want.
##
## The basic and verbose help need to be separated by an empty ##

If you specify a .DEFAULT_GOAL = [yourgoal] it will be highlighted

.DEFAULT_GOAL = help

silent:
	$(info no such target)

## Print out help
##
## Display a short description for all targets
help:
	@echo "Available targets:\n"
	@go run ../main.go -pretty $(MAKEFILE_LIST)

## Print help verbose
##
## Dumps the help including long descriptions
help-verbose:
	@echo "Available targets:\n"
	@go run ../main.go -pretty -verbose $(MAKEFILE_LIST)

## Display an extensive description for a specific target
##
## Display more extensive help for a given target, e.g.,
## `make help-test`
help-%:
	@go run ../main.go -pretty -verbose -target $(*) $(MAKEFILE_LIST)

include more.mk

You can run the following command:

go run main.go -pretty -verbose data/Makefile

To get pretty output that is easily digested by a user:

help                 Print out help
Display a short description for all targets

help-%               Display an extensive description for a specific target
Display more extensive help for a given target, e.g.,
`make help-test`

help-verbose         Print help verbose
Dumps the help including long descriptions

About

Makefile documentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published