gomakegen
gomakegen copied to clipboard
Utility for generating makefiles for Golang applications
Installation • Usage • Build Status • Contributing • License
gomakegen
is simple utility for generating makefiles for Golang applications.
Installation
To build the gomakegen
from scratch, make sure you have a working Go 1.19+ workspace (instructions), then:
go install github.com/essentialkaos/gomakegen@latest
Prebuilt binaries
You can download prebuilt binaries for Linux and macOS from EK Apps Repository:
bash <(curl -fsSL https://apps.kaos.st/get) gomakegen
Command-line completion
You can generate completion for bash
, zsh
or fish
shell.
Bash:
sudo gomakegen --completion=bash 1> /etc/bash_completion.d/gomakegen
ZSH:
sudo gomakegen --completion=zsh 1> /usr/share/zsh/site-functions/gomakegen
Fish:
sudo gomakegen --completion=fish 1> /usr/share/fish/vendor_completions.d/gomakegen.fish
Man documentation
You can generate man page using next command:
gomakegen --generate-man | sudo gzip > /usr/share/man/man1/gomakegen.1.gz
Usage
Usage: gomakegen {options} source-dir
Options
--glide, -g Add target to fetching dependencies with glide
--dep, -d Add target to fetching dependencies with dep
--mod, -m Add target to fetching dependencies with go mod (default for Go ≥ 1.18)
--strip, -S Strip binaries
--benchmark, -B Add target to run benchmarks
--race, -R Add target to test race conditions
--output, -o file Output file (Makefile by default)
--no-color, -nc Disable colors in output
--help, -h Show this help message
--version, -v Show version
Examples
gomakegen .
Generate makefile for project in current directory and save as Makefile
gomakegen $GOPATH/src/github.com/profile/project
Generate makefile for github.com/profile/project and save as Makefile
gomakegen $GOPATH/src/github.com/profile/project -o project.make
Generate makefile for github.com/profile/project and save as project.make
CI Status
Branch | Status |
---|---|
master |
|
develop |
Contributing
Before contributing to this project please read our Contributing Guidelines.