N0MoreSecr3ts / wraith

Uncover forgotten secrets and bring them back to life, haunting security and operations teams.
MIT License
207 stars 42 forks source link

Feature/Makefile help target #125

Closed shreyas-sriram closed 2 years ago

shreyas-sriram commented 2 years ago

Summary

This commit enables make help to automatically print available make targets based off the comments for each target in the Makefile.

The default make target is also set to help.

The definition for each target can be changed.

Sample Output

$ make     

Available make targets:

    all     Run lint tools, clean and build
    build       Download dependencies and build
    release     Download dependencies and build release binaries
    clean       Clean binaries
    help        Print available make targets
    install     Build and save binary in `$GOPATH/bin/`
    package     Run tests, clean and build binary
    prep        Install dependencies
    pretty      Run golint, go fmt and go vet
    test        Run tests with coverage
$ make help

Available make targets:

    all     Run lint tools, clean and build
    build       Download dependencies and build
    release     Download dependencies and build release binaries
    clean       Clean binaries
    help        Print available make targets
    install     Build and save binary in `$GOPATH/bin/`
    package     Run tests, clean and build binary
    prep        Install dependencies
    pretty      Run golint, go fmt and go vet
    test        Run tests with coverage