Call makefile recursively for subdirs.
authorKeir Fraser <keir.fraser@citrix.com>
Sat, 26 Jan 2008 15:26:41 +0000 (15:26 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Sat, 26 Jan 2008 15:26:41 +0000 (15:26 +0000)
This makes it possible to handle subdirs differently.

Signed-off-by: Bastian Blank <waldi@debian.org>
tools/Makefile

index 1f883ef2fd9afdd02b7cb705dff960c891806e9d..d5f49f4da557cdcf63fc8aea857c050caf198bfd 100644 (file)
@@ -37,14 +37,14 @@ endif
 .PHONY: all
 all: check
        @set -e; for subdir in $(SUBDIRS-y); do \
-               $(MAKE) -C $$subdir $@; \
+               $(MAKE) subdir-$@-$$subdir; \
        done
        $(MAKE) ioemu
 
 .PHONY: install
 install: check
        @set -e; for subdir in $(SUBDIRS-y); do \
-               $(MAKE) -C $$subdir $@; \
+               $(MAKE) subdir-$@-$$subdir; \
        done
        $(MAKE) ioemuinstall
        $(INSTALL_DIR) $(DESTDIR)/var/xen/dump
@@ -54,13 +54,22 @@ install: check
 .PHONY: clean
 clean: check_clean
        @set -e; for subdir in $(SUBDIRS-y); do \
-               $(MAKE) -C $$subdir $@; \
+               $(MAKE) subdir-$@-$$subdir; \
        done
        $(MAKE) ioemuclean
 
 .PHONY: distclean
 distclean: clean
 
+subdir-all-%:
+       $(MAKE) -C $* all
+
+subdir-clean-%:
+       $(MAKE) -C $* clean
+
+subdir-install-%:
+       $(MAKE) -C $* install
+
 .PHONY: check
 check:
        $(MAKE) -C check