aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile58
-rw-r--r--xen/Makefile9
2 files changed, 27 insertions, 40 deletions
diff --git a/Makefile b/Makefile
index ecbc022e10..230af6db05 100644
--- a/Makefile
+++ b/Makefile
@@ -30,25 +30,25 @@ all: dist
# install everything into the standard system directories
# NB: install explicitly does not check that everything is up to date!
-install: install-tools install-xen install-kernels install-docs
+install: xen.install tools.install kernels docs.install
-install-xen:
- $(MAKE) -C xen install
-
-install-tools:
- $(MAKE) -C tools install
-
-install-kernels:
+kernels.install:
cp -a $(INSTALL_DIR)/boot/* /boot/
cp -a $(INSTALL_DIR)/lib/modules/* /lib/modules/
cp -dR $(INSTALL_DIR)/boot/*$(LINUX_VER)* $(prefix)/boot/
cp -dR $(INSTALL_DIR)/lib/modules/* $(prefix)/lib/modules/
-install-docs:
- sh ./docs/check_pkgs && $(MAKE) -C docs install || true
+docs.install:
+ sh ./docs/check_pkgs && $(MAKE) -C docs install || true
+
+xen.install tools.install: %.install:
+ $(MAKE) -C $* install
+
+xen.dist tools.dist: %.dist:
+ $(MAKE) -C $* dist
# build and install everything into local dist directory
-dist: xen tools kernels docs
+dist: xen.dist tools.dist kernels docs.install
$(INSTALL_DIR) $(DIST_DIR)/check
$(INSTALL_DATA) ./COPYING $(DIST_DIR)
$(INSTALL_DATA) ./README $(DIST_DIR)
@@ -61,8 +61,7 @@ xen:
tools:
$(MAKE) prefix=$(INSTALL_DIR) dist=yes -C tools install
-kernels:
- for i in $(XKERNELS) ; do $(MAKE) $$i-build ; done
+kernels: $(addsuffix -build,$(XKERNELS))
docs:
sh ./docs/check_pkgs && \
@@ -72,17 +71,13 @@ docs:
kbuild: kernels
# Delete the kernel build trees entirely
-kdelete:
- for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
+kdelete: $(addsuffix -clean,$(XKERNELS))
# Clean the kernel build trees
-kclean:
- for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
+kclean: $(addsuffix -clean,$(XKERNELS))
# Make patches from kernel sparse trees
-mkpatches:
- for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch ; done
-
+mkpatches: $(addsuffix -xen.patch,$(ALLSPARSETREES))
# build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
# and place them in the install directory. 'make install' should then
@@ -93,16 +88,14 @@ world:
$(MAKE) dist
# clean doesn't do a kclean
-clean:
- $(MAKE) -C xen clean
- $(MAKE) -C tools clean
- $(MAKE) -C docs clean
+clean: xen.clean tools.clean docs.clean
+
+xen.clean tools.clean docs.clean: %.clean:
+ $(MAKE) -C $* clean
# clean, but blow away kernel build tree plus tar balls
-mrproper: clean
+mrproper: clean $(addsuffix -delete,$(ALLKERNELS)) $(addsuffix -mrproper,$(ALLSPARSETREES))
rm -rf dist patches/tmp
- for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
- for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
install-twisted:
wget http://www.twistedmatrix.com/products/get-current.epy
@@ -165,13 +158,8 @@ uninstall:
rm -rf "/usr/lib/python2.?/site-packages/xen* /usr/lib/libxc* /usr/lib/python2.?/site-packages/Xc*"
# Legacy targets for compatibility
-linux24:
- $(MAKE) linux-2.4-xen0-build
- $(MAKE) linux-2.4-xenU-build
+linux24: linux-2.4-xen0-build linux-2.4-xenU-build
-linux26:
- $(MAKE) linux-2.6-xen0-build
- $(MAKE) linux-2.6-xenU-build
+linux26: linux-2.6-xen0-build linux-2.6-xenU-build
-netbsd20:
- $(MAKE) netbsd-2.0-xenU-build
+netbsd20: netbsd-2.0-xenU-build
diff --git a/xen/Makefile b/xen/Makefile
index 28d8368464..4aa6330310 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -32,14 +32,13 @@ install: $(TARGET).gz
dist: $(TARGET)
$(MAKE) prefix=`pwd`/../dist/install dist=yes install
-clean:
- $(MAKE) -C tools clean
- $(MAKE) -C common clean
- $(MAKE) -C drivers clean
- $(MAKE) -C arch/$(TARGET_ARCH) clean
+clean: tools.clean common.clean drivers.clean arch/$(TARGET_ARCH).clean
rm -f include/asm *.o $(TARGET)* *~ core include/xen/compile.h
rm -f include/asm-*/asm-offsets.h
+tools.clean common.clean drivers.clean arch/$(TARGET_ARCH).clean : %.clean:
+ $(MAKE) -C $* clean
+
$(TARGET): delete-unfresh-files
[ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
$(MAKE) -C tools