Add capability to build manpages from markdown
Adds capability to build the manpages via the go-md2man utility to the make framework for containerd Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
This commit is contained in:
parent
b268261446
commit
fc1913a5a6
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
/bin/
|
||||
/man/
|
||||
coverage.txt
|
||||
profile.out
|
||||
containerd.test
|
||||
|
11
Makefile
11
Makefile
@ -57,6 +57,7 @@ TEST_REQUIRES_ROOT_PACKAGES=$(filter \
|
||||
|
||||
# Project binaries.
|
||||
COMMANDS=ctr containerd containerd-stress containerd-release
|
||||
MANPAGES=ctr.1 containerd.1 config.toml.5 containerd-config.1 containerd-publish.1
|
||||
|
||||
GO_TAGS=$(if $(BUILDTAGS),-tags "$(BUILDTAGS)",)
|
||||
GO_LDFLAGS=-ldflags '-s -w -X $(PKG)/version.Version=$(VERSION) -X $(PKG)/version.Revision=$(REVISION) -X $(PKG)/version.Package=$(PKG) $(EXTRA_LDFLAGS)'
|
||||
@ -157,6 +158,16 @@ bin/containerd-shim: cmd/containerd-shim FORCE # set !cgo and omit pie for a sta
|
||||
binaries: $(BINARIES) ## build binaries
|
||||
@echo "$(WHALE) $@"
|
||||
|
||||
manpages: mandir $(addprefix man/,$(MANPAGES))
|
||||
@echo "$(WHALE) $@"
|
||||
|
||||
mandir:
|
||||
@mkdir -p man
|
||||
|
||||
man/%: docs/man/%.md FORCE
|
||||
@echo "$(WHALE) $<"
|
||||
go-md2man -in "$<" -out "$@"
|
||||
|
||||
release: $(BINARIES)
|
||||
@echo "$(WHALE) $@"
|
||||
@rm -rf releases/$(RELEASE) releases/$(RELEASE).tar.gz
|
||||
|
@ -8,3 +8,4 @@ go get -u github.com/stevvooe/protobuild
|
||||
go get -u github.com/alecthomas/gometalinter
|
||||
gometalinter --install >/dev/null
|
||||
go get -u github.com/LK4D4/vndr
|
||||
go get -u github.com/estesp/go-md2man
|
||||
|
Loading…
Reference in New Issue
Block a user