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 <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
diff --git a/Makefile b/Makefile
index 373ce23..09c2c1e 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 @@
 		(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