ia64/xen-unstable

changeset 17295:5b4dad214f91

build: Add generic subdirs rules.

Use them in the toplevel Makefile.

Signed-off-by: Bastian Blank <waldi@debian.org>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 25 09:48:41 2008 +0000 (2008-03-25)
parents 76c9cf11ce23
children b726d80d8211
files tools/Makefile tools/Rules.mk
line diff
     1.1 --- a/tools/Makefile	Fri Mar 21 09:45:34 2008 +0000
     1.2 +++ b/tools/Makefile	Tue Mar 25 09:48:41 2008 +0000
     1.3 @@ -37,34 +37,16 @@ export CROSS_SYS_ROOT
     1.4  endif
     1.5  
     1.6  .PHONY: all
     1.7 -all:
     1.8 -	@set -e; for subdir in $(SUBDIRS-y); do \
     1.9 -		$(MAKE) subdir-$@-$$subdir; \
    1.10 -	done
    1.11 +all: subdirs-all
    1.12  
    1.13  .PHONY: install
    1.14 -install:
    1.15 -	@set -e; for subdir in $(SUBDIRS-y); do \
    1.16 -		$(MAKE) subdir-$@-$$subdir; \
    1.17 -	done
    1.18 +install: subdirs-install
    1.19  	$(INSTALL_DIR) $(DESTDIR)/var/xen/dump
    1.20  	$(INSTALL_DIR) $(DESTDIR)/var/log/xen
    1.21  	$(INSTALL_DIR) $(DESTDIR)/var/lib/xen
    1.22  
    1.23  .PHONY: clean distclean
    1.24 -clean distclean:
    1.25 -	@set -e; for subdir in $(SUBDIRS-y); do \
    1.26 -		$(MAKE) subdir-clean-$$subdir; \
    1.27 -	done
    1.28 -
    1.29 -subdir-all-%:
    1.30 -	$(MAKE) -C $* all
    1.31 -
    1.32 -subdir-clean-%:
    1.33 -	$(MAKE) -C $* clean
    1.34 -
    1.35 -subdir-install-%:
    1.36 -	$(MAKE) -C $* install
    1.37 +clean distclean: subdirs-clean
    1.38  
    1.39  ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
    1.40  IOEMU_CONFIGURE_CROSS ?= --cross-prefix=$(CROSS_COMPILE) \
     2.1 --- a/tools/Rules.mk	Fri Mar 21 09:45:34 2008 +0000
     2.2 +++ b/tools/Rules.mk	Tue Mar 25 09:48:41 2008 +0000
     2.3 @@ -49,3 +49,13 @@ check-$(CONFIG_X86) = $(call cc-ver-chec
     2.4  %.o: %.cc
     2.5  	$(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
     2.6  
     2.7 +.PHONY: subdirs-all subdirs-clean subdirs-install
     2.8 +.NOTPARALLEL: subdirs-all subdirs-clean subdirs-install
     2.9 +subdirs-all subdirs-clean subdirs-install:
    2.10 +	@set -e; for subdir in $(SUBDIRS) $(SUBDIRS-y); do \
    2.11 +		$(MAKE) subdir-$(patsubst subdirs-%,%,$@)-$$subdir; \
    2.12 +	done
    2.13 +
    2.14 +subdir-all-% subdir-clean-% subdir-install-%:
    2.15 +	$(MAKE) -C $* $(patsubst subdir-%-$*,%,$@)
    2.16 +