aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Makefile
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-02-15 14:08:54 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2019-02-17 17:52:26 +0100
commit582ec2e3c2209b95ca2153feb0c07535e06bfc31 (patch)
tree37bc20c61a6672a7547828d1068d2fc8cc2e04ce /Makefile
parent90190ad2a9fef0a145646dfb4b822997fd0e686e (diff)
downloadsparse-dev-582ec2e3c2209b95ca2153feb0c07535e06bfc31.tar.gz
build: get rid of MAN1DIR
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@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 8 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index e5898d9d..113c488f 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,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:
@@ -98,6 +97,10 @@ cflags += -DGCC_BASE=\"$(GCC_BASE)\"
MULTIARCH_TRIPLET := $(shell $(CC) -print-multiarch 2>/dev/null)
cflags += -DMULTIARCH_TRIPLET=\"$(MULTIARCH_TRIPLET)\"
+
+bindir := $(DESTDIR)$(BINDIR)
+man1dir := $(DESTDIR)$(MANDIR)/man1
+
########################################################################
# target specificities
@@ -241,13 +244,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;