From 7b5699bfd77d4581c6a52687ba2e3cf911348b8f Mon Sep 17 00:00:00 2001 From: Stephen Smalley Date: Tue, 20 Jun 2017 10:49:57 -0400 Subject: Fix BINDIR/SBINDIR/... variables in Makefiles As reported by Nicolas Iooss, there are still some inconsistencies in the definitions and usage of Makefile variables related to bin and sbin directories. Since we need to still support non-usrmerge systems, we cannot completely synchronize them, but we can eliminate unnecessary differences, remove unused variables, and drop the USRSBINDIR variables. Before: $ find . -name Makefile -exec cat {} + |grep '^[A-Z_]*BINDIR' |sort -u BINDIR=$(PREFIX)/bin BINDIR ?= $(PREFIX)/bin BINDIR ?= $(PREFIX)/sbin SBINDIR ?= $(DESTDIR)/sbin SBINDIR ?= $(PREFIX)/sbin USRSBINDIR ?= $(PREFIX)/sbin After: $ find . -name Makefile -exec cat {} + | grep '^[A-Z_]*BINDIR' | sort -u BINDIR ?= $(PREFIX)/bin SBINDIR ?= $(DESTDIR)/sbin SBINDIR ?= $(PREFIX)/sbin This does not change the actual install location of any file. It does drop the legacy symlink from /usr/sbin/load_policy to /sbin/load_policy; packagers can create that separately if desired. Reported-by: Nicolas Iooss Signed-off-by: Stephen Smalley --- policycoreutils/load_policy/Makefile | 3 --- 1 file changed, 3 deletions(-) (limited to 'policycoreutils/load_policy/Makefile') diff --git a/policycoreutils/load_policy/Makefile b/policycoreutils/load_policy/Makefile index 8ee1fb16..b85833c2 100644 --- a/policycoreutils/load_policy/Makefile +++ b/policycoreutils/load_policy/Makefile @@ -1,7 +1,6 @@ # Installation directories. PREFIX ?= $(DESTDIR)/usr SBINDIR ?= $(DESTDIR)/sbin -USRSBINDIR ?= $(PREFIX)/sbin MANDIR ?= $(PREFIX)/share/man LOCALEDIR ?= /usr/share/locale @@ -18,8 +17,6 @@ install: all install -m 755 $(TARGETS) $(SBINDIR) test -d $(MANDIR)/man8 || install -m 755 -d $(MANDIR)/man8 install -m 644 load_policy.8 $(MANDIR)/man8/ - -mkdir -p $(USRSBINDIR) - -ln -sf $(SBINDIR)/load_policy $(USRSBINDIR)/load_policy clean: -rm -f $(TARGETS) *.o -- cgit v1.2.3