Skip to content

Commit 7c27475

Browse files
authored
Merge pull request #34 from rhatdan/manpage
Update/Fix man page and fix several bugs in definition.
2 parents 476a31b + 26511c0 commit 7c27475

File tree

9 files changed

+538
-312
lines changed

9 files changed

+538
-312
lines changed

Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ ifeq ($(shell go help mod >/dev/null 2>&1 && echo true), true)
77
GO_BUILD=GO111MODULE=on $(GO) build -mod=vendor
88
endif
99
DESTDIR ?=
10+
PREFIX := /usr/local
11+
CONFIGDIR := ${PREFIX}/share/containers
1012
PROJECT := github.com/containers/common
1113

1214
# If GOPATH not specified, use one in the local directory
@@ -57,6 +59,13 @@ install.tools: .install.golangci-lint .install.md2man
5759
$(call go-get,github.com/cpuguy83/go-md2man); \
5860
fi
5961

62+
.PHONY: install
63+
install:
64+
install -d ${DESTDIR}/${CONFIGDIR}
65+
install -m 0644 pkg/config/containers.conf ${DESTDIR}/${CONFIGDIR}/containers.conf
66+
67+
$(MAKE) -C docs install
68+
6069
.PHONY: test
6170
test: test-unit
6271

@@ -66,7 +75,5 @@ test-unit:
6675

6776
clean: ## Clean artifacts
6877
$(MAKE) -C docs clean
69-
rm -rf \
70-
bin
7178
find . -name \*~ -delete
72-
find . -name \#\* -delete
79+
find . -name \#\* -delete

docs/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ DATADIR := ${PREFIX}/share
33
MANDIR := $(DATADIR)/man
44
GOMD2MAN ?= $(shell command -v go-md2man || echo '$(GOBIN)/go-md2man')
55

6-
docs: $(patsubst %.md,%.1,$(wildcard *.md))
6+
docs: $(patsubst %.md,%,$(wildcard *.md))
77

8-
%.1: %.md
8+
%.5: *md
99
$(GOMD2MAN) -in $^ -out $@
1010

1111
.PHONY: install
1212
install:
13-
install -d ${DESTDIR}/${MANDIR}/man1
14-
install -m 0644 common*.1 ${DESTDIR}/${MANDIR}/man1
13+
install -d ${DESTDIR}/${MANDIR}/man5
14+
install -m 0644 *.5 ${DESTDIR}/${MANDIR}/man5
1515

1616
.PHONY: clean
1717
clean:
18-
$(RM) common*.1
18+
$(RM) *.5

0 commit comments

Comments
 (0)