@@ -1,29 +1,12 @@
+SUBDIRS = include src utils man
DISABLE_CIL ?= n
export DISABLE_CIL
-all:
- $(MAKE) -C src
- $(MAKE) -C utils
-
-install:
- $(MAKE) -C include install
- $(MAKE) -C src install
- $(MAKE) -C utils install
- $(MAKE) -C man install
-
-relabel:
- $(MAKE) -C src relabel
-
-clean:
- $(MAKE) -C src clean
- $(MAKE) -C utils clean
- $(MAKE) -C tests clean
-
-indent:
- $(MAKE) -C src $@
- $(MAKE) -C include $@
- $(MAKE) -C utils $@
+all install relabel clean indent:
+ @for subdir in $(SUBDIRS); do \
+ (cd $$subdir && $(MAKE) $@) || exit 1; \
+ done
test:
$(MAKE) -C tests test
@@ -3,7 +3,7 @@ PREFIX ?= /usr
INCDIR = $(PREFIX)/include/sepol
CILDIR ?= ../cil
-all:
+all relabel clean:
install: all
test -d $(DESTDIR)$(INCDIR) || install -m 755 -d $(DESTDIR)$(INCDIR)
@@ -7,7 +7,7 @@ MAN8SUBDIR ?= man8
MAN3DIR ?= $(MANDIR)/$(MAN3SUBDIR)
MAN8DIR ?= $(MANDIR)/$(MAN8SUBDIR)
-all:
+all relabel clean indent:
install: all
mkdir -p $(DESTDIR)$(MAN3DIR)