From: Davin McCall Date: Sat, 6 Jan 2018 23:07:31 +0000 (+0000) Subject: Install: allow specifying sbin and man directories. X-Git-Tag: v0.07~2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4bb3e3ef435d415386679b27349418613b400fc0;p=oweals%2Fdinit.git Install: allow specifying sbin and man directories. --- diff --git a/doc/manpages/Makefile b/doc/manpages/Makefile index 16a0237..46d95c6 100644 --- a/doc/manpages/Makefile +++ b/doc/manpages/Makefile @@ -1,3 +1,3 @@ install: - mkdir -p "$(DESTDIR)/usr/share/man/man8" - cp dinit.8 dinitctl.8 "$(DESTDIR)/usr/share/man/man8" + mkdir -p "$(DESTDIR)$(MANDIR)/man8" + install dinit.8 dinitctl.8 "$(DESTDIR)$(MANDIR)/man8" diff --git a/mconfig b/mconfig index fed7a66..b4ed4b9 100644 --- a/mconfig +++ b/mconfig @@ -1,3 +1,11 @@ +# Installation path options. + +SBINDIR=/sbin +MANDIR=/usr/share/man + + +# General build options. Uncomment the options appropriate for your system. + # Linux (GCC). Note with GCC 5.x/6.x you must use the old ABI, with GCC 7.x you must use # the new ABI. See BUILD file for more information. CXX=g++ @@ -6,7 +14,7 @@ EXTRA_LIBS= BUILD_SHUTDOWN=yes SANITIZEOPTS=-fsanitize=address,undefined -# OpenBSD, tested with GCC 4.9.3 and gmake: +# OpenBSD, tested with GCC 4.9.3 / Clang++ 4/5 and gmake: #CXX=clang++ #CXXOPTS=-std=gnu++11 -Os -Wall -fno-rtti #EXTRA_LIBS= diff --git a/src/Makefile b/src/Makefile index 04c8116..54ad5d9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -26,10 +26,10 @@ check: $(dinit_objects) $(MAKE) -C tests check install: all - install -d $(DESTDIR)/sbin - install -s dinit dinitctl $(SHUTDOWN) $(DESTDIR)/sbin + install -d $(DESTDIR)$(SBINDIR) + install -s dinit dinitctl $(SHUTDOWN) $(DESTDIR)$(SBINDIR) ifeq ($(BUILD_SHUTDOWN),yes) - install halt reboot $(DESTDIR)/sbin + install halt reboot $(DESTDIR)$(SBINDIR) endif clean: