libselinux: Update Makefiles to handle /usrmove

Move everything into /usr/* and just put links from /*.  The whole /usr
thing hasn't really worked in all situations for a long long time.  Just
accept that fact and move along.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
Dan Walsh 2012-01-27 14:00:34 -05:00 committed by Eric Paris
parent bc6a56ce20
commit 46d294f645
4 changed files with 23 additions and 32 deletions
libselinux

View File

@ -1,3 +1,5 @@
SUBDIRS = src include utils man
DISABLE_AVC ?= n
DISABLE_SETRANS ?= n
DISABLE_RPM ?= n
@ -19,41 +21,24 @@ ifeq ($(DISABLE_SETRANS),y)
endif
export DISABLE_AVC DISABLE_SETRANS DISABLE_RPM DISABLE_BOOL EMFLAGS
all:
$(MAKE) -C src
$(MAKE) -C utils
all install relabel clean distclean indent:
@for subdir in $(SUBDIRS); do \
(cd $$subdir && $(MAKE) $@) || exit 1; \
done
swigify: all
$(MAKE) -C src swigify
$(MAKE) -C src swigify $@
pywrap:
$(MAKE) -C src pywrap
$(MAKE) -C src pywrap $@
rubywrap:
$(MAKE) -C src rubywrap
install:
$(MAKE) -C include install
$(MAKE) -C src install
$(MAKE) -C utils install
$(MAKE) -C man install
$(MAKE) -C src rubywrap $@
install-pywrap:
$(MAKE) -C src install-pywrap
$(MAKE) -C src install-pywrap $@
install-rubywrap:
$(MAKE) -C src install-rubywrap
relabel:
$(MAKE) -C src relabel
clean distclean:
$(MAKE) -C src $@
$(MAKE) -C utils clean
indent:
$(MAKE) -C src $@
$(MAKE) -C utils $@
$(MAKE) -C include $@
$(MAKE) -C src install-rubywrap $@
test:

View File

@ -11,3 +11,6 @@ install: all
indent:
../../scripts/Lindent $(wildcard selinux/*.h)
distclean clean:
-rm -f selinux/*~

View File

@ -13,3 +13,4 @@ install: all
install -m 644 man5/*.5 $(MAN5DIR)
install -m 644 man8/*.8 $(MAN8DIR)
indent distclean clean:

View File

@ -1,8 +1,8 @@
# Installation directories.
PREFIX ?= $(DESTDIR)/usr
LIBDIR ?= $(PREFIX)/lib
BINDIR ?= $(PREFIX)/sbin
_BINDIR ?= $(DESTDIR)/sbin
USRBINDIR ?= $(PREFIX)/sbin
SBINDIR ?= $(DESTDIR)/sbin
MAX_STACK_SIZE=8192
CFLAGS ?= -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissing-include-dirs \
@ -40,14 +40,16 @@ TARGETS:= $(filter-out $(UNUSED_TARGETS) matchpathcon, $(TARGETS))
all: $(TARGETS) matchpathcon
install: all
-mkdir -p $(BINDIR)
install -m 755 $(TARGETS) $(BINDIR)
-mkdir -p $(_BINDIR)
install -m 755 matchpathcon $(_BINDIR)
-mkdir -p $(USRBINDIR)
install -m 755 $(TARGETS) $(USRBINDIR)
-mkdir -p $(SBINDIR)
install -m 755 matchpathcon $(SBINDIR)
(cd $(BINDIR); ln -fs ../../sbin/matchpathcon)
clean:
rm -f $(TARGETS) matchpathcon *.o *~
distclean: clean
indent:
../../scripts/Lindent $(wildcard *.[ch])