Skip to content

Commit fdfe01d

Browse files
authored
Merge pull request #5577 from oss-qm/submit/fhs-manpage
Makefile: FHS conformant manpage installation pathes
2 parents 2076dc6 + 77374e8 commit fdfe01d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ ROOTDIR=$(dir $(abspath $(lastword $(MAKEFILE_LIST))))
2424
# The files will be installed under `$(DESTDIR)/$(PREFIX)`.
2525
# The convention of `DESTDIR` was changed in containerd v1.6.
2626
PREFIX ?= /usr/local
27+
DATADIR ?= $(PREFIX)/share
28+
MANDIR ?= $(DATADIR)/man
2729

2830
TEST_IMAGE_LIST ?=
2931

@@ -253,8 +255,8 @@ man/%: docs/man/%.md FORCE
253255
go-md2man -in "$<" -out "$@"
254256

255257
define installmanpage
256-
$(INSTALL) -d $(DESTDIR)/$(PREFIX)/man/man$(2);
257-
gzip -c $(1) >$(DESTDIR)/$(PREFIX)/man/man$(2)/$(3).gz;
258+
$(INSTALL) -d $(DESTDIR)/$(MANDIR)/man$(2);
259+
gzip -c $(1) >$(DESTDIR)/$(MANDIR)/man$(2)/$(3).gz;
258260
endef
259261

260262
install-man: man

0 commit comments

Comments
 (0)