From 61310777705eb89ecb76b3a124846bc161a6fc72 Mon Sep 17 00:00:00 2001 From: Jaikiran Pai Date: Tue, 14 Sep 2021 20:23:11 +0530 Subject: [PATCH 1/2] issue#1411 Introduce DISABLE_DOCS to skip doc generation while building from source --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 2151f85f..96fe736c 100644 --- a/Makefile +++ b/Makefile @@ -157,7 +157,9 @@ bin/skopeo.%: local-cross: bin/skopeo.darwin.amd64 bin/skopeo.linux.arm bin/skopeo.linux.arm64 bin/skopeo.windows.386.exe bin/skopeo.windows.amd64.exe $(MANPAGES): %: %.md +ifneq ($(DISABLE_DOCS), 1) sed -e 's/\((skopeo.*\.md)\)//' -e 's/\[\(skopeo.*\)\]/\1/' $< | $(GOMD2MAN) -in /dev/stdin -out $@ +endif docs: $(MANPAGES) @@ -179,8 +181,10 @@ install-binary: bin/skopeo install -m 755 bin/skopeo ${DESTDIR}${BINDIR}/skopeo install-docs: docs +ifneq ($(DISABLE_DOCS), 1) install -d -m 755 ${DESTDIR}${MANDIR}/man1 install -m 644 docs/*.1 ${DESTDIR}${MANDIR}/man1 +endif install-completions: install -m 755 -d ${DESTDIR}${BASHCOMPLETIONSDIR} From ee8b8e77fc76349a957fbfa55e35345c68661f38 Mon Sep 17 00:00:00 2001 From: Jaikiran Pai Date: Wed, 15 Sep 2021 17:21:31 +0530 Subject: [PATCH 2/2] Explain the usage of DISABLE_DOCS in the installation doc --- install.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install.md b/install.md index 4528eb31..ec55feea 100644 --- a/install.md +++ b/install.md @@ -168,6 +168,12 @@ cd $GOPATH/src/github.com/containers/skopeo && make bin/skopeo By default the `make` command (make all) will build bin/skopeo and the documentation locally. +Building of documentation requires `go-md2man`. On systems that do not have this tool, the +document generation can be skipped by passing `DISABLE_DOCS=1`: +``` +DISABLE_DOCS=1 make +``` + ### Building documentation To build the manual you will need go-md2man.