]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
Add hvm headers to HDRS variable.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 12 May 2006 21:35:05 +0000 (22:35 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 12 May 2006 21:35:05 +0000 (22:35 +0100)
xen-unstable changeset: 9540:c1d53788a25e07b4ac4ef49c3e3d76f7ad3f6b8f
xen-unstable date: Wed Apr  5 15:42:01 2006 +0100

Clean up HDRS Makefile variable.

Signed-off-by: Keir Fraser <keir.com>
xen-unstable changeset: 9541:133ce326febdae137e106c0b0089a8c127631662
xen-unstable date: Wed Apr  5 15:46:01 2006 +0100

Clean up build system some more. No need to explicitly
include Rules.mk/Post.mk all over the place.

Signed-off-by: Keir Fraser <keir.com>
xen-unstable changeset: 9542:68ef2efa929b26f9e5ab71a5590c899d044c48ce
xen-unstable date: Wed Apr  5 17:15:34 2006 +0100

Avoid double slashes in linker object file lists.

Signed-off-by: Keir Fraser <keir.com>
xen-unstable changeset: 9582:b84517e3fc3042f4bfe822d39eca87be0fad5932
xen-unstable date: Fri Apr  7 14:26:02 2006 +0100

Remove unused netbsd build fragments.

Signed-Off-By: Homrs <horms.net.au>
xen-unstable changeset: 9597:c83da0012e87e4b1d83bb61ec338616fbcf3b141
xen-unstable date: Mon Apr 10 16:26:52 2006 +0100

build: Remove iptables and python loging helper targets

These targets don't really fit into the build infastructure,
for instance there is no faclilty for them to be removed
on make distclean. I posted a patch that fleshed out the targets,
but Christian Limpach suggested to me that removing them
would be a better idea.

Signed-Off-By: Horms <horms.net.au>
xen-unstable changeset: 9598:095519654079f55af70943004e448fb779ac4c5a
xen-unstable date: Mon Apr 10 16:27:46 2006 +0100

build: Make sure that DESTDIR is set

In the case where XEN_PYTHON_NATIVE_INSTALL is in effect,
if DESTDIR is not set then the install will go into a relative
directory rather than under the default prefix (usually /usr).

An alternate solution would be to update the fragments
that do the python install to use 2062 2062 141 126DESTDIR)/ instead of
2062 2062 141 126DESTDIR). This is not an incredible burden as there
are only two such fragments in the tree. However, it
seems prone to error as new makefiles are created
in the future.

Signed-Off-By: Horms <horms.net.au>
xen-unstable changeset: 9599:baa1742637b7e4a2d94db08b4f12c2a0f8b07128
xen-unstable date: Mon Apr 10 16:31:53 2006 +0100

build: clean up output of make help a little bit

Signed-Off-By: Horms <horms.net.au>
xen-unstable changeset: 9600:82dfb97fe5ea6d9e0c279b0c2de0688c09c1e4e4
xen-unstable date: Mon Apr 10 16:34:59 2006 +0100

build: Document the use of XEN_PYTHON_NATIVE_INSTALL

Document the use of the XEN_PYTHON_NATIVE_INSTALL environment variable

Signed-Off-By: Horms <horms.net.au>
xen-unstable changeset: 9601:066a233ee3659fb1e52a4bca05727e5cdd12004a
xen-unstable date: Mon Apr 10 16:35:30 2006 +0100

build: Clean up use of .PHONY

* Move .PHONY directives next to targets,
  this makes them a lot harder to miss
* Add missing .PHONY directives
* Remove nonexistent .PHONY directives
* Hopefully I didn'T miss anything...

Signed-Off-By: Horms <horms.net.au>
xen-unstable changeset: 9607:b454a09cddb1a4ba44e8a810f8f6779c5e5bb3ef
xen-unstable date: Mon Apr 10 17:02:49 2006 +0100

Fix a couple of typos.

Signed-off-by: Keir Fraser <keir.com>
xen-unstable changeset: 9610:7a41b35d73f40246ea839a0628f50dd937b21d50
xen-unstable date: Mon Apr 10 17:28:02 2006 +0100

Remove some bogus .PHONY Makefile declarations.
Fixes xentop installation.

Signed-off-by: Keir Fraser <keir.com>
xen-unstable changeset: 9616:c783f340bef82223eb5fcd88093fd919f41790b6
xen-unstable date: Tue Apr 11 09:58:04 2006 +0100

This fixes the Xen Makefile to allow correct building of cscope, TAGS
and tags. Prior to this the asm directory was not constructed correctly
for the "find" command. "xen\13cope.*" has been added to ".hgignore".

Signed-off-by: Aravindh Puthiyaparambil
               <aravindh.puthiyaparambil.com>
xen-unstable changeset: 9629:4f0ecc016cd1ebda3bff176c8c01113c35b05c7b
xen-unstable date: Thu Apr 13 10:45:43 2006 +0100

Clean up xen Makefile. Use _-prefixed rules to avoid a
comparsion with XEN_ROOT variable.

Signed-off-by: Keir Fraser <keir.com>
xen-unstable changeset: 9630:c9d706834d25a9efe5bd3a98cbf32c6998f30ab4
xen-unstable date: Thu Apr 13 10:57:57 2006 +0100

In some cases, say for instance for some bizzare reason
the tree was checked out of CVS, which doens't neccessarily
store file permissions, mkbuildtree may not be executable.
So run them explicitly via bash.

Signed-Off-By: Horms <horms.net.au>
xen-unstable changeset: 9636:3c05406f5e0acc37eb3e59311c7d1c3cf245dc29
xen-unstable date: Thu Apr 13 11:24:00 2006 +0100

Fix "make debug" in Xen subtree. Pointed out by Aravindh
at Unisys.

Signed-off-by: Keir Fraser <keir.com>
xen-unstable changeset: 9736:25e4cd1c3d269022dc6c75dfddac9710e092f575
xen-unstable date: Tue Apr 25 08:54:36 2006 +0100

Fix fault handler for both 32 and 64 bit architecture. Clean up unused code.
Signed-off-by: Grzegorz Milos <gm281.ac.uk>
Signed-off-by: Aravindh Puthiyaparambil
<aravindh.puthiyaparambil.com>
xen-unstable changeset: 9923:62c8e97d56cfea3708a2bd308330d71047623888
xen-unstable date: Thu May  4 11:19:27 2006 +0100

Make Xen version numbers more flexible.

Signed-off-by: Christian Limpach <Christian.Limpach.cam.ac.uk>
xen-unstable changeset: 9958:c51c1e7ce0a343e02d31c691b317092387505f4c
xen-unstable date: Mon May  8 16:41:22 2006 +0100

Make cscope hgignore wildcard a little bit less permissive.

Signed-off-by: Christian Limpach <Christian.Limpach.cam.ac.uk>
xen-unstable changeset: 9959:4bc1229b257391aa4de6c95796d42d6d7009dc33
xen-unstable date: Mon May  8 17:18:19 2006 +0100

94 files changed:
.hgignore
Config.mk
Makefile
buildconfigs/Rules.mk
buildconfigs/mk.linux-2.6-xen
docs/Makefile
extras/mini-os/Makefile
linux-2.6-xen-sparse/mkbuildtree
tools/Makefile
tools/Rules.mk
tools/blktap/Makefile
tools/blktap/parallax/Makefile
tools/blktap/ublkback/Makefile
tools/check/Makefile
tools/console/Makefile
tools/console/testsuite/Makefile
tools/debugger/gdb/gdbbuild
tools/debugger/libxendebug/Makefile
tools/debugger/pdb/Makefile
tools/debugger/pdb/linux-2.6-module/Makefile
tools/debugger/pdb/linux-2.6-patches/Makefile
tools/examples/Makefile
tools/firmware/Makefile
tools/firmware/acpi/Makefile
tools/firmware/hvmloader/Makefile
tools/firmware/rombios/Makefile
tools/firmware/vgabios/Makefile
tools/firmware/vmxassist/Makefile
tools/guest-headers/Makefile
tools/ioemu/Makefile
tools/ioemu/target-i386-dm/Makefile
tools/libxc/Makefile
tools/misc/Makefile
tools/misc/cpuperf/Makefile
tools/misc/lomount/Makefile
tools/misc/mbootpack/Makefile
tools/misc/miniterm/Makefile
tools/misc/nsplitd/Makefile
tools/misc/xen-clone
tools/pygrub/Makefile
tools/python/Makefile
tools/security/Makefile
tools/sv/Makefile
tools/tests/Makefile
tools/vnet/Makefile
tools/vnet/doc/Makefile
tools/vnet/examples/Makefile
tools/vnet/libxutil/Makefile
tools/vnet/scripts/Makefile
tools/vnet/vnetd/Makefile
tools/vtpm/Makefile
tools/vtpm_manager/Makefile
tools/vtpm_manager/crypto/Makefile
tools/vtpm_manager/manager/Makefile
tools/vtpm_manager/tcs/Makefile
tools/vtpm_manager/util/Makefile
tools/xcutils/Makefile
tools/xenmon/Makefile
tools/xenstat/libxenstat/Makefile
tools/xenstat/xentop/Makefile
tools/xenstore/Makefile
tools/xentrace/Makefile
xen/Makefile
xen/Post.mk [deleted file]
xen/Rules.mk
xen/acm/Makefile
xen/arch/ia64/Makefile
xen/arch/ia64/linux-xen/Makefile
xen/arch/ia64/linux/Makefile
xen/arch/ia64/tools/privop/Makefile
xen/arch/ia64/vmx/Makefile
xen/arch/ia64/xen/Makefile
xen/arch/x86/Makefile
xen/arch/x86/Rules.mk
xen/arch/x86/acpi/Makefile
xen/arch/x86/cpu/Makefile
xen/arch/x86/cpu/mcheck/Makefile
xen/arch/x86/cpu/mtrr/Makefile
xen/arch/x86/genapic/Makefile
xen/arch/x86/hvm/Makefile
xen/arch/x86/hvm/svm/Makefile
xen/arch/x86/hvm/svm/x86_32/Makefile
xen/arch/x86/hvm/svm/x86_64/Makefile
xen/arch/x86/hvm/vmx/Makefile
xen/arch/x86/hvm/vmx/x86_32/Makefile
xen/arch/x86/hvm/vmx/x86_64/Makefile
xen/arch/x86/x86_32/Makefile
xen/arch/x86/x86_64/Makefile
xen/common/Makefile
xen/drivers/Makefile
xen/drivers/acpi/Makefile
xen/drivers/char/Makefile
xen/tools/Makefile
xen/tools/figlet/Makefile

index b27604e4b2e13151afeebd6ee407885be7d72e16..74e7987eae67e53f63b5f8f51f60c0d13495bcb1 100644 (file)
--- a/.hgignore
+++ b/.hgignore
@@ -14,6 +14,7 @@
 .*\.orig$
 .*\.rej$
 .*/a\.out$
+.*/cscope\.*$
 ^[^/]*\.bz2$
 ^TAGS$
 ^dist/.*$
index 7cea3953c5ddf1b8fcf099d789ecb2d08e7ca355..2b15addd12e762508512cbe2629d41e94689cdad 100644 (file)
--- a/Config.mk
+++ b/Config.mk
@@ -24,6 +24,7 @@ OBJCOPY    = $(CROSS_COMPILE)objcopy
 OBJDUMP    = $(CROSS_COMPILE)objdump
 
 DISTDIR     ?= $(XEN_ROOT)/dist
+DESTDIR     ?= /
 
 INSTALL      = install
 INSTALL_DIR  = $(INSTALL) -d -m0755
index 3cd9d53b99f83190668b12a65ce4b5b42dd34ac8..625c81c66629124a90d91b8f0ac9594cd727ebe3 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@ export XEN_TARGET_ARCH SUBARCH XEN_SYSTYPE
 endif
 
 # Default target must appear before any include lines
+.PHONY: all
 all: dist
 
 XEN_ROOT=$(CURDIR)
@@ -24,12 +25,11 @@ ifeq ($(XEN_TARGET_X86_PAE),y)
 export pae=y
 endif
 
-.PHONY:        all dist install xen kernels tools dev-docs docs world clean
-.PHONY:        mkpatches mrproper kbuild kdelete kclean
-
 # build and install everything into the standard system directories
+.PHONY: install
 install: install-xen install-kernels install-tools install-docs
 
+.PHONY: build
 build: kernels
        $(MAKE) -C xen build
        $(MAKE) -C tools build
@@ -38,10 +38,12 @@ build: kernels
 # The test target is for unit tests that can run without an installation.  Of
 # course, many tests require a machine running Xen itself, and these are
 # handled elsewhere.
+.PHONY: test
 test:
        $(MAKE) -C tools/python test
 
 # build and install everything into local dist directory
+.PHONY: dist
 dist: DESTDIR=$(DISTDIR)/install
 dist: dist-xen dist-kernels dist-tools dist-docs
        $(INSTALL_DIR) $(DISTDIR)/check
@@ -54,79 +56,83 @@ dist-%: install-%
        @: # do nothing
 
 # Legacy dist targets
+.PHONY: xen tools kernels docs
 xen: dist-xen
 tools: dist-tools
 kernels: dist-kernels
 docs: dist-docs
 
+.PHONY: prep-kernels
 prep-kernels:
        for i in $(XKERNELS) ; do $(MAKE) $$i-prep || exit 1; done
 
+.PHONY: install-xen
 install-xen:
        $(MAKE) -C xen install
 
+.PHONY: install-tools
 install-tools:
        $(MAKE) -C tools install
 
+.PHONY: install-kernels
 install-kernels:
        for i in $(XKERNELS) ; do $(MAKE) $$i-install || exit 1; done
 
+.PHONY: install-docs
 install-docs:
        sh ./docs/check_pkgs && $(MAKE) -C docs install || true
 
+.PHONY: dev-docs
 dev-docs:
        $(MAKE) -C docs dev-docs
 
 # Build all the various kernels and modules
+.PHONY: kbuild
 kbuild: kernels
 
 # Delete the kernel build trees entirely
+.PHONY: kdelete
 kdelete:
        for i in $(XKERNELS) ; do $(MAKE) $$i-delete ; done
 
 # Clean the kernel build trees
+.PHONY: kclean
 kclean:
        for i in $(XKERNELS) ; do $(MAKE) $$i-clean ; done
 
 # Make patches from kernel sparse trees
+.PHONY: mkpatches
 mkpatches:
        for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-xen.patch; done
 
 # build xen, the tools, and a domain 0 plus unprivileged linux-xen images,
 # and place them in the install directory. 'make install' should then
 # copy them to the normal system directories
+.PHONY: world
 world: 
        $(MAKE) clean
        $(MAKE) kdelete
        $(MAKE) dist
 
 # clean doesn't do a kclean
+.PHONY: clean
 clean:: 
        $(MAKE) -C xen clean
        $(MAKE) -C tools clean
        $(MAKE) -C docs clean
 
 # clean, but blow away kernel build tree plus tarballs
+.PHONY: distclean
 distclean: clean
        rm -rf dist patches/tmp
        for i in $(ALLKERNELS) ; do $(MAKE) $$i-delete ; done
        for i in $(ALLSPARSETREES) ; do $(MAKE) $$i-mrproper ; done
 
 # Linux name for GNU distclean
+.PHONY: mrproper
 mrproper: distclean
 
-install-logging: LOGGING=logging-0.4.9.2
-install-logging:
-       [ -f $(LOGGING).tar.gz ] || wget http://www.red-dove.com/$(LOGGING).tar.gz
-       tar -zxf $(LOGGING).tar.gz
-       cd $(LOGGING) && python setup.py install
-
-# handy target to upgrade iptables (use rpm or apt-get in preference)
-install-iptables:
-       wget http://www.netfilter.org/files/iptables-1.2.11.tar.bz2
-       tar -jxf iptables-1.2.11.tar.bz2
-       $(MAKE) -C iptables-1.2.11 PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install
-
+.PHONY: help
 help:
        @echo 'Installation targets:'
        @echo '  install          - build and install everything'
@@ -147,25 +153,28 @@ help:
        @echo '  dev-docs         - build developer-only documentation'
        @echo ''
        @echo 'Cleaning targets:'
-       @echo '  clean            - clean the Xen, tools and docs (but not'
-       @echo '                     guest kernel) trees'
-       @echo '  distclean        - clean plus delete kernel tarballs and kernel'
-       @echo '                     build trees'
+       @echo '  clean            - clean the Xen, tools and docs (but not guest kernel trees)'
+       @echo '  distclean        - clean plus delete kernel build trees and'
+       @echo '                     local downloaded files'
        @echo '  kdelete          - delete guest kernel build trees'
        @echo '  kclean           - clean guest kernel build trees'
        @echo ''
-       @echo 'Dependency installation targets:'
-       @echo '  install-logging  - install the Python Logging package'
-       @echo '  install-iptables - install iptables tools'
-       @echo ''
        @echo 'Miscellaneous targets:'
        @echo '  prep-kernels     - prepares kernel directories, does not build'
        @echo '  mkpatches        - make patches against vanilla kernels from'
        @echo '                     sparse trees'
-       @echo '  uninstall        - attempt to remove installed Xen tools (use'
-       @echo '                     with extreme care!)'
+       @echo '  uninstall        - attempt to remove installed Xen tools'
+       @echo '                     (use with extreme care!)'
+       @echo
+       @echo 'Environment:'
+       @echo '  XEN_PYTHON_NATIVE_INSTALL=y'
+       @echo '                   - native python install or dist'
+       @echo '                     install into prefix/lib/python<VERSION>'
+       @echo '                     instead of <PREFIX>/lib/python'
+       @echo '                     true if set to non-empty value, false otherwise'
 
 # Use this target with extreme care!
+.PHONY: uninstall
 uninstall: D=$(DESTDIR)
 uninstall:
        [ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` || true
@@ -199,5 +208,6 @@ uninstall:
        rm -rf $(D)/usr/share/man/man8/xen*
 
 # Legacy targets for compatibility
+.PHONY: linux26
 linux26:
        $(MAKE) 'KERNELS=linux-2.6*' kernels
index 0a6804bc7e6b8ff231ed64c30def03b11d05ec4d..a889c32ea0f64283c89cee823b8f4259d85f56b0 100644 (file)
@@ -6,8 +6,6 @@ export DESTDIR
 ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
 ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
 
-.PHONY:        mkpatches mrproper
-
 # Setup pristine search path
 PRISTINE_SRC_PATH      ?= .:..
 vpath pristine-% $(PRISTINE_SRC_PATH)
@@ -40,29 +38,6 @@ patch-%.bz2:
        @echo "Cannot find $(@F) in path $(LINUX_SRC_PATH)"
        wget $(KERNEL_REPO)/pub/linux/kernel/v$(_LINUX_VDIR)/$(_LINUX_XDIR)/$(@F) -O./$@
 
-# Expand NetBSD release to NetBSD version
-NETBSD_RELEASE  ?= 2.0
-NETBSD_VER      ?= $(patsubst netbsd-%-xen-sparse,%,$(wildcard netbsd-$(NETBSD_RELEASE)*-xen-sparse))
-NETBSD_CVSSNAP  ?= 20050309
-
-# Setup NetBSD search path
-NETBSD_SRC_PATH        ?= .:..
-vpath netbsd-%.tar.bz2 $(NETBSD_SRC_PATH)
-
-# download a pristine NetBSD tarball if there isn't one in NETBSD_SRC_PATH
-netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2:
-       @echo "Cannot find $@ in path $(NETBSD_SRC_PATH)"
-       wget http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/$@ -O./$@
-
-netbsd-%.tar.bz2: netbsd-%-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
-       ln -fs $< $@
-
-ifeq ($(OS),linux)
-OS_VER = $(LINUX_VER)
-else
-OS_VER = $(NETBSD_VER)
-endif
-
 pristine-%: pristine-%/.valid-pristine
        @true
 
@@ -84,6 +59,7 @@ ifneq ($(PATCHDIRS),)
 $(patsubst patches/%,patches/%/.makedep,$(PATCHDIRS)): patches/%/.makedep: 
        @echo 'ref-$*/.valid-ref: $$(wildcard patches/$*/*.patch)' >$@
 
+.PHONY: clean
 clean::
        rm -f patches/*/.makedep
 
@@ -123,28 +99,22 @@ endif
 linux-2.6-xen.patch: ref-linux-$(LINUX_VER)/.valid-ref
        rm -rf tmp-$@
        cp -al $(<D) tmp-$@
-       ( cd linux-2.6-xen-sparse && ./mkbuildtree ../tmp-$@ )  
+       ( cd linux-2.6-xen-sparse && bash ./mkbuildtree ../tmp-$@ )     
        diff -Nurp $(patsubst ref%,pristine%,$(<D)) tmp-$@ > $@ || true
        rm -rf tmp-$@
 
 %-xen.patch: ref-%/.valid-ref
        rm -rf tmp-$@
        cp -al $(<D) tmp-$@
-       ( cd $*-xen-sparse && ./mkbuildtree ../tmp-$@ ) 
+       ( cd $*-xen-sparse && bash ./mkbuildtree ../tmp-$@ )    
        diff -Nurp $(patsubst ref%,pristine%,$(<D)) tmp-$@ > $@ || true
        rm -rf tmp-$@
 
-%-mrproper: %-mrproper-extra
+%-mrproper:
        rm -rf pristine-$(*)* ref-$(*)* $*.tar.bz2
        rm -rf $*-xen.patch
 
-netbsd-%-mrproper-extra:
-       rm -rf netbsd-$*-tools netbsd-$*-tools.tar.bz2
-       rm -f netbsd-$*-xen-kernel-$(NETBSD_CVSSNAP).tar.bz2
-
-%-mrproper-extra:
-       @: # do nothing
-
+.PHONY: config-update-pae
 config-update-pae:
 ifeq ($(XEN_TARGET_X86_PAE),y)
        sed -e 's!^CONFIG_HIGHMEM4G=y$$!\# CONFIG_HIGHMEM4G is not set!;s!^\# CONFIG_HIGHMEM64G is not set$$!CONFIG_HIGHMEM64G=y!' $(CONFIG_FILE) > $(CONFIG_FILE)- && mv $(CONFIG_FILE)- $(CONFIG_FILE)
index 69b3f5b554e7e11196861272b5c1b37c036143c9..46ebbc7eab076ab4c78cda6d1b71c24186271c99 100644 (file)
@@ -1,19 +1,15 @@
-
-OS           = linux
-
 LINUX_SERIES = 2.6
 LINUX_VER    = 2.6.16
 LINUX_SRCS = linux-2.6.16.tar.bz2
 
 EXTRAVERSION ?= xen
 
-LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
+LINUX_DIR    = linux-$(LINUX_VER)-$(EXTRAVERSION)
 
 include buildconfigs/Rules.mk
 
-.PHONY: build clean delete
-
 # The real action starts here!
+.PHONY: build
 build: $(LINUX_DIR)/include/linux/autoconf.h
        if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
            $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
@@ -22,12 +18,12 @@ build: $(LINUX_DIR)/include/linux/autoconf.h
        $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) vmlinuz
        $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
 
-$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
+$(LINUX_DIR)/include/linux/autoconf.h: ref-linux-$(LINUX_VER)/.valid-ref
        rm -rf $(LINUX_DIR)
        cp -al $(<D) $(LINUX_DIR)
        # Apply arch-xen patches
-       ( cd linux-$(LINUX_SERIES)-xen-sparse ; \
-          LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
+       ( cd linux-$(LINUX_SERIES)-xen-sparse && \
+          LINUX_ARCH=$(LINUX_ARCH) bash ./mkbuildtree ../$(LINUX_DIR) )
        # Re-use config from install dir if one exits else use default config
        CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
        [ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
@@ -42,14 +38,18 @@ $(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
          rm -f Makefile ; mv Mk.tmp Makefile )
        $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
 
+.PHONY: prep
 prep: $(LINUX_DIR)/include/linux/autoconf.h
 
+.PHONY: config
 config: CONFIGMODE = menuconfig
 config: $(LINUX_DIR)/include/linux/autoconf.h
        $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
 
+.PHONY: clean
 clean::
        $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
 
+.PHONY: delete
 delete: 
-       rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 
+       rm -rf tmp-linux-$(LINUX_VER) $(LINUX_DIR) 
index 51bde8661f07075bac2bceffe1d7bc240d2afa35..196475042796d5b1097969735df100ecc8bb0637 100644 (file)
@@ -26,22 +26,28 @@ DOC_HTML    := $(patsubst src/%.tex,html/%/index.html,$(DOC_TEX))
 
 GFX = $(patsubst %.fig, %.eps, $(wildcard figs/*.fig))
 
-.PHONY:        all build dev-docs python-dev-docs ps pdf html clean install
-
+.PHONY: all
 all: build
+
+.PHONY: build
 build: ps pdf html man-pages
        rm -f *.aux *.dvi *.bbl *.blg *.glo *.idx *.ilg *.log *.ind *.toc
 
+.PHONY: dev-docs
 dev-docs: python-dev-docs
 
+.PHONY: ps
 ps: $(DOC_PS)
 
+.PHONY: pdf
 pdf: $(DOC_PDF)
 
+.PHONY: html
 html:
        @if which $(LATEX2HTML) 1>/dev/null 2>/dev/null; then \
        $(MAKE) $(DOC_HTML); fi
 
+.PHONY: python-dev-docs
 python-dev-docs:
        @mkdir -v -p api/tools/python
        @if which $(DOXYGEN) 1>/dev/null 2>/dev/null; then         \
@@ -50,6 +56,7 @@ python-dev-docs:
        $(MAKE) -C api/tools/python/latex ; else                   \
         echo "Doxygen not installed; skipping python-dev-docs."; fi
 
+.PHONY: man-pages
 man-pages:
        @if which $(POD2MAN) 1>/dev/null 2>/dev/null; then \
        $(MAKE) $(DOC_MAN1) $(DOC_MAN5); fi
@@ -64,6 +71,7 @@ man5/%.5: man/%.pod.5 Makefile
        $(POD2MAN) --release=$(VERSION) --name=`echo $@ | sed 's/^man5.//'| \
                sed 's/.5//'` -s 5 -c "Xen" $< $@
 
+.PHONY: clean
 clean:
        rm -rf .word_count *.aux *.dvi *.bbl *.blg *.glo *.idx *~ 
        rm -rf *.ilg *.log *.ind *.toc *.bak core
@@ -72,6 +80,7 @@ clean:
        rm -rf man5
        rm -rf man1
 
+.PHONY: install
 install: all
        rm -rf $(DESTDIR)$(pkgdocdir)
        $(INSTALL_DIR) $(DESTDIR)$(pkgdocdir)
index d541677f97e7779812dddbe4c8ce480ab24ced9c..3a31e3a0d602bc59f8a596c2c236d8c4189463d5 100644 (file)
@@ -37,8 +37,10 @@ OBJS += $(patsubst %.c,%.o,$(wildcard console/*.c))
 HDRS := $(wildcard include/*.h)
 HDRS += $(wildcard include/xen/*.h)
 
+.PHONY: default
 default: $(TARGET)
 
+.PHONY: links
 links:
        [ -e include/xen ] || ln -sf ../../../xen/include/public include/xen
 
@@ -46,6 +48,7 @@ $(TARGET): links $(OBJS)
        $(LD) -N -T minios-$(TARGET_ARCH).lds $(OBJS) -o $@.elf
        gzip -f -9 -c $@.elf >$@.gz
 
+.PHONY: clean
 clean:
        find . -type f -name '*.o' | xargs rm -f
        rm -f *.o *~ core $(TARGET).elf $(TARGET).raw $(TARGET) $(TARGET).gz
@@ -57,4 +60,12 @@ clean:
 %.o: %.S $(HDRS) Makefile
        $(CC) $(CFLAGS) -D__ASSEMBLY__ -c $< -o $@
 
+define all_sources
+     ( find . -follow -name SCCS -prune -o -name '*.[chS]' -print )
+endef
+
+.PHONY: cscope
+cscope:
+       $(all_sources) > cscope.files
+       cscope -k -b -q
 
index 5c70db12a48369d73170d7abc5641cf93b3163b5..37d43f728ea795650df124ff484ea6b5ad654c3e 100755 (executable)
@@ -90,8 +90,8 @@ abs_to_rel ${AD} ${AS}
 RS=$DESTPATH
 
 # Arch-specific pre-processing
-if [ -x arch/${LINUX_ARCH}/xen-mkbuildtree-pre ]; then
-       arch/${LINUX_ARCH}/xen-mkbuildtree-pre
+if [ -e arch/${LINUX_ARCH}/xen-mkbuildtree-pre ]; then
+       bash arch/${LINUX_ARCH}/xen-mkbuildtree-pre
 fi
 
 # Remove old copies of files and directories at the destination
@@ -115,6 +115,6 @@ relative_lndir ../../../${RS}/../xen/include/public
 
 # Arch-specific post-processing
 cd ${AD}
-if [ -x arch/${LINUX_ARCH}/xen-mkbuildtree-post ]; then
-       arch/${LINUX_ARCH}/xen-mkbuildtree-post
+if [ -e arch/${LINUX_ARCH}/xen-mkbuildtree-post ]; then
+       bash arch/${LINUX_ARCH}/xen-mkbuildtree-post
 fi
index 375b5633b53ea12b39b07761ab719218d89c182e..69fefef6473815fdcb5ea6a5f34265f810e12701 100644 (file)
@@ -24,14 +24,14 @@ SUBDIRS += python
 SUBDIRS += pygrub
 endif
 
-.PHONY: all install clean check check_clean ioemu eioemuinstall ioemuclean
-
+.PHONY: all
 all: check
        @set -e; for subdir in $(SUBDIRS); do \
                $(MAKE) -C $$subdir $@; \
        done
        $(MAKE) ioemu
 
+.PHONY: install
 install: check
        @set -e; for subdir in $(SUBDIRS); do \
                $(MAKE) -C $$subdir $@; \
@@ -39,18 +39,22 @@ install: check
        $(MAKE) ioemuinstall
        $(INSTALL_DIR) -p $(DESTDIR)/var/xen/dump
 
+.PHONY: clean
 clean: check_clean
        @set -e; for subdir in $(SUBDIRS); do \
                $(MAKE) -C $$subdir $@; \
        done
        $(MAKE) ioemuclean
 
+.PHONY: check
 check:
        $(MAKE) -C check
 
+.PHONY: check_clean
 check_clean:
        $(MAKE) -C check clean
 
+.PHONY: ioemu ioemuinstall ioemuclean
 ifndef XEN_NO_IOEMU
 ioemu ioemuinstall ioemuclean:
        [ -f ioemu/config-host.h ] || \
index f2fcd2a81102a19d7c72c2cb815b5c06ebb390be..49314d9fd720066e3bd3eaba22aac402ce3d5097 100644 (file)
@@ -23,6 +23,7 @@ CFLAGS += -D__XEN_INTERFACE_VERSION__=0x00030101
 %.o: %.cc
        $(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
 
+.PHONY: mk-symlinks
 mk-symlinks: LINUX_ROOT=$(XEN_ROOT)/linux-2.6-xen-sparse
 mk-symlinks:
        mkdir -p xen
index d4019c0252b63c68931389570d2b8acb3e1a5721..9dc571853abcb184a6d87215e8725e6073de2007 100644 (file)
@@ -39,11 +39,13 @@ IBINS   :=
 
 LIB      = libblktap.so libblktap.so.$(MAJOR) libblktap.so.$(MAJOR).$(MINOR)
 
+.PHONY: all
 all: mk-symlinks libblktap.so #blkdump
        @set -e; for subdir in $(SUBDIRS); do \
                $(MAKE) -C $$subdir $@;       \
        done
 
+.PHONY: install
 install: all
        $(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
        $(INSTALL_DIR) -p $(DESTDIR)/usr/include
@@ -54,12 +56,14 @@ install: all
                $(MAKE) -C $$subdir $@;       \
        done
 
+.PHONY: clean
 clean:
        rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) xen TAGS blkdump
        @set -e; for subdir in $(SUBDIRS); do \
                $(MAKE) -C $$subdir $@;       \
        done
 
+.PHONY: rpm
 rpm: all
        rm -rf staging
        mkdir staging
@@ -82,6 +86,7 @@ blkdump: libblktap.so
 
 .PHONY: TAGS clean install mk-symlinks rpm
 
+.PHONY: TAGS
 TAGS:
        etags -t $(SRCS) *.h
 
index a6a0c0a3f89338a90f9dc38af5155f8b4caeb633..8500c1728b822edb724097ff9c0e98a07706a0d3 100644 (file)
@@ -43,11 +43,14 @@ DEPS     = .*.d
 OBJS     = $(patsubst %.c,%.o,$(SRCS))
 IBINS    = parallax $(VDI_TOOLS)
 
+.PHONY: all
 all: $(VDI_TOOLS) parallax blockstored
 
+.PHONY: install
 install: all
        $(INSTALL_PROG) $(IBINS) $(DESTDIR)$(PARALLAX_INSTALL_DIR)
 
+.PHONY: clean
 clean:
        rm -rf *.o *~ $(DEPS) xen TAGS $(VDI_TOOLS) parallax vdi_unittest
 
@@ -57,5 +60,4 @@ parallax: $(PLX_SRCS)
 ${VDI_TOOLS}: %: %.c $(VDI_SRCS)
        $(CC) $(CFLAGS) -o $@ $@.c $(LDFLAGS) $(VDI_SRCS)
 
-.PHONY: TAGS clean install rpm
 -include $(DEPS)
index 6915d2f523128455fff1e5e5a3300a9cca246d2d..0ed19cae6b11b780d9c5dc927801d58a27b252a0 100644 (file)
@@ -21,12 +21,16 @@ DEPS     = .*.d
 
 OBJS     = $(patsubst %.c,%.o,$(SRCS))
 
+.PHONY: all
 all: $(IBIN)
 
 LINUX_ROOT := $(wildcard $(XEN_ROOT)/linux-2.6.*-xen-sparse)
 
+.PHONY: install
 install:
        $(INSTALL_PROG) $(IBIN) $(DESTDIR)$(INSTALL_DIR)
+
+.PHONY: clean
 clean:
        rm -rf *.o*~ $(DEPS) xen TAGS $(IBIN)
 
@@ -34,6 +38,4 @@ ublkback:
        $(CC) $(CFLAGS) -o ublkback -L$(XEN_LIBXC) -L. -L..  \
              -lblktap -laio ublkback.c ublkbacklib.c -pg
 
-.PHONY: clean install
-
 -include $(DEPS)
index 744f0983b59357a0d6fe4aef3368b099ca597848..4605c03c392ffa3e64aac3d15d419c326109f3ca 100644 (file)
@@ -1,7 +1,9 @@
 
+.PHONY: all
 all: build
 
 # Check this machine is OK for building on.
+.PHONY: build
 build:
        ./chk build
 
@@ -9,8 +11,10 @@ build:
 # DO NOT use this check from 'make install' in the parent
 # directory, as that target can be used to make an installable
 # copy rather than actually installing.
+.PHONY: install
 install:
        ./chk install
 
+.PHONY: clean
 clean:
-       ./chk clean
\ No newline at end of file
+       ./chk clean
index 206621d083fd916699b66bd3513f13685a15bba4..cbef956c5f204fd17a02c61704c7b63885389213 100644 (file)
@@ -16,8 +16,10 @@ CFLAGS  += -I $(XEN_XENSTORE)
 
 BIN      = xenconsoled xenconsole
 
+.PHONY: all
 all: $(BIN)
 
+.PHONY: clean
 clean:
        $(RM) *.a *.so *.o *.rpm $(BIN)
        $(RM) client/*.o daemon/*.o
@@ -30,6 +32,7 @@ xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c))
        $(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
              -lxenctrl -lxenstore
 
+.PHONY: install
 install: $(BIN)
        $(INSTALL_DIR) -p $(DESTDIR)/$(DAEMON_INSTALL_DIR)
        $(INSTALL_PROG) xenconsoled $(DESTDIR)/$(DAEMON_INSTALL_DIR)
index 2deb7d43d6ca2ea6053cfbce2cb6a419c77fb71c..71deb0a6f8296f5a67601e0a080c61b986aff32b 100644 (file)
@@ -3,10 +3,12 @@ include $(XEN_ROOT)/tools/Rules.mk
 
 LDFLAGS=-static
 
+.PHONY: all
 all: console-dom0 console-domU procpipe
 
 console-dom0: console-dom0.o
 console-domU: console-domU.o
 procpipe: procpipe.o
 
+.PHONY: clean
 clean:; $(RM) *.o console-domU console-dom0 procpipe
index fbd225a0c00d5d116110c074907a59e13e3ddea3..419adab61d00ead76d58bad4795344b9c6c8f3ed 100755 (executable)
@@ -7,7 +7,7 @@ rm -rf gdb-6.2.1 gdb-6.2.1-linux-i386-xen
 tar xjf gdb-6.2.1.tar.bz2
 
 cd gdb-6.2.1-xen-sparse
-./mkbuildtree ../gdb-6.2.1
+bash ./mkbuildtree ../gdb-6.2.1
 
 cd ..
 mkdir gdb-6.2.1-linux-i386-xen
index d0a90e12679485a011259dfbf0b183900690b891..2e16446253df4cea4bcb2366032fa0be9928e676 100644 (file)
@@ -26,10 +26,14 @@ PIC_OBJS := $(patsubst %.c,%.opic,$(SRCS))
 LIB      := libxendebug.a libxendebug.so
 LIB      += libxendebug.so.$(MAJOR) libxendebug.so.$(MAJOR).$(MINOR)
 
+.PHONY: all
 all: build
+
+.PHONY: build
 build:
        $(MAKE) $(LIB)
 
+.PHONY: install
 install: build
        [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
        [ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
@@ -39,14 +43,15 @@ install: build
        ln -sf libxendebug.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxendebug.so
        $(INSTALL_DATA) xendebug.h $(DESTDIR)/usr/include
 
-.PHONY: TAGS clean rpm install all
-
+.PHONY: TAGS
 TAGS:
        etags -t $(SRCS) *.h
 
+.PHONY: clean
 clean:
        rm -rf *.a *.so* *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
 
+.PHONY: rpm
 rpm: build
        rm -rf staging
        mkdir staging
index 1842ec7d0b2a68f898e4020b26e644147b055064..03cdc486b48f91a07bc2a5186247de1a775fe8ea 100644 (file)
@@ -33,6 +33,7 @@ LIBS       += unix str
 
 # bc = byte-code, dc = debug byte-code
 # patches = patch linux domU source code
+.PHONY: all 
 all : dc
 
 SOURCES    += pdb_caml_xc.c 
@@ -51,5 +52,6 @@ RESULT      = pdb
 include $(OCAMLMAKEFILE)
 
 PATCHDIR    = ./linux-2.6-patches
+.PHONY: patches 
 patches :
        make -C $(PATCHDIR) patches
index 609596f6c934205ae475c2a72146ee492a2a5ae5..9025cd85c1b5e830222e64b0b99e34161c765e8c 100644 (file)
@@ -10,10 +10,12 @@ CFLAGS += -g
 CFLAGS += -Wall
 CFLAGS += -Werror
 
+.PHONY: module 
 module : 
 #      make KBUILD_VERBOSE=1 ARCH=xen -C $(KDIR) M=$(PWD) modules
        make                  ARCH=xen -C $(KDIR) M=$(PWD) modules
 
+.PHONY: clean 
 clean :
        make -C $(KDIR) M=$(PWD) clean
 
index 7d062510d8cc8d1eced5ff5adb1f564a8d8eeb57..f2cb7f6ef56430f155ee3dac862f1845a7aba71e 100644 (file)
@@ -3,6 +3,7 @@ LINUX_DIR  = linux-2.6.12-xenU
 KDIR       = $(XEN_ROOT)/$(LINUX_DIR)
 PATCH_DIR  = $(CURDIR)
 
+.PHONY: patches 
 patches : patches-done
 
 patches-done :
index 37a94b6329622316c6a0c40083f6f57abcc27b69..93a8242637557f630c23a8af81175b038e9214ab 100644 (file)
@@ -50,11 +50,16 @@ HOTPLUGS=install-hotplug
 endif
 endif
 
+.PHONY: all
 all:
+
+.PHONY: build
 build:
 
+.PHONY: install
 install: all install-initd install-configs install-scripts $(HOTPLUGS)
 
+.PHONY: install-initd
 install-initd:
        [ -d $(DESTDIR)/etc/init.d ] || $(INSTALL_DIR) $(DESTDIR)/etc/init.d
        [ -d $(DESTDIR)/etc/sysconfig ] || $(INSTALL_DIR) $(DESTDIR)/etc/sysconfig
@@ -62,6 +67,7 @@ install-initd:
        $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
        $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/etc/sysconfig/xendomains
 
+.PHONY: install-configs
 install-configs: $(XEN_CONFIGS)
        [ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \
                $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
@@ -72,6 +78,7 @@ install-configs: $(XEN_CONFIGS)
            $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
        done
 
+.PHONY: install-scripts
 install-scripts:
        [ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \
                $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
@@ -84,6 +91,7 @@ install-scripts:
            $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
        done
 
+.PHONY: install-hotplug
 install-hotplug:
        [ -d $(DESTDIR)$(XEN_HOTPLUG_DIR) ] || \
                $(INSTALL_DIR) $(DESTDIR)$(XEN_HOTPLUG_DIR)
@@ -92,6 +100,7 @@ install-hotplug:
            $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_HOTPLUG_DIR); \
        done
 
+.PHONY: install-udev
 install-udev:
        [ -d $(DESTDIR)$(UDEV_RULES_DIR) ] || \
                $(INSTALL_DIR) $(DESTDIR)$(UDEV_RULES_DIR)/rules.d
@@ -102,4 +111,5 @@ install-udev:
                ln -sf ../$$i . ) \
        done
 
+.PHONY: clean
 clean:
index d0c738a41d88c32923dc97bf90dbc3a8aaa60e94..63ccb7b17ec0f7bd52b46d42a3a180510a9c728b 100644 (file)
@@ -13,8 +13,7 @@ SUBDIRS += acpi
 SUBDIRS += vmxassist
 SUBDIRS += hvmloader
 
-.PHONY: all install clean
-
+.PHONY: all
 all:
        @set -e; if ! `which bcc 1>/dev/null 2>/dev/null`; then \
        echo "***********************************************************"; \
@@ -28,10 +27,12 @@ all:
        fi
 
 
+.PHONY: install
 install: all
        [ -d $(INSTALL_DIR) ] || install -d -m0755 $(INSTALL_DIR)
        [ ! -e $(TARGET) ] || install -m0644 $(TARGET) $(INSTALL_DIR)
 
+.PHONY: clean
 clean: 
        @set -e; for subdir in $(SUBDIRS); do \
                $(MAKE) -C $$subdir $@; \
index 26d932fbeaa9effca24b033c5e9f584c18f2e527..1932b0cc7bd49a8f8ce8bf543d72f659365ff770 100644 (file)
@@ -33,6 +33,7 @@ IASL_VER=acpica-unix-20050513
 IASL_URL=http://developer.intel.com/technology/iapc/acpi/downloads/$(IASL_VER).tar.gz
 
 vpath iasl $(PATH)
+.PHONY: all
 all:$(ACPI_BIN)
 
 acpi_dsdt.c:acpi_dsdt.asl
@@ -42,6 +43,7 @@ acpi_dsdt.c:acpi_dsdt.asl
        echo "int DsdtLen=sizeof(AmlCode);" >> acpi_dsdt.c
        rm *.aml
 
+.PHONY: iasl
 iasl:
        @echo
        @echo "ACPI ASL compiler(iasl) is needed"
@@ -60,8 +62,10 @@ $(ACPI_GEN):$(C_SRC) $(H_SRC) acpi_dsdt.c
 $(ACPI_BIN):$(ACPI_GEN)
        ./$(ACPI_GEN) $(ACPI_BIN)
 
+.PHONY: clean
 clean:
        rm -rf *.o $(ACPI_GEN) $(ACPI_BIN) $(IASL_VER) 
        rm -rf  $(IASL_VER).tar.gz
 
+.PHONY: install
 install: all
index ea74f7bf1881818c2986500dbbe0b8a29eaf4bd1..7d76d8002d04aa90d86bb0dfc5d6086d4228258a 100644 (file)
@@ -42,6 +42,7 @@ OBJCOPY  = objcopy
 CFLAGS  += $(DEFINES) -I. $(XENINC) -fno-builtin -O2 -msoft-float
 LDFLAGS  = -m32 -nostdlib -Wl,-N -Wl,-Ttext -Wl,$(LOADADDR)
 
+.PHONY: all
 all: hvmloader
 
 hvmloader: roms.h hvmloader.c acpi_madt.c
@@ -57,6 +58,7 @@ roms.h:       ../rombios/BIOS-bochs-latest ../vgabios/VGABIOS-lgpl-latest.bin ../vgabi
        ./mkhex vmxassist ../vmxassist/vmxassist.bin >> roms.h
        ./mkhex acpi ../acpi/acpi.bin >> roms.h
 
+.PHONY: clean
 clean:
        rm -f roms.h acpi.h
        rm -f hvmloader hvmloader.tmp hvmloader.o $(OBJECTS)
index 0624e81e963e4eb72b9bb6bba1ae93798163a7a8..3f4200df256002d843af50b3a1121380fde8b4e0 100644 (file)
@@ -3,10 +3,13 @@ BIOS_BUILDS = BIOS-bochs-latest
 #BIOS_BUILDS += BIOS-bochs-4-processors
 #BIOS_BUILDS += BIOS-bochs-8-processors
 
+.PHONY: all
 all: bios
 
+.PHONY: bios
 bios: biossums ${BIOS_BUILDS}
 
+.PHONY: clean
 clean:
        rm -f  *.o *.a *.s rombios.bin _rombios*_.c
        rm -f  as86-sym.txt ld86-sym.txt 
index 2b27e01f7c9c8ce8736b986f489218b1b1ebe453..b5482ea8c72776029bd6cb991a7be20376149258 100644 (file)
@@ -10,17 +10,22 @@ RELVERS = `pwd | sed "s-.*/--" | sed "s/vgabios//" | sed "s/-//"`
 
 VGABIOS_DATE = "-DVGABIOS_DATE=\"$(RELDATE)\""
 
+.PHONY: all
 all: bios cirrus-bios
 
+.PHONY: bios
 bios: biossums vgabios.bin vgabios.debug.bin 
 
+.PHONY: cirrus-bios
 cirrus-bios: vgabios-cirrus.bin vgabios-cirrus.debug.bin
 
+.PHONY: clean
 clean:
        rm -f biossums *.o *.s *.ld86 \
           temp.awk.* vgabios*.orig _vgabios_* _vgabios-debug_* core vgabios*.bin vgabios*.txt $(RELEASE).bin *.bak
        rm -f VGABIOS-lgpl-latest*.bin
 
+.PHONY: release
 release: 
        VGABIOS_VERS=\"-DVGABIOS_VERS=\\\"$(RELVERS)\\\"\" make bios cirrus-bios
        /bin/rm -f  *.o *.s *.ld86 \
index a31f8e2475aa6b0a29363917cfd404bb420886b3..08fea457817a5e5d5750943cc4e1f91db652e53c 100644 (file)
@@ -43,6 +43,7 @@ LDFLAGS  = -m elf_i386
 
 OBJECTS = head.o trap.o vm86.o setup.o util.o
 
+.PHONY: all
 all: vmxassist.bin
 
 vmxassist.bin: vmxassist.ld $(OBJECTS)
@@ -74,6 +75,7 @@ offsets.h: gen
 gen:   vm86.h gen.c
        $(HOSTCC) $(HOSTCFLAGS) -I. $(XENINC) -o gen gen.c
 
+.PHONY: clean
 clean:
        rm -f vmxassist vmxassist.tmp vmxassist.bin vmxassist.run vmxassist.sym head.s
        rm -f $(OBJECTS)
index ce9395a8ab7c01dd9798e70a3d3cfad241a1fecf..dc1456667f75c5439a73eff92ef4030c3deaedeb 100644 (file)
@@ -2,12 +2,16 @@
 XEN_ROOT=../..
 linuxsparsetree = $(XEN_ROOT)/linux-2.6-xen-sparse
 
+.PHONY: all
 all:
 
+.PHONY: check
 check:
 
+.PHONY: install
 install:
        mkdir -p $(DESTDIR)/usr/include/xen/linux
        install -m0644 $(linuxsparsetree)/include/xen/public/*.h $(DESTDIR)/usr/include/xen/linux
 
+.PHONY: clean
 clean:
index 09c69c77ec2b76e5714a4dfef6b6ef145b5959e6..d17550f4bf74f2b46cf01fd1be40c26f69baf0b6 100644 (file)
@@ -19,6 +19,7 @@ LDFLAGS+=-static
 endif
 #DOCS=qemu-doc.html qemu-tech.html qemu.1
 
+.PHONY: all
 all: $(DOCS) HEADERS
        for d in $(TARGET_DIRS); do \
        $(MAKE) -C $$d $@ || exit 1 ; \
@@ -30,6 +31,7 @@ qemu-img: qemu-img.c block.c block-cow.c block-qcow.c aes.c block-vmdk.c block-c
 dyngen$(EXESUF): dyngen.c
        $(HOST_CC) $(CFLAGS) $(DEFINES) -o $@ $^
 
+.PHONY: clean
 clean:
 # avoid old build problems by removing potentially incorrect old files
        rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h 
@@ -41,6 +43,7 @@ clean:
        rm -f config-host.mak config-host.h
        rm -f keysym_adapter_sdl.h keysym_adapter_vnc.h
 
+.PHONY: distclean
 distclean: clean
        rm -f config-host.mak config-host.h
        rm -f keysym_adapter_sdl.h keysym_adapter_vnc.h
@@ -52,6 +55,7 @@ KEYMAPS=da     en-gb  et  fr     fr-ch  is  lt  modifiers  no  pt-br  sv \
 ar      de     en-us  fi  fr-be  hr     it  lv  nl         pl  ru     th \
 common  de-ch  es     fo  fr-ca  hu     ja  mk  nl-be      pt  sl     tr
 
+.PHONY: install
 install: all 
        mkdir -p "$(bindir)"
        mkdir -p "$(DESTDIR)/$(datadir)"
@@ -62,9 +66,11 @@ install: all
         done
 
 # various test targets
+.PHONY: test speed test2
 test speed test2: all
        $(MAKE) -C tests $@
 
+.PHONY: TAGS
 TAGS: 
        etags *.[ch] tests/*.[ch]
 
@@ -79,6 +85,7 @@ qemu.1: qemu-doc.texi
 FILE=qemu-$(shell cat VERSION)
 
 # tar release (use 'make -k tar' on a checkouted tree)
+.PHONY: tar
 tar:
        rm -rf /tmp/$(FILE)
        cp -r . /tmp/$(FILE)
@@ -86,6 +93,7 @@ tar:
        rm -rf /tmp/$(FILE)
 
 # generate a binary distribution
+.PHONY: tarbin
 tarbin:
        ( cd $(DESTDIR) ; tar zcvf ~/qemu-$(VERSION)-i386.tar.gz \
        $(DESTDIR)/$(bindir)/qemu $(DESTDIR)/$(bindir)/qemu-fast \
@@ -100,6 +108,7 @@ ifneq ($(wildcard .depend),)
 include .depend
 endif
 
+.PHONY: HEADERS
 HEADERS:
 
 ifdef CONFIG_SDL
index 3219711167ff5139e3d2ebfa374b250658444376..c5dcc83208ab496b5506270b4e7e6dc00d7239e3 100644 (file)
@@ -329,6 +329,7 @@ sdl.o: sdl.c keyboard_rdesktop.c
 sdlaudio.o: sdlaudio.c
        $(CC) $(CFLAGS) $(DEFINES) $(SDL_CFLAGS) -c -o $@ $<
 
+.PHONY: depend
 depend: $(SRCS)
        $(CC) -MM $(CFLAGS) $(DEFINES) $^ 1>.depend
 
@@ -382,12 +383,15 @@ mixeng.o: mixeng.c mixeng.h mixeng_template.h
 %.o: %.S
        $(CC) $(DEFINES) -c -o $@ $<
 
+.PHONY: clean
 clean:
        rm -rf *.o  *.a *~ $(PROGS) gen-op.h opc.h op.h nwfpe slirp
        rm -rf config.mak config.h
 
+.PHONY: distclean
 distclean: clean
 
+.PHONY: install
 install: all 
        if [ ! -d $(INSTALL_DIR) ];then mkdir -p $(INSTALL_DIR);fi
        if [ ! -d $(DESTDIR)$(configdir) ];then mkdir -p $(DESTDIR)$(configdir);fi
index cbe5855a1d3e0376f23afa92afa30cb83d358b1b..e4a6ac798af9b445a75234d2383150cf65de0c65 100644 (file)
@@ -67,10 +67,14 @@ LIB += libxenctrl.so libxenctrl.so.$(MAJOR) libxenctrl.so.$(MAJOR).$(MINOR)
 LIB += libxenguest.a
 LIB += libxenguest.so libxenguest.so.$(MAJOR) libxenguest.so.$(MAJOR).$(MINOR)
 
+.PHONY: all
 all: build
+
+.PHONY: build
 build: check-for-zlib mk-symlinks
        $(MAKE) $(LIB)
 
+.PHONY: check-for-zlib
 check-for-zlib:
        @if [ ! -e /usr/include/zlib.h ]; then \
        echo "***********************************************************"; \
@@ -79,6 +83,7 @@ check-for-zlib:
        false; \
        fi
 
+.PHONY: install
 install: build
        [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
        [ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
@@ -94,14 +99,15 @@ install: build
        ln -sf libxenguest.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenguest.so
        $(INSTALL_DATA) xenguest.h $(DESTDIR)/usr/include
 
-.PHONY: TAGS clean rpm install all
-
+.PHONY: TAGS
 TAGS:
        etags -t *.c *.h
 
+.PHONY: clean
 clean:
        rm -rf *.a *.so* *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
 
+.PHONY: rpm
 rpm: build
        rm -rf staging
        mkdir staging
index 003947c8e31e60e2df8e44c2033c770f0c8f400e..eb110d7e2b2f5337986389cf958a6618edec2ed6 100644 (file)
@@ -18,7 +18,10 @@ TARGETS  = xenperf xc_shadow
 INSTALL_BIN  = $(TARGETS) xencons
 INSTALL_SBIN = netfix xm xen-bugtool xend xenperf
 
+.PHONY: all
 all: build
+
+.PHONY: build
 build: $(TARGETS)
        $(MAKE) -C miniterm
        $(MAKE) -C cpuperf
@@ -27,6 +30,7 @@ ifneq ($(XEN_TARGET_ARCH),ia64)
 endif
        $(MAKE) -C lomount
 
+.PHONY: install
 install: build
        [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
        [ -d $(DESTDIR)/usr/sbin ] || $(INSTALL_DIR) $(DESTDIR)/usr/sbin
@@ -39,6 +43,7 @@ install: build
 #       Likewise mbootpack
 #      $(MAKE) -C mbootpack install
 
+.PHONY: clean
 clean:
        $(RM) *.o $(TARGETS) *~
        $(MAKE) -C miniterm clean
index 185660efcb537d7f76c8c7083a8369f4dca87170..932c5e82b5cc245064fa8cab80db8d7ac3062981 100644 (file)
@@ -26,8 +26,10 @@ TARGETS      = cpuperf-xen cpuperf-perfcntr
 INSTALL_BIN  = $(TARGETS)
 
 
+.PHONY: all
 all: $(TARGETS)
 
+.PHONY: clean
 clean:
        $(RM) *.o $(TARGETS)
 
@@ -40,6 +42,7 @@ cpuperf-xen: cpuperf.c $(HDRS) Makefile
 cpuperf-perfcntr: cpuperf.c $(HDRS) Makefile
        $(CC) $(CFLAGS) -DPERFCNTR -o $@ $<
 
+.PHONY: install
 install: all
        $(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin
 
index 1a47c0b45fb75919331fdfe1c7e497de9397b282..0ed470b1d3c515ddf7702dcd17c7b1c045a008c7 100644 (file)
@@ -13,12 +13,17 @@ OBJS     = $(patsubst %.c,%.o,$(wildcard *.c))
 
 BIN      = lomount
 
+.PHONY: all
 all: build
+
+.PHONY: build
 build: $(BIN)
 
+.PHONY: install
 install: build
        $(INSTALL_PROG) $(BIN) $(SCRIPTS) $(DESTDIR)/usr/bin
 
+.PHONY: clean
 clean:
        $(RM) *.a *.so *.o *.rpm $(BIN)
 
index d1e3334bf787358d506308d38440b0d5b0ae8e79..18116688f3219439254361e78332de81bb507473 100644 (file)
@@ -8,9 +8,13 @@ INSTALL_DIR    = $(INSTALL) -d -m0755
 XEN_ROOT=../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
+.PHONY: all
 all: build
+
+.PHONY: build
 build: mbootpack
 
+.PHONY: install
 install: build
        $(INSTALL_PROG) mbootpack $(DESTDIR)/usr/bin
 
@@ -33,6 +37,7 @@ DEPS     = .*.d
 mbootpack: $(OBJS)
        $(HOSTCC) -o $@ $(filter-out %.a, $^)
 
+.PHONY: clean
 clean:
        $(RM) mbootpack *.o $(DEPS) bootsect setup bzimage_header.c bin2c
 
@@ -60,7 +65,6 @@ buildimage.c: bzimage_header.c
 %.o: %.c
        $(HOSTCC) $(DEPFLAGS) $(CFLAGS) $(INCS) $(DEFS) -c $< -o $@
 
-.PHONY: all clean gdb
 .PRECIOUS: $(OBJS) $(OBJS:.o=.c) $(DEPS)
 .SUFFIXES: 
 
index 6229d6b95b94f8529c5adbfa21c0703998218de9..5b596a5f9f91025329ce588270c48f8099e917e9 100644 (file)
@@ -7,12 +7,15 @@ INSTALL_DIR   = $(INSTALL) -d -m0755
 
 TARGET = miniterm
 
+.PHONY: all
 all: $(TARGET)
 
+.PHONY: install
 install: all
        [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
        $(INSTALL_PROG) $(TARGET) $(DESTDIR)/usr/bin
 
+.PHONY: clean
 clean:
        $(RM) *.o $(TARGET) *~
 
index 8880ceabf7a760f2d0496808e4081f008082a128..d15bb4d12bd6d3651b9bb8968668cb1ef823110b 100644 (file)
@@ -8,10 +8,13 @@ OBJS     = $(patsubst %.c,%.o,$(wildcard *.c))
 
 TARGET   = nsplitd
 
+.PHONY: all
 all: $(TARGET)
 
+.PHONY: install
 install: all
 
+.PHONY: clean
 clean:
        $(RM) *.o $(TARGET) *~
 
index 2d0bea66ae85397723dcd620b77c2c01c3a4a85d..1c852b106c248bcfd61fe80f6c809cb5dd2f12ad 100755 (executable)
@@ -113,7 +113,7 @@ else
 
  # Turn linux into xenolinux then build it
  cd xenolinux-${LINUX_VER}-sparse
- ./mkbuildtree ../../linux-${LINUX_VER}
bash ./mkbuildtree ../../linux-${LINUX_VER}
  cd ../..
  mv linux-${LINUX_VER} xenolinux-${LINUX_VER}
  cd xenolinux-${LINUX_VER}
index 5b6dab74baf0536f4239f64fe04371dd06994f41..f0f6d2e7df43068d3edb6268fd73acd5a5a3a155 100644 (file)
@@ -2,10 +2,13 @@
 XEN_ROOT = ../..
 include $(XEN_ROOT)/tools/Rules.mk
 
+.PHONY: all
 all: build
+.PHONY: build
 build:
        CFLAGS="$(CFLAGS)" python setup.py build
 
+.PHONY: install
 ifndef XEN_PYTHON_NATIVE_INSTALL
 install: all
        CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix=""
@@ -14,5 +17,6 @@ install: all
        CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)"
 endif
 
+.PHONY: clean
 clean:
        rm -rf build tmp *.pyc *.pyo *.o *.a *~
index c8df998fcc330db4fbbeb3f5fa37fca573634212..e73d624414a08391dbb57f1040e6cd7f3e94ff39 100644 (file)
@@ -1,12 +1,14 @@
 XEN_ROOT = ../..
 include $(XEN_ROOT)/tools/Rules.mk
 
-.PHONY: all build install clean
-
+.PHONY: all
 all: build
+
+.PHONY: build
 build:
        CFLAGS="$(CFLAGS)" python setup.py build
 
+.PHONY: install
 ifndef XEN_PYTHON_NATIVE_INSTALL
 install: all
        CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force
@@ -15,8 +17,10 @@ install: all
        CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
 endif
 
+.PHONY: test
 test:
        export LD_LIBRARY_PATH=$$(readlink -f ../libxc):$$(readlink -f ../xenstore); python test.py -b -u
 
+.PHONY: clean
 clean:
        rm -rf build *.pyc *.pyo *.o *.a *~
index 75646c6f4696c15deb35e212f1c39eb5ee2c2fa6..7ac197b8549297cb46d88a8cd3c53500c0575086 100644 (file)
@@ -54,8 +54,10 @@ ACM_POLICY_SUFFIX = security_policy.xml
 ACM_LABEL_SUFFIX  = security_label_template.xml
 
 ifeq ($(ACM_SECURITY),y)
+.PHONY: all
 all: build
 
+.PHONY: install
 install: all $(ACM_CONFIG_FILE)
        $(INSTALL_DIR) -p $(DESTDIR)/usr/sbin
        $(INSTALL_PROG) -p $(ACM_INST_TOOLS) $(DESTDIR)/usr/sbin
@@ -79,11 +81,14 @@ else
        python python/setup.py install --root="$(DESTDIR)"
 endif
 else
+.PHONY: all
 all:
 
+.PHONY: install
 install:
 endif
 
+.PHONY: build
 build: mk-symlinks $(ACM_INST_TOOLS) $(ACM_NOINST_TOOLS)
        python python/setup.py build
        chmod 700 $(ACM_SCRIPTS)
@@ -100,6 +105,7 @@ get_decision: $(OBJS_GETD)
 xensec_gen: xensec_gen.py
        cp -f $^ $@
 
+.PHONY: clean
 clean:
        $(RM) $(ACM_INST_TOOLS) $(ACM_NOINST_TOOLS)
        $(RM) $(ACM_OBJS)
@@ -107,8 +113,10 @@ clean:
        $(RM) -r xen
        $(RM) -r build
 
+.PHONY: mrproper
 mrproper: clean
 
+.PHONY: boot_install
 boot_install: install
        $(ACM_SCRIPT_DIR)/updategrub.sh $(POLICY) $(KERNEL_VERSION)
 
index 06aa7c50ef36cfda9e9557d3e6de5b937e261397..c9ae1deb0d16efc5ccbb632887c605e7a1903d93 100644 (file)
@@ -1,2 +1,3 @@
 
+.PHONY: all
 all:
index 99b6b20408155a25d775811a9d836c364e99947c..afa6578619c35cfeb31fb3f0e8c00e11b67b1669 100644 (file)
@@ -6,14 +6,17 @@ TARGET := test_x86_emulator
 
 HOSTCFLAGS += -D__TEST_HARNESS__
 
+.PHONY: all
 all: $(TARGET)
 
 $(TARGET): x86_emulate.o test_x86_emulator.o
        $(HOSTCC) -o $@ $^
 
+.PHONY: clean
 clean:
        rm -rf $(TARGET) *.o *~ core
 
+.PHONY: install
 install:
 
 x86_emulate.o: $(XEN_ROOT)/xen/arch/x86/x86_emulate.c
index 7d16a7369f9cc5fc5029533786c8f7f17534403a..33827c6a90cf4da6647be9dcc134274c3755d85e 100644 (file)
@@ -5,10 +5,6 @@ export VNET_ROOT = $(shell pwd)
 include $(VNET_ROOT)/Make.env
 endif
 
-.PHONY: all compile install dist clean pristine
-.PHONY: gc-all gc-install gc-clean
-.PHONY: help
-
 SUBDIRS:=
 SUBDIRS+= examples
 SUBDIRS+= scripts
@@ -17,11 +13,13 @@ SUBDIRS+= libxutil
 SUBDIRS+= vnetd
 SUBDIRS+= vnet-module
 
+.PHONY: all
 all: compile
 
 gc.tar.gz:
        wget http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/$@
 
+.PHONY: gc
 gc: gc.tar.gz
        tar xfz gc.tar.gz
        ln -sf gc?.? gc
@@ -31,10 +29,13 @@ $(GC_LIB_A): gc
        make -C gc
        DESTDIR="" make -C gc install
 
+.PHONY: gc-all
 gc-all: $(GC_LIB_A)
 
+.PHONY: gc-install
 gc-install:
 
+.PHONY: gc-clean
 gc-clean:
        -@$(RM) -r gc?.? gc
 
@@ -50,19 +51,25 @@ subtgt = $(patsubst %,%-$(1),$(SUBDIRS))
 %-install:
        $(call submak,install)
 
+.PHONY: compile
 compile: $(call subtgt,all)
 
+.PHONY: install
 install: DESTDIR=
 install: dist
 
+.PHONY: dist
 dist: compile $(call subtgt,install)
 
+.PHONY: clean
 clean: $(call subtgt,clean)
        -@$(RM) -r build
 
+.PHONY: pristine
 pristine: clean
        -@$(RM) gc.tar.gz
 
+.PHONY: help
 help:
        @echo 'Cleaning targets:'
        @echo '  clean     - clean subdirs and remove the build dir'
index 6ca7585f15b4b4d1a577f64164b0a0f5f76a994e..67f70ab68dd7f8a2a85c9c1de03fc6f96ed8396f 100644 (file)
@@ -23,8 +23,10 @@ DOC_MAN5     := $(patsubst man/%.pod.5,man5/%.5,$(DOC_MAN5SRC))
 
 .PHONY: all man clean install
 
+.PHONY: all
 all: man
 
+.PHONY: man
 man:
        @if which $(POD2MAN) 1>/dev/null 2>/dev/null; then \
        $(MAKE) $(DOC_MAN1) $(DOC_MAN5); fi
@@ -39,10 +41,12 @@ man5/%.5: man/%.pod.5 Makefile
        $(POD2MAN) --release=$(VERSION) --name=`echo $@ | sed 's/^man5.//'| \
                sed 's/.5//'` -s 5 -c $(HEADER) $< $@
 
+.PHONY: clean
 clean:
        @$(RM) -rf man5
        @$(RM) -rf man1
 
+.PHONY:  install
  install: all
        $(INSTALL_DIR) $(DESTDIR)$(MAN_DIR)
        $(CP) -dR man1 $(DESTDIR)$(MAN_DIR)
index 6953ef10cd864642f0b8c09c48bd02bd2a0831bf..ba605ca31832cf9c36723e1153bf66ed87e8d3ea 100644 (file)
@@ -7,13 +7,14 @@ INSTALL_DIR   = $(INSTALL) -d -m0755
 
 XEN_SCRIPT_DIR  = $(DESTDIR)/etc/xen/scripts
 
-.PHONY: all install clean
-
+.PHONY: all
 all:
 
+.PHONY: install
 install:
        $(INSTALL_DIR) $(XEN_SCRIPT_DIR)
        $(INSTALL_PROG) network-vnet $(XEN_SCRIPT_DIR)
        $(INSTALL_PROG) vnet-insert $(XEN_SCRIPT_DIR)
 
-clean:
\ No newline at end of file
+.PHONY: clean
+clean:
index 8ace83e55436948fa8542ed100af6b1575ddc6a2..757e5567d6ac646354bc1c3499a0f3a3cbef5c4b 100644 (file)
@@ -42,8 +42,10 @@ LIB      += libxutil.so.$(MAJOR)
 LIB      += libxutil.so.$(MAJOR).$(MINOR)
 LIB      += libxutil.a
 
+.PHONY: all
 all: build
 
+.PHONY: build
 build: #check-for-zlib
        $(MAKE) $(LIB)
 
@@ -61,6 +63,7 @@ libxutil.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
 libxutil.a: $(LIB_OBJS)
        $(AR) rc $@ $^
 
+.PHONY: check-for-zlib
 check-for-zlib:
        @if [ ! -e /usr/include/zlib.h ]; then \
        echo "***********************************************************"; \
@@ -69,6 +72,7 @@ check-for-zlib:
        false; \
        fi
 
+.PHONY: install
 install: build
        [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) -p $(DESTDIR)/usr/$(LIBDIR)
        $(INSTALL_PROG) libxutil.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
@@ -76,6 +80,7 @@ install: build
        ln -sf libxutil.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxutil.so.$(MAJOR)
        ln -sf libxutil.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxutil.so
 
+.PHONY: clean
 clean:
        -@$(RM) *.a *.so* *.o *.opic *.rpm 
        -@$(RM) *~
index 05f737edc416358e01c38de25540d82ad40dfc5c..077d6b6224de09fb1a2eb9973faefe3a1728fae5 100644 (file)
@@ -7,12 +7,13 @@ INSTALL_DIR   = $(INSTALL) -d -m0755
 
 SBIN_DIR        = $(DESTDIR)/usr/sbin
 
-.PHONY: all install clean
-
+.PHONY: all
 all:
 
+.PHONY: install
 install:
        $(INSTALL_DIR) $(SBIN_DIR)
        $(INSTALL_PROG) vn $(SBIN_DIR)
 
-clean:
\ No newline at end of file
+.PHONY: clean
+clean:
index 74a3d07b40083cb35992934be531cc5beefa686c..fe54c21bd16701b111511ca3f6b5761764b27759 100644 (file)
@@ -19,6 +19,7 @@
 VNET_ROOT = $(shell cd .. && pwd)
 include $(VNET_ROOT)/Make.env
 
+.PHONY: all
 all: vnetd
 
 #----------------------------------------------------------------------------
@@ -104,10 +105,12 @@ VNETD_LIBS:= $(GC_LIB_A)
 vnetd: $(VNETD_OBJ)
        $(CC) $(CFLAGS) -o $@ $^ $(VNETD_LIBS) -ldl -lpthread
 
+.PHONY: install
 install: vnetd
        mkdir -p $(DESTDIR)$(VNETD_INSTALL_DIR)
        install -m 0755 vnetd $(DESTDIR)$(VNETD_INSTALL_DIR)
 
+.PHONY: clean
 clean:
        -@$(RM) *.a *.o *~
        -@$(RM) vnetd
index d34882f6199b9ed23a7deb1fe3226c3316e21fa4..377f1b04369ac6efce0e0fa5a53ed038aec46779 100644 (file)
@@ -13,14 +13,18 @@ TPM_EMULATOR_TARFILE = tpm_emulator-0.2b.tar.gz
 
 GMP_HEADER = /usr/include/gmp.h
 
+.PHONY: all
 all: build
 
+.PHONY: build
 build: $(TPM_EMULATOR_DIR) $(VTPM_DIR) build_sub
 
+.PHONY: install
 install: build
        $(MAKE) -C $(TPM_EMULATOR_DIR) $@
        $(MAKE) -C $(VTPM_DIR) $@
 
+.PHONY: clean
 clean:
        @if [ -d $(TPM_EMULATOR_DIR) ]; \
                then $(MAKE) -C $(TPM_EMULATOR_DIR) clean; \
@@ -29,6 +33,7 @@ clean:
                then $(MAKE) -C $(VTPM_DIR) clean; \
        fi
 
+.PHONY: mrproper
 mrproper:
        rm -f $(TPM_EMULATOR_TARFILE)
        rm -rf $(TPM_EMULATOR_DIR)
@@ -58,6 +63,7 @@ $(VTPM_DIR): $(TPM_EMULATOR_TARFILE) tpm_emulator-0.2b-x86_64.patch vtpm.patch
        patch -p1 < ../tpm_emulator-0.2b-x86_64.patch; \
        patch -p1 <../vtpm.patch
 
+.PHONY: build_sub
 build_sub:
        @if [ -e $(GMP_HEADER) ]; then \
                $(MAKE) -C $(VTPM_DIR); \
index f57b82facb0d766f8b28a938ba0853fbf12a4f10..1ae3a180eec8140f93e1dca55bb03ffcbe7f3db0 100644 (file)
@@ -6,8 +6,10 @@ include $(XEN_ROOT)/tools/vtpm_manager/Rules.mk
 SUBDIRS                = crypto tcs util manager
 OPENSSL_HEADER = /usr/include/openssl/crypto.h
 
+.PHONY: all
 all: build
 
+.PHONY: build
 build:
        @if [ -e $(OPENSSL_HEADER) ]; then \
                @set -e; for subdir in $(SUBDIRS); do \
@@ -17,17 +19,20 @@ build:
                echo "*** Cannot build vtpm_manager: OpenSSL developement files missing."; \
        fi
 
+.PHONY: install
 install: build
        @set -e; for subdir in $(SUBDIRS); do \
                $(MAKE) -C $$subdir $@; \
        done
 
+.PHONY: clean
 clean:
        @set -e; for subdir in $(SUBDIRS); do \
                $(MAKE) -C $$subdir $@; \
        done
 
 
+.PHONY: mrproper
 mrproper:
        @set -e; for subdir in $(SUBDIRS); do \
                $(MAKE) -C $$subdir $@; \
index 160fce812e93ce81830b638702170d3a06f4fd9d..63233a940eebe61e4b2bfbd6ff8d0af3c8480e10 100644 (file)
@@ -3,15 +3,20 @@ include $(XEN_ROOT)/tools/vtpm_manager/Rules.mk
 
 BIN            = libtcpaCrypto.a
 
+.PHONY: all
 all: build
 
+.PHONY: build
 build: $(BIN)
 
+.PHONY: install
 install: build
 
+.PHONY: clean
 clean:
        rm -f *.a *.so *.o *.rpm $(DEP_FILES)
 
+.PHONY: mrproper
 mrproper: clean
        rm -f *~
 
index 278a37e963ef0622bbc65fef1f3b0dd46e09277a..d0b3526b429584723c1c1421f3ab5caaec385bbb 100644 (file)
@@ -3,19 +3,24 @@ include $(XEN_ROOT)/tools/vtpm_manager/Rules.mk
 
 BIN            = vtpm_managerd
 
+.PHONY: all
 all: build
 
+.PHONY: build
 build: $(BIN)
 
+.PHONY: install
 install: build
        if [ ! -d "$(DESTDIR)/var/vtpm/fifos" ]; \
                then mkdir -p $(DESTDIR)/var/vtpm/fifos; \
        fi
        $(INSTALL_PROG) $(BIN) $(TOOLS_INSTALL_DIR)
 
+.PHONY: clean
 clean:
        rm -f *.a *.so *.o *.rpm $(DEP_FILES)
 
+.PHONY: mrproper
 mrproper: clean
        rm -f $(BIN) *~
 
index 56f4166fdfabb33df0eecea9328095700f7676bd..9d25817e63452235c5cea6b9822b773a20b565d5 100644 (file)
@@ -3,15 +3,20 @@ include $(XEN_ROOT)/tools/vtpm_manager/Rules.mk
 
 BIN            = libTCS.a
 
+.PHONY: all
 all: build
 
+.PHONY: build
 build: $(BIN)
 
+.PHONY: install
 install: build
 
+.PHONY: clean
 clean:
        rm -f *.a *.so *.o *.rpm $(DEP_FILES)
 
+.PHONY: mrproper
 mrproper: clean
        rm -f *~
 
index 8e59d0d8d379cf4cd3b3db397a4feb3111edaf36..9e26c5df1507f76d7ab90c16777a0445905c2dfc 100644 (file)
@@ -3,15 +3,20 @@ include $(XEN_ROOT)/tools/vtpm_manager/Rules.mk
 
 BIN            = libTCGUtils.a
 
+.PHONY: all
 all: build
 
+.PHONY: build
 build: $(BIN)
 
+.PHONY: install
 install: build
 
+.PHONY: clean
 clean:
        rm -f *.a *.so *.o *.rpm $(DEP_FILES)
 
+.PHONY: mrproper
 mrproper: clean
        rm -f *~
 
index 9907dfa0c5dc2db9063e88c6640f50af991bac40..4c7354afb8824e37937e3a4c07f39d3381a9c8d2 100644 (file)
@@ -32,6 +32,8 @@ LDLIBS                        = -L$(XEN_LIBXC) -lxenguest -lxenctrl
 
 .PHONY: all
 all: build
+
+.PHONY: build
 build: $(PROGRAMS)
 
 $(PROGRAMS): %: %.o
@@ -44,6 +46,7 @@ install: build
        $(INSTALL_PROG) $(PROGRAMS) $(DESTDIR)$(PROGRAMS_INSTALL_DIR)
 
 
+.PHONY: clean
 clean:
        $(RM) *.o $(PROGRAMS)
        $(RM) $(PROG_DEP)
index ffdca8049ec65dfc654ebf026aede5de8e923dee..baba3e129de8f72519cc1466f4e546e00f775ec1 100644 (file)
@@ -28,16 +28,20 @@ LDFLAGS += -L $(XEN_LIBXC)
 BIN = setmask xenbaked
 SCRIPTS = xenmon.py
 
+.PHONY: all
 all: build
 
+.PHONY: build
 build: $(BIN)
 
+.PHONY: install
 install: xenbaked setmask
        [ -d $(DESTDIR)$(sbindir) ] || $(INSTALL_DIR) $(DESTDIR)$(sbindir)
        $(INSTALL_PROG) xenbaked $(DESTDIR)$(sbindir)/xenbaked
        $(INSTALL_PROG) setmask  $(DESTDIR)$(sbindir)/setmask
        $(INSTALL_PROG) xenmon.py  $(DESTDIR)$(sbindir)/xenmon.py
 
+.PHONY: clean
 clean:
        rm -f $(BIN)
 
index 52832017ff9e058e970e02c476a899473b5858a8..f97f2a7618f318eed52f1c2f529167caa10a1008 100644 (file)
@@ -41,6 +41,7 @@ WARN_FLAGS=-Wall -Werror
 CFLAGS+=-Isrc -I$(XEN_LIBXC) -I$(XEN_XENSTORE)
 LDFLAGS+=-Lsrc
 
+.PHONY: all
 all: $(LIB)
 
 $(LIB): $(OBJECTS)
@@ -62,6 +63,7 @@ src/libxenstat.so.$(MAJOR): $(LIB)
 src/libxenstat.so: src/libxenstat.so.$(MAJOR)
        $(MAKE_LINK) $(<F) $@
 
+.PHONY: install
 install: all
 #install: all
 #      $(INSTALL_DATA) src/xenstat.h $(DESTDIR)$(includedir)/xenstat.h
@@ -84,6 +86,7 @@ BINDINGS=$(PYLIB) $(PYMOD) $(PERLLIB) $(PERLMOD)
 BINDINGSRC=$(PYSRC) $(PERLSRC)
 
 # The all-bindings target builds all the language bindings
+.PHONY: all-bindings
 all-bindings: perl-bindings python-bindings
 
 # The install-bindings target installs all the language bindings
@@ -110,6 +113,7 @@ install-python-bindings: $(PYLIB) $(PYMOD)
        $(INSTALL_PROG) $(PYMOD) $(DESTDIR)$(pythonlibdir)/xenstat.py
 
 ifeq ($(XENSTAT_PYTHON_BINDINGS),y)
+.PHONY: all
 all: python-bindings
 install: install-python-bindings
 endif
@@ -122,8 +126,10 @@ $(PERLSRC) $(PERLMOD): bindings/swig/xenstat.i
 $(PERLLIB): $(PERLSRC)
        $(CC) $(CFLAGS) $(LDFLAGS) $(PERL_FLAGS) -shared -lxenstat -o $@ $<
 
+.PHONY: perl-bindings
 perl-bindings: $(PERLLIB) $(PERLMOD)
 
+.PHONY: install-perl-bindings
 perllibdir=$(prefix)/lib/perl5
 perlmoddir=$(prefix)/share/perl5
 install-perl-bindings: $(PERLLIB) $(PERLMOD)
@@ -131,10 +137,14 @@ install-perl-bindings: $(PERLLIB) $(PERLMOD)
        $(INSTALL_PROG) $(PERLMOD) $(DESTDIR)$(perlmoddir)/xenstat.pm
 
 ifeq ($(XENSTAT_PERL_BINDINGS),y)
+.PHONY: all
 all: perl-bindings
+
+.PHONY: install
 install: install-perl-bindings
 endif
 
+.PHONY: clean
 clean:
        rm -f $(LIB) $(SHLIB) $(SHLIB_LINKS) $(OBJECTS) \
              $(BINDINGS) $(BINDINGSRC)
index 633fd570646d639f1dc9627271a62b2229764b7c..273cb31e4e3b161864403280aa626b287e5047dc 100644 (file)
@@ -14,6 +14,7 @@ XEN_ROOT=../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 ifneq ($(XENSTAT_XENTOP),y)
+.PHONY: all install xentop
 all install xentop:
 else
 
@@ -30,15 +31,16 @@ CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT)
 LDFLAGS += -L$(XEN_LIBXENSTAT)
 LDLIBS += -lxenstat -lncurses
 
+.PHONY: all
 all: xentop
 
-xentop: xentop.o
-
+.PHONY: install
 install: xentop xentop.1
        $(INSTALL_PROG) xentop $(DESTDIR)$(sbindir)/xentop
        $(INSTALL_DATA) xentop.1 $(DESTDIR)$(man1dir)/xentop.1
 
 endif
 
+.PHONY: clean
 clean:
        rm -f xentop xentop.o
index 70877eff8a63d8866636bfd4f992e41f8d374891..84c08d86262bffc0397ba001863998e6892fe6eb 100644 (file)
@@ -27,11 +27,13 @@ CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm
 CLIENTS += xenstore-write
 CLIENTS_OBJS := $(patsubst xenstore-%,xenstore_%.o,$(CLIENTS))
 
+.PHONY: all
 all: libxenstore.so xenstored $(CLIENTS) xs_tdb_dump xenstore-control xenstore-ls
 
 test_interleaved_transactions: test_interleaved_transactions.o
        $(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -L. -lxenstore -o $@
 
+.PHONY: testcode
 testcode: xs_test xenstored_test xs_random
 
 xenstored: xenstored_core.o xenstored_watch.o xenstored_domain.o xenstored_transaction.o xs_lib.o talloc.o utils.o tdb.o hashtable.o
@@ -63,6 +65,7 @@ xs_crashme: xs_crashme.o xs_lib.o talloc.o utils.o
 
 speedtest: speedtest.o xs.o xs_lib.o utils.o talloc.o
 
+.PHONY: check-speed
 check-speed: speedtest xenstored_test $(TESTDIR)
        $(TESTENV) time ./speedtest 100
 
@@ -80,6 +83,7 @@ talloc_test.o: talloc.c
 libxenstore.so: xs.opic xs_lib.opic
        $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenstore.so -shared -o $@ $^ -lpthread
 
+.PHONY: clean
 clean: testsuite-clean
        rm -f *.o *.opic *.so
        rm -f xenstored xs_random xs_stress xs_crashme
@@ -87,55 +91,69 @@ clean: testsuite-clean
        rm -f $(CLIENTS)
        $(RM) $(PROG_DEP)
 
+.PHONY: print-dir
 print-dir:
        @echo -n tools/xenstore: 
 
+.PHONY: print-end
 print-end:
        @echo
 
+.PHONY: check
 check: print-dir testsuite-fast randomcheck-fast print-end
 
+.PHONY: fullcheck
 fullcheck: testsuite-run randomcheck stresstest
 
 $(TESTDIR):
        mkdir $@
 
+.PHONY: testsuite-run
 testsuite-run: xenstored_test xs_test $(TESTDIR)
        $(TESTENV) testsuite/test.sh && echo
 
+.PHONY: testsuite-fast
 testsuite-fast: xenstored_test xs_test $(TESTDIR)
        @$(TESTENV) testsuite/test.sh --fast
 
+.PHONY: testsuite-clean
 testsuite-clean:
        rm -rf $(TESTDIR)
 
 # Make this visible so they can see repeat tests without --fast if they
 # fail.
 RANDSEED=$(shell date +%s)
+.PHONY: randomcheck
 randomcheck: xs_random xenstored_test $(TESTDIR)
        $(TESTENV) ./xs_random --simple --fast /tmp/xs_random 200000 $(RANDSEED) && echo
        $(TESTENV) ./xs_random --fast /tmp/xs_random 100000 $(RANDSEED) && echo
 #      $(TESTENV) ./xs_random --fail /tmp/xs_random 10000 $(RANDSEED)
 
+.PHONY: crashme
 crashme:  xs_crashme xenstored_test $(TESTDIR)
        rm -rf $(TESTDIR)/store $(TESTDIR)/transactions /tmp/xs_crashme.vglog* /tmp/trace
        export $(TESTENV); ./xs_crashme 5000 $(RANDSEED) 2>/dev/null
        if [ -n "`cat /tmp/xs_crashme.vglog*`" ]; then echo Valgrind complained; cat /tmp/xs_crashme.vglog*; exit 1; fi
        rm -rf $(TESTDIR)/store $(TESTDIR)/transactions /tmp/xs_crashme.vglog* /tmp/trace
 
+.PHONY: randomcheck-fast
 randomcheck-fast: xs_random xenstored_test $(TESTDIR)
        @$(TESTENV) ./xs_random --fast /tmp/xs_random 2000 $(RANDSEED)
 
+.PHONY: stresstest
 stresstest: xs_stress xenstored_test $(TESTDIR)
        rm -rf $(TESTDIR)/store $(TESTDIR)/transactions
        export $(TESTENV); PID=`./xenstored_test --output-pid --trace-file=/tmp/trace`; ./xs_stress 5000; ret=$$?; kill $$PID; exit $$ret
 
+.PHONY: TAGS
 TAGS:
        etags `find . -name '*.[ch]'`
 
+.PHONY: tarball
 tarball: clean
        cd .. && tar -c -j -v -h -f xenstore.tar.bz2 xenstore/
 
+.PHONY: install
 install: all
        $(INSTALL_DIR) -p $(DESTDIR)/var/run/xenstored
        $(INSTALL_DIR) -p $(DESTDIR)/var/lib/xenstored
index b02a39b18e348d9cd3444f41aa8bd95f59f9f85a..f7f8ac1969b8d62c940fab626756109ccd29704b 100644 (file)
@@ -28,9 +28,13 @@ ifeq ($(XEN_TARGET_ARCH),x86_64)
 LIBBIN  += xenctx
 endif
 
+.PHONY: all
 all: build
+
+.PHONY: build
 build: $(BIN) $(LIBBIN)
 
+.PHONY: install
 install: build
        [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
        [ -z "$(LIBBIN)" ] || [ -d $(DESTDIR)/usr/$(LIBDIR)/xen/bin ] || \
@@ -44,6 +48,7 @@ install: build
        $(INSTALL_DATA) $(MAN1) $(DESTDIR)/usr/share/man/man1
        $(INSTALL_DATA) $(MAN8) $(DESTDIR)/usr/share/man/man8
 
+.PHONY: clean
 clean:
        $(RM) *.a *.so *.o *.rpm $(BIN) $(LIBBIN)
 
index 777ddd8d4c4e76cdba58954541bfce547ca5c5ce..285d657960aeb2b14f8936f112368b2b5b1331b4 100644 (file)
@@ -1,31 +1,28 @@
-INSTALL                        = install
-INSTALL_DATA           = $(INSTALL) -m0644
-INSTALL_DIR            = $(INSTALL) -d -m0755
-
 # This is the correct place to edit the build version.
 # All other places this is stored (eg. compile.h) should be autogenerated.
 export XEN_VERSION       = 3
 export XEN_SUBVERSION    = 0
-export XEN_EXTRAVERSION  = .2-2
+export XEN_EXTRAVERSION ?= .2-2
 export XEN_FULLVERSION   = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
+-include xen-version
 
-export BASEDIR          := $(CURDIR)
-
-include Rules.mk
+export BASEDIR := $(CURDIR)
 
+.PHONY: default
 default: build
-$(TARGET).gz: $(TARGET)
-       gzip -f -9 < $< > $@.new
-       mv $@.new $@
-
-debug: 
-       objdump -D -S $(TARGET)-syms > $(TARGET).s
 
+.PHONY: dist
 dist: install
 
-build: $(TARGET).gz
+.PHONY: build install clean cscope TAGS tags
+build install debug clean cscope TAGS tags::
+       make -f Rules.mk _$@
+
+.PHONY: _build
+_build: $(TARGET).gz
 
-install: $(TARGET).gz
+.PHONY: _install
+_install: $(TARGET).gz
        [ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot
        $(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION).gz
        ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).gz
@@ -38,27 +35,37 @@ install: $(TARGET).gz
        $(INSTALL_DATA) include/public/io/*.h $(DESTDIR)/usr/include/xen/io
        $(INSTALL_DATA) include/public/COPYING $(DESTDIR)/usr/include/xen
 
-clean: delete-unfresh-files
+.PHONY: _debug
+_debug:
+       objdump -D -S $(TARGET)-syms > $(TARGET).s
+
+.PHONY: _clean
+_clean: delete-unfresh-files
        $(MAKE) -C tools clean
-       $(MAKE) -C common clean
-       $(MAKE) -C drivers clean
-       $(MAKE) -C acm clean
-       $(MAKE) -C arch/$(TARGET_ARCH) clean
+       $(MAKE) -f $(BASEDIR)/Rules.mk -C common clean
+       $(MAKE) -f $(BASEDIR)/Rules.mk -C drivers clean
+       $(MAKE) -f $(BASEDIR)/Rules.mk -C acm clean
+       $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean
        rm -f include/asm *.o $(TARGET)* *~ core
        rm -f include/asm-*/asm-offsets.h
        rm -f include/xen/acm_policy.h
 
+$(TARGET).gz: $(TARGET)
+       gzip -f -9 < $< > $@.new
+       mv $@.new $@
+
 $(TARGET): delete-unfresh-files
        $(MAKE) -C tools
-       $(MAKE) include/xen/compile.h
-       $(MAKE) include/xen/acm_policy.h
+       $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h
+       $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/acm_policy.h
        [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
-       $(MAKE) -C arch/$(TARGET_ARCH) asm-offsets.s
-       $(MAKE) include/asm-$(TARGET_ARCH)/asm-offsets.h
-       $(MAKE) -C arch/$(TARGET_ARCH) $(TARGET)
+       $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) asm-offsets.s
+       $(MAKE) -f $(BASEDIR)/Rules.mk include/asm-$(TARGET_ARCH)/asm-offsets.h
+       $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $(TARGET)
 
 # drivers/char/console.o contains static banner/compile info. Blow it away.
 # Don't refresh these files during e.g., 'sudo make install'
+.PHONY: delete-unfresh-files
 delete-unfresh-files:
        @if [ ! -r include/xen/compile.h -o -O include/xen/compile.h ]; then \
                rm -f include/xen/{banner,compile}.h; \
@@ -115,8 +122,6 @@ include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
          echo ""; \
          echo "#endif") <$< >$@
 
-.PHONY: default debug install dist clean delete-unfresh-files TAGS tags
-
 SUBDIRS = acm arch/$(TARGET_ARCH) common drivers 
 define all_sources
     ( find include/asm-$(TARGET_ARCH) -name SCCS -prune -o -name '*.h' -print; \
@@ -124,12 +129,20 @@ define all_sources
             -name config \) -prune -o -name '*.h' -print; \
       find $(SUBDIRS) -name SCCS -prune -o -name '*.[chS]' -print )
 endef
-TAGS: 
+
+.PHONY: _TAGS
+_TAGS: 
        $(all_sources) | etags -
-tags: 
+
+.PHONY: _tags
+_tags: 
        $(all_sources) | xargs ctags
-cscope: 
+
+.PHONY: _cscope
+_cscope:
        $(all_sources) > cscope.files
        cscope -k -b -q
+
+.PHONY: MAP
 MAP:
        $(NM) $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map
diff --git a/xen/Post.mk b/xen/Post.mk
deleted file mode 100644 (file)
index 02008ac..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-# Ensure each subdirectory has exactly one trailing slash.
-subdir-n := $(patsubst %,%/,$(patsubst %/,%,$(subdir-n)))
-subdir-y := $(patsubst %,%/,$(patsubst %/,%,$(subdir-y)))
-
-# Add explicitly declared subdirectories to the object list.
-obj-y += $(patsubst %,%/built_in.o,$(subdir-y))
-
-# Add implicitly declared subdirectories (in the object list) to the
-# subdirectory list, and rewrite the object-list entry.
-subdir-y += $(filter %/,$(obj-y))
-obj-y    := $(patsubst %/,%/built-in.o,$(obj-y))
-
-subdir-all := $(subdir-y) $(subdir-n)
-
-built_in.o: $(obj-y)
-       $(LD) $(LDFLAGS) -r -o $@ $^
-
-.PHONY: FORCE
-FORCE:
-
-%/built_in.o: FORCE
-       $(MAKE) -C $*
-
-clean:: $(addprefix _clean_, $(subdir-all)) FORCE
-       rm -f *.o *~ core
-_clean_%/: FORCE
-       $(MAKE) -C $* clean
index faa2dd13fe28479c835d9332a5e99396ababf1a4..82449c344f0082e2fefe8022ee1654913ffc04c8 100644 (file)
@@ -26,21 +26,24 @@ override TARGET_SUBARCH  := $(XEN_TARGET_ARCH)
 override COMPILE_ARCH    := $(patsubst x86%,x86,$(XEN_COMPILE_ARCH))
 override TARGET_ARCH     := $(patsubst x86%,x86,$(XEN_TARGET_ARCH))
 
-TARGET  := $(BASEDIR)/xen
-HDRS    := $(wildcard $(BASEDIR)/include/xen/*.h)
-HDRS    += $(wildcard $(BASEDIR)/include/public/*.h)
-HDRS    += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h)
-HDRS    += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h)
-HDRS    += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/hvm/*.h)
-HDRS    += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/hvm/svm/*.h)
-HDRS    += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/hvm/vmx/*.h)
-# Do not depend on auto-generated header files.
-HDRS    := $(subst $(BASEDIR)/include/asm-$(TARGET_ARCH)/asm-offsets.h,,$(HDRS))
-HDRS    := $(subst $(BASEDIR)/include/xen/banner.h,,$(HDRS))
-HDRS    := $(subst $(BASEDIR)/include/xen/compile.h,,$(HDRS))
+TARGET := $(BASEDIR)/xen
+
+HDRS := $(wildcard $(BASEDIR)/include/xen/*.h)
+HDRS += $(wildcard $(BASEDIR)/include/public/*.h)
+HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h)
+HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h)
+
+INSTALL      := install
+INSTALL_DATA := $(INSTALL) -m0644
+INSTALL_DIR  := $(INSTALL) -d -m0755
 
 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
 
+# Do not depend on auto-generated header files.
+HDRS := $(subst $(BASEDIR)/include/asm-$(TARGET_ARCH)/asm-offsets.h,,$(HDRS))
+HDRS := $(subst $(BASEDIR)/include/xen/banner.h,,$(HDRS))
+HDRS := $(subst $(BASEDIR)/include/xen/compile.h,,$(HDRS))
+
 # Note that link order matters!
 ALL_OBJS-y               += $(BASEDIR)/common/built_in.o
 ALL_OBJS-y               += $(BASEDIR)/drivers/built_in.o
@@ -64,6 +67,38 @@ ALL_OBJS := $(ALL_OBJS-y)
 CFLAGS   := $(strip $(CFLAGS) $(CFLAGS-y))
 AFLAGS   := $(strip $(AFLAGS) $(AFLAGS-y))
 
+include Makefile
+
+# Ensure each subdirectory has exactly one trailing slash.
+subdir-n := $(patsubst %,%/,$(patsubst %/,%,$(subdir-n)))
+subdir-y := $(patsubst %,%/,$(patsubst %/,%,$(subdir-y)))
+
+# Add explicitly declared subdirectories to the object list.
+obj-y += $(patsubst %/,%/built_in.o,$(subdir-y))
+
+# Add implicitly declared subdirectories (in the object list) to the
+# subdirectory list, and rewrite the object-list entry.
+subdir-y += $(filter %/,$(obj-y))
+obj-y    := $(patsubst %/,%/built-in.o,$(obj-y))
+
+subdir-all := $(subdir-y) $(subdir-n)
+
+built_in.o: $(obj-y)
+       $(LD) $(LDFLAGS) -r -o $@ $^
+
+# Force execution of pattern rules (for which PHONY cannot be directly used).
+.PHONY: FORCE
+FORCE:
+
+%/built_in.o: FORCE
+       $(MAKE) -f $(BASEDIR)/Rules.mk -C $* built_in.o
+
+.PHONY: clean
+clean:: $(addprefix _clean_, $(subdir-all))
+       rm -f *.o *~ core
+_clean_%/: FORCE
+       $(MAKE) -f $(BASEDIR)/Rules.mk -C $* clean
+
 %.o: %.c $(HDRS) Makefile
        $(CC) $(CFLAGS) -c $< -o $@
 
index a3656e905a13de1e5fd5c59351774e55fd8a2051..c16be20c3a80db1c330f82e9289ca9753fd694bf 100644 (file)
@@ -1,9 +1,5 @@
-include $(BASEDIR)/Rules.mk
-
 obj-y += acm_core.o 
 obj-y += acm_policy.o
 obj-y += acm_simple_type_enforcement_hooks.o
 obj-y += acm_chinesewall_hooks.o
 obj-y += acm_null_hooks.o
-
-include $(BASEDIR)/Post.mk
index 381c6d739b1a5a390ac076c034fc89bc0b6f0374..4ce2d7acd59243cfd4ef40d6a3f35ec2b2a028f5 100644 (file)
@@ -1,21 +1,17 @@
-include $(BASEDIR)/Rules.mk
-
 subdir-y += xen
 subdir-y += vmx
 subdir-y += linux
 subdir-y += linux-xen
 
-include $(BASEDIR)/Post.mk
-
 $(TARGET)-syms: linux-xen/head.o $(ALL_OBJS) xen.lds.s
        $(LD) $(LDFLAGS) -T xen.lds.s -N \
                -Map map.out linux-xen/head.o $(ALL_OBJS) -o $@
        $(NM) -n $@ | $(BASEDIR)/tools/symbols > $(BASEDIR)/xen-syms.S
-       $(MAKE) $(BASEDIR)/xen-syms.o
+       $(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/xen-syms.o
        $(LD) $(LDFLAGS) -T xen.lds.s -N \
                -Map map.out linux-xen/head.o $(ALL_OBJS) $(BASEDIR)/xen-syms.o -o $@
        $(NM) -n $@ | $(BASEDIR)/tools/symbols >$(BASEDIR)/xen-syms.S
-       $(MAKE) $(BASEDIR)/xen-syms.o
+       $(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/xen-syms.o
        $(LD) $(LDFLAGS) -T xen.lds.s -N \
                -Map map.out linux-xen/head.o $(ALL_OBJS) $(BASEDIR)/xen-syms.o -o $@
        rm -f $(BASEDIR)/xen-syms.S $(BASEDIR)/xen-syms.o
@@ -79,7 +75,8 @@ xen.lds.s: xen/xen.lds.S
        $(CC) -E $(CPPFLAGS) -P -DXEN $(AFLAGS) \
                -o xen.lds.s xen/xen.lds.S
 
-clean:: FORCE
+.PHONY: clean
+clean::
        rm -f *.o *~ core  xen.lds.s $(BASEDIR)/include/asm-ia64/.offsets.h.stamp asm-offsets.s map.out
        rm -f asm-xsi-offsets.s $(BASEDIR)/include/asm-ia64/asm-xsi-offsets.h
        rm -f $(BASEDIR)/System.map
index f602f52c040d22cd19033ea8ff7c0b0a3179c981..ca5354b343c477ab9e31554594d7d5aa633f5411 100644 (file)
@@ -1,5 +1,3 @@
-include $(BASEDIR)/Rules.mk
-
 obj-y += efi.o
 obj-y += entry.o
 obj-y += irq_ia64.o
@@ -15,5 +13,3 @@ obj-y += time.o
 obj-y += tlb.o
 obj-y += unaligned.o
 obj-y += unwind.o
-
-include $(BASEDIR)/Post.mk
index b5f2c1dd47f1a91b0b0e877bcd5e79ab06a30cac..926fc501dfb7969873943ac6437358fd14847a25 100644 (file)
@@ -1,6 +1,3 @@
-include $(BASEDIR)/Rules.mk
-
-
 obj-y += bitop.o
 obj-y += clear_page.o
 obj-y += cmdline.o
@@ -26,8 +23,6 @@ obj-y += __udivdi3.o
 obj-y += __moddi3.o
 obj-y += __umoddi3.o
 
-include $(BASEDIR)/Post.mk
-
 ## variants of divide/modulo
 ## see files in xen/arch/ia64/linux/lib (linux/arch/ia64/lib)
 __divdi3.o: idiv64.S
index c4e9b1c9fdcf2f1e6d17bf233c0cb82c46a264c5..fbe5f0ad3ef230ce28756bf7a8be9be9d8cff0a9 100644 (file)
@@ -1,10 +1,12 @@
 CC=gcc
 CFLAGS=-O -Wall
 
+.PHONY: all
 all: postat
 
 postat: postat.c pohcalls.o
 
+.PHONY: clean
 clean:
        $(RM) -f *.o postat *.s *~
 
index 55322531b1c760a01116e1b0a6181b1c2859299a..df0a72f0fe8739ae4e66803b1c583c329f99c2f7 100644 (file)
@@ -1,5 +1,3 @@
-include $(BASEDIR)/Rules.mk
-
 obj-y += hvm_vioapic.o
 obj-y += mm.o
 obj-y += mmio.o
@@ -20,5 +18,3 @@ obj-y += vmx_vcpu.o
 obj-y += vmx_virt.o
 obj-y += vmx_vsa.o
 obj-y += vtlb.o
-
-include $(BASEDIR)/Post.mk
index 1d3d80b3474a7d030533057ff35bbb1753436bc0..600b010d1103e78471af506a0cdb099990a04eff 100644 (file)
@@ -1,5 +1,3 @@
-include $(BASEDIR)/Rules.mk
-
 obj-y += acpi.o
 obj-y += dom0_ops.o
 obj-y += domain.o
@@ -26,5 +24,3 @@ obj-y += xensetup.o
 obj-y += xentime.o
 
 obj-$(crash_debug) += gdbstub.o
-
-include $(BASEDIR)/Post.mk
index c7a2e6ae1ddcd660d502071fb23a724b7976317f..7a42c90dc42a90df23493ad0ded003817eb6c249 100644 (file)
@@ -1,5 +1,3 @@
-include $(BASEDIR)/Rules.mk
-
 subdir-y += acpi
 subdir-y += cpu
 subdir-y += genapic
@@ -49,8 +47,6 @@ obj-$(x86_64) += shadow.o shadow_public.o shadow_guest32.o shadow_guest32pae.o
 
 obj-$(crash_debug) += gdbstub.o
 
-include $(BASEDIR)/Post.mk
-
 $(TARGET): $(TARGET)-syms boot/mkelf32
        ./boot/mkelf32 $(TARGET)-syms $(TARGET) 0x100000 \
        `$(NM) $(TARGET)-syms | sort | tail -n 1 | sed -e 's/^\([^ ]*\).*/0x\1/'`
@@ -59,11 +55,11 @@ $(TARGET)-syms: boot/$(TARGET_SUBARCH).o $(ALL_OBJS) xen.lds
        $(LD) $(LDFLAGS) -T xen.lds -N \
            boot/$(TARGET_SUBARCH).o $(ALL_OBJS) -o $@
        $(NM) -n $@ | $(BASEDIR)/tools/symbols >$(BASEDIR)/xen-syms.S
-       $(MAKE) $(BASEDIR)/xen-syms.o
+       $(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/xen-syms.o
        $(LD) $(LDFLAGS) -T xen.lds -N \
            boot/$(TARGET_SUBARCH).o $(ALL_OBJS) $(BASEDIR)/xen-syms.o -o $@
        $(NM) -n $@ | $(BASEDIR)/tools/symbols >$(BASEDIR)/xen-syms.S
-       $(MAKE) $(BASEDIR)/xen-syms.o
+       $(MAKE) -f $(BASEDIR)/Rules.mk $(BASEDIR)/xen-syms.o
        $(LD) $(LDFLAGS) -T xen.lds -N \
            boot/$(TARGET_SUBARCH).o $(ALL_OBJS) $(BASEDIR)/xen-syms.o -o $@
        rm -f $(BASEDIR)/xen-syms.S $(BASEDIR)/xen-syms.o
@@ -79,5 +75,6 @@ boot/mkelf32: boot/mkelf32.c
 
 shadow_guest32.o: shadow.c
 
-clean:: FORCE
+.PHONY: clean
+clean::
        rm -f asm-offsets.s xen.lds boot/*.o boot/*~ boot/core boot/mkelf32
index 9bd3c94443518cc35f1c45f1071adfcfd10c3434..399a1cce4be3ac93edbfccbfa1e36ed439bc7b30 100644 (file)
@@ -46,6 +46,10 @@ x86_32 := n
 x86_64 := y
 endif
 
+HDRS += $(wildcard $(BASEDIR)/include/asm-x86/hvm/*.h)
+HDRS += $(wildcard $(BASEDIR)/include/asm-x86/hvm/svm/*.h)
+HDRS += $(wildcard $(BASEDIR)/include/asm-x86/hvm/vmx/*.h)
+
 # Test for at least GCC v3.2.x.
 gcc-ver = $(shell $(CC) -dumpversion | sed -e 's/^\(.\)\.\(.\)\.\(.\)/\$(1)/')
 ifeq ($(call gcc-ver,1),1)
index 6c0e68a8ace556cd8f89aca44888606b7e6ec337..123f174f0e7d5bcfe6c8b3991cb9490533afb743 100644 (file)
@@ -1,5 +1 @@
-include $(BASEDIR)/Rules.mk
-
 obj-y += boot.o
-
-include $(BASEDIR)/Post.mk
index bbb02cb719069a2e6f7804dcb983fdb9a92ce4e2..1fa37dbe7589b9c09d8deeb6266fe16c6e22295a 100644 (file)
@@ -1,5 +1,3 @@
-include $(BASEDIR)/Rules.mk
-
 subdir-y += mcheck
 subdir-y += mtrr
 
@@ -12,5 +10,3 @@ obj-$(x86_32) += centaur.o
 obj-$(x86_32) += cyrix.o
 obj-$(x86_32) += rise.o
 obj-$(x86_32) += transmeta.o
-
-include $(BASEDIR)/Post.mk
index 7588c577b832597763b24d7c9fc75f7df3e2bc08..fbf8f0a1771c4d6dcebf0c5fe0e8fbf99c5263bc 100644 (file)
@@ -1,5 +1,3 @@
-include $(BASEDIR)/Rules.mk
-
 obj-y += k7.o
 obj-y += mce.o
 obj-y += non-fatal.o
@@ -7,5 +5,3 @@ obj-y += p4.o
 obj-y += p5.o
 obj-y += p6.o
 obj-y += winchip.o
-
-include $(BASEDIR)/Post.mk
index 972ddb7f4bfc5422c4a5bbb7fd62f96f513463f7..445138aa3c52c932426ebff26c3d32afedbf7ffb 100644 (file)
@@ -1,10 +1,6 @@
-include $(BASEDIR)/Rules.mk
-
 obj-y += amd.o
 obj-y += centaur.o
 obj-y += cyrix.o
 obj-y += generic.o
 obj-y += main.o
 obj-y += state.o
-
-include $(BASEDIR)/Post.mk
index 4220d8f7fec217257db43d015e841047db74bae8..da42ba50189afe2221426d031a2a92ee33f4cb1c 100644 (file)
@@ -1,10 +1,6 @@
-include $(BASEDIR)/Rules.mk
-
 obj-y += bigsmp.o
 obj-y += default.o
 obj-y += es7000.o
 obj-y += es7000plat.o
 obj-y += probe.o
 obj-y += summit.o
-
-include $(BASEDIR)/Post.mk
index 84759742b6750b467647faff34e775059596e7c9..7cde715116dbc15640ec6d1df6519e380d247e06 100644 (file)
@@ -1,5 +1,3 @@
-include $(BASEDIR)/Rules.mk
-
 subdir-y += svm
 subdir-y += vmx
 
@@ -10,5 +8,3 @@ obj-y += io.o
 obj-y += platform.o
 obj-y += vioapic.o
 obj-y += vlapic.o
-
-include $(BASEDIR)/Post.mk
index 3e26b45e184f2760614db36d3dadd43660982e6f..e3baf066a079611f219026bf41031ef50ad6e49e 100644 (file)
@@ -1,5 +1,3 @@
-include $(BASEDIR)/Rules.mk
-
 subdir-$(x86_32) += x86_32
 subdir-$(x86_64) += x86_64
 
@@ -8,5 +6,3 @@ obj-y += instrlen.o
 obj-y += intr.o
 obj-y += svm.o
 obj-y += vmcb.o
-
-include $(BASEDIR)/Post.mk
index 4191f3c4eb825d582849f1717a99cffe074c2acb..a9efb8f9e1e832223ca78075734a884fd253f0fd 100644 (file)
@@ -1,5 +1 @@
-include $(BASEDIR)/Rules.mk
-
 obj-y += exits.o
-
-include $(BASEDIR)/Post.mk
index 4191f3c4eb825d582849f1717a99cffe074c2acb..a9efb8f9e1e832223ca78075734a884fd253f0fd 100644 (file)
@@ -1,5 +1 @@
-include $(BASEDIR)/Rules.mk
-
 obj-y += exits.o
-
-include $(BASEDIR)/Post.mk
index 221e8aa694bff9fe60a498ab845ff46cb7fda818..3eede4303117804e53aedb2379b625964195727c 100644 (file)
@@ -1,10 +1,6 @@
-include $(BASEDIR)/Rules.mk
-
 subdir-$(x86_32) += x86_32
 subdir-$(x86_64) += x86_64
 
 obj-y += io.o
 obj-y += vmcs.o
 obj-y += vmx.o
-
-include $(BASEDIR)/Post.mk
index 4191f3c4eb825d582849f1717a99cffe074c2acb..a9efb8f9e1e832223ca78075734a884fd253f0fd 100644 (file)
@@ -1,5 +1 @@
-include $(BASEDIR)/Rules.mk
-
 obj-y += exits.o
-
-include $(BASEDIR)/Post.mk
index 4191f3c4eb825d582849f1717a99cffe074c2acb..a9efb8f9e1e832223ca78075734a884fd253f0fd 100644 (file)
@@ -1,5 +1 @@
-include $(BASEDIR)/Rules.mk
-
 obj-y += exits.o
-
-include $(BASEDIR)/Post.mk
index 6d834de89b5f3ce83395d7303ed08a97abb4eafa..7b4ab46be6eca5f1c81506885e3bad1878a8cdd9 100644 (file)
@@ -1,5 +1,3 @@
-include $(BASEDIR)/Rules.mk
-
 obj-y += domain_page.o
 obj-y += entry.o
 obj-y += mm.o
@@ -7,5 +5,3 @@ obj-y += seg_fixup.o
 obj-y += traps.o
 
 obj-$(supervisor_mode_kernel) += supervisor_mode_kernel.o
-
-include $(BASEDIR)/Post.mk
index 82816f4ce53b6603165f4acccd0e28642380124d..3ce6d011566a7c792d720b25a2c244f7f05d6f94 100644 (file)
@@ -1,7 +1,3 @@
-include $(BASEDIR)/Rules.mk
-
 obj-y += entry.o
 obj-y += mm.o
 obj-y += traps.o
-
-include $(BASEDIR)/Post.mk
index 6ea58895407466b251d893d8377f654f1af14080..d7bf1c50ec44eb6f09f2806b7de2e25ad1ea5366 100644 (file)
@@ -1,5 +1,3 @@
-include $(BASEDIR)/Rules.mk
-
 obj-y += acm_ops.o
 obj-y += bitmap.o
 obj-y += dom0_ops.o
@@ -28,7 +26,5 @@ obj-y += xmalloc.o
 obj-$(perfc)       += perfc.o
 obj-$(crash_debug) += gdbstub.o
 
-include $(BASEDIR)/Post.mk
-
 # Object file contains changeset and compiler information.
 kernel.o: $(BASEDIR)/include/xen/compile.h
index b24da03f5e971afb2c54f4c3e723f6fcd66de345..ba39b440a989208b7aa26e4c763039b43d7ac7a2 100644 (file)
@@ -1,6 +1,2 @@
-include $(BASEDIR)/Rules.mk
-
 subdir-y += char
 subdir-$(HAS_ACPI) += acpi
-
-include $(BASEDIR)/Post.mk
index 88b7ad93a62aafecde672a406359e18beb62e704..68dafe3a526204cffea51f298b5ca0541bd6ea46 100644 (file)
@@ -1,5 +1 @@
-include $(BASEDIR)/Rules.mk
-
 obj-y += tables.o
-
-include $(BASEDIR)/Post.mk
index 40fc709764d68ec025e7eb1ce84b440a948a3ead..e63753d42927f7ce0aaa57a95ae7f1b0b6ea3124 100644 (file)
@@ -1,10 +1,6 @@
-include $(BASEDIR)/Rules.mk
-
 obj-y += console.o
 obj-y += ns16550.o
 obj-y += serial.o
 
-include $(BASEDIR)/Post.mk
-
 # Object file contains changeset and compiler information.
 console.o: $(BASEDIR)/include/xen/compile.h
index 4d353617bd1da8fed93fa2319a756f848b62e67e..70a37092db3d8820dee95857a635f12c0c028685 100644 (file)
@@ -1,10 +1,12 @@
 
 include $(BASEDIR)/../Config.mk
 
+.PHONY: default
 default:
        $(MAKE) -C figlet
        $(MAKE) symbols
 
+.PHONY: clean
 clean:
        $(MAKE) -C figlet clean
        rm -f *.o symbols
index bb9c64fa792e1b760ee8132dd234713b58835964..cc44294dad982bf3bba3a47187e2a2947eaf00c9 100644 (file)
@@ -4,5 +4,6 @@ include $(BASEDIR)/../Config.mk
 figlet: figlet.c
        $(HOSTCC) -o $@ $<
 
+.PHONY: clean
 clean:
        rm -f *.o figlet