From 142209161fc5a383a8f34a7fd73bf6a8ecf349f3 Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Thu, 11 Aug 2011 23:36:14 -0400 Subject: [PATCH] global: Makefile: create global 'all' target This does 2 things. It does a little cleanup by de-duplicating code. It also adds a new target 'all' as the default target. Previous the default target was 'install'. There was no 'all' target. This patch should allow one to build all of the tree as a non-root user. Signed-off-by: Eric Paris Acked-by: Dan Walsh --- Makefile | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 373ce236..09c2c1e3 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,13 @@ SUBDIRS=libsepol libselinux libsemanage sepolgen checkpolicy policycoreutils # policy PYSUBDIRS=libselinux libsemanage +DISTCLEANSUBIDRS=libselinux libsemanage ifeq ($(DEBUG),1) export CFLAGS = -g3 -O0 -gdwarf-2 -fno-strict-aliasing -Wall -Wshadow -Werror export LDFLAGS = -g endif -install relabel: +all install relabel clean test indent: @for subdir in $(SUBDIRS); do \ (cd $$subdir && $(MAKE) $@) || exit 1; \ done @@ -16,22 +17,7 @@ install-pywrap swigify: (cd $$subdir && $(MAKE) $@) || exit 1; \ done -clean: - @for subdir in $(SUBDIRS); do \ - (cd $$subdir && $(MAKE) $@) || exit 1; \ - done - distclean: - @for subdir in libselinux libsemanage; do \ - (cd $$subdir && $(MAKE) $@) || exit 1; \ - done - -test: - @for subdir in $(SUBDIRS); do \ - (cd $$subdir && $(MAKE) $@) || exit 1; \ - done - -indent: - @for subdir in $(SUBDIRS); do \ + @for subdir in $(DISTCLEANSUBDIRS); do \ (cd $$subdir && $(MAKE) $@) || exit 1; \ done