MAN1DIR is one of the configurable build option but it seems to have few, if any, reasons to have such an option in addition of MANDIR. So, remove this variable and simplify the install rules by using an internal-only "$(bindir)" & "$(man1dir)" to replace "$(DESTDIR)$(BINDIR)" & "$(DESTDIR)$(MANDIR)/man1". Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 22201fd9d..fce74a096 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,6 @@ DESTDIR= PREFIX ?= $(HOME) BINDIR=$(PREFIX)/bin MANDIR=$(PREFIX)/share/man -MAN1DIR=$(MANDIR)/man1 # Allow users to override build settings without dirtying their trees # For debugging, put this in local.mk: @@ -100,6 +99,9 @@ cflags += -DMULTIARCH_TRIPLET=\"$(MULTIARCH_TRIPLET)\" selfcheck-flags := -Wno-vla +bindir := $(DESTDIR)$(BINDIR) +man1dir := $(DESTDIR)$(MANDIR)/man1 + ######################################################################## # target specificities @@ -243,13 +245,13 @@ clean-check: install: install-bin install-man -install-bin: $(INST_PROGRAMS:%=$(DESTDIR)$(BINDIR)/%) -install-man: $(INST_MAN1:%=$(DESTDIR)$(MAN1DIR)/%) +install-bin: $(INST_PROGRAMS:%=$(bindir)/%) +install-man: $(INST_MAN1:%=$(man1dir)/%) -$(DESTDIR)$(BINDIR)/%: % +$(bindir)/%: % @echo " INSTALL $@" $(Q)install -D $< $@ || exit 1; -$(DESTDIR)$(MAN1DIR)/%: % +$(man1dir)/%: % @echo " INSTALL $@" $(Q)install -D -m 644 $< $@ || exit 1; -- 2.20.0