[PATCH 34/73] libselinux: Update Makefiles to handle /usrmove

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


   This patch looks good to me. acked.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk9x2qsACgkQrlYvE4MpobPBwgCfTE0E58VfcwfQCx7twKuZbR1V
EXQAnjjs8IVU95kksGsEMtU9FUK2Gjer
=Y0wS
-----END PGP SIGNATURE-----
>From 9839ddb338742d64a57fdfb3aa36e0b929795563 Mon Sep 17 00:00:00 2001
From: Dan Walsh <dwalsh@xxxxxxxxxx>
Date: Fri, 27 Jan 2012 14:00:34 -0500
Subject: [PATCH 34/73] 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@xxxxxxxxxx>
---
 libselinux/Makefile         |   37 +++++++++++--------------------------
 libselinux/include/Makefile |    3 +++
 libselinux/man/Makefile     |    1 +
 libselinux/utils/Makefile   |   14 ++++++++------
 4 files changed, 23 insertions(+), 32 deletions(-)

diff --git a/libselinux/Makefile b/libselinux/Makefile
index 9feaf94..fd4f0b1 100644
--- a/libselinux/Makefile
+++ b/libselinux/Makefile
@@ -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:
diff --git a/libselinux/include/Makefile b/libselinux/include/Makefile
index 09bcea3..dd264d0 100644
--- a/libselinux/include/Makefile
+++ b/libselinux/include/Makefile
@@ -11,3 +11,6 @@ install: all
 indent:
 	../../scripts/Lindent $(wildcard selinux/*.h)
 
+distclean clean:
+	-rm -f selinux/*~
+
diff --git a/libselinux/man/Makefile b/libselinux/man/Makefile
index a20a5d1..a53c4ad 100644
--- a/libselinux/man/Makefile
+++ b/libselinux/man/Makefile
@@ -13,3 +13,4 @@ install: all
 	install -m 644 man5/*.5 $(MAN5DIR)
 	install -m 644 man8/*.8 $(MAN8DIR)
 
+indent distclean clean:
diff --git a/libselinux/utils/Makefile b/libselinux/utils/Makefile
index 4b2f348..d6335da 100644
--- a/libselinux/utils/Makefile
+++ b/libselinux/utils/Makefile
@@ -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])
 
-- 
1.7.9.3


[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux