mirror of
https://github.com/SELinuxProject/selinux
synced 2025-02-16 01:26:54 +00:00
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 <nicolas.iooss@m4x.org> Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
29 lines
534 B
Makefile
29 lines
534 B
Makefile
# Installation directories.
|
|
PREFIX ?= $(DESTDIR)/usr
|
|
LIBDIR ?= $(PREFIX)/lib
|
|
SBINDIR ?= $(PREFIX)/sbin
|
|
LIBSEPOLA ?= $(LIBDIR)/libsepol.a
|
|
|
|
CFLAGS ?= -Wall
|
|
override CFLAGS += -I../src -D_GNU_SOURCE
|
|
override LDLIBS += -lselinux -lpcre
|
|
|
|
TARGETS=$(patsubst %.c,%,$(sort $(wildcard *.c)))
|
|
|
|
all: $(TARGETS)
|
|
|
|
$(TARGETS): ../src/mcstrans.o ../src/mls_level.o $(LIBSEPOLA)
|
|
|
|
install: all
|
|
-mkdir -p $(SBINDIR)
|
|
install -m 755 $(TARGETS) $(SBINDIR)
|
|
|
|
test:
|
|
./mlstrans-test-runner.py ../test/*.test
|
|
|
|
clean:
|
|
rm -f $(TARGETS) *.o *~ \#*
|
|
|
|
relabel:
|
|
|