aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-04-10 17:02:49 +0100
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2006-04-10 17:02:49 +0100
commitb5fa90ac8ea579eb2b4223051e3c35d78a7b28b2 (patch)
tree51768b133193fd10c1ea4d715f000163a107018a /tools
parent0198288b1f5f296f043439bd647877effb870df7 (diff)
parent224cab0dfd3e7696fec21acf5e0cd821328fbe49 (diff)
downloadxen-b5fa90ac8ea579eb2b4223051e3c35d78a7b28b2.tar.gz
xen-b5fa90ac8ea579eb2b4223051e3c35d78a7b28b2.tar.bz2
xen-b5fa90ac8ea579eb2b4223051e3c35d78a7b28b2.zip
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@verge.net.au>
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile8
-rw-r--r--tools/Rules.mk1
-rw-r--r--tools/blktap/Makefile5
-rw-r--r--tools/blktap/parallax/Makefile4
-rw-r--r--tools/blktap/ublkback/Makefile6
-rw-r--r--tools/check/Makefile6
-rw-r--r--tools/console/Makefile3
-rw-r--r--tools/console/testsuite/Makefile2
-rw-r--r--tools/debugger/libxendebug/Makefile9
-rw-r--r--tools/debugger/pdb/Makefile2
-rw-r--r--tools/debugger/pdb/linux-2.6-module/Makefile2
-rw-r--r--tools/debugger/pdb/linux-2.6-patches/Makefile1
-rw-r--r--tools/examples/Makefile10
-rw-r--r--tools/firmware/Makefile5
-rw-r--r--tools/firmware/acpi/Makefile4
-rw-r--r--tools/firmware/hvmloader/Makefile2
-rw-r--r--tools/firmware/rombios/Makefile3
-rw-r--r--tools/firmware/vgabios/Makefile5
-rw-r--r--tools/firmware/vmxassist/Makefile2
-rw-r--r--tools/guest-headers/Makefile4
-rw-r--r--tools/ioemu/Makefile9
-rw-r--r--tools/ioemu/target-i386-dm/Makefile4
-rw-r--r--tools/libxc/Makefile10
-rw-r--r--tools/misc/Makefile5
-rw-r--r--tools/misc/cpuperf/Makefile3
-rw-r--r--tools/misc/lomount/Makefile5
-rw-r--r--tools/misc/mbootpack/Makefile6
-rw-r--r--tools/misc/miniterm/Makefile3
-rw-r--r--tools/misc/nsplitd/Makefile3
-rw-r--r--tools/pygrub/Makefile4
-rw-r--r--tools/pygrub/src/fsys/ext2/ext2module.c5
-rw-r--r--tools/python/Makefile8
-rw-r--r--tools/python/xen/util/diagnose.py2
-rw-r--r--tools/security/Makefile8
-rw-r--r--tools/sv/Makefile1
-rw-r--r--tools/tests/Makefile3
-rw-r--r--tools/vnet/Makefile15
-rw-r--r--tools/vnet/doc/Makefile4
-rw-r--r--tools/vnet/examples/Makefile7
-rw-r--r--tools/vnet/libxutil/Makefile5
-rw-r--r--tools/vnet/scripts/Makefile7
-rw-r--r--tools/vnet/vnetd/Makefile3
-rw-r--r--tools/vtpm/Makefile6
-rw-r--r--tools/vtpm_manager/Makefile5
-rw-r--r--tools/vtpm_manager/crypto/Makefile5
-rw-r--r--tools/vtpm_manager/manager/Makefile5
-rw-r--r--tools/vtpm_manager/tcs/Makefile5
-rw-r--r--tools/vtpm_manager/util/Makefile5
-rw-r--r--tools/xcutils/Makefile3
-rw-r--r--tools/xenmon/Makefile4
-rw-r--r--tools/xenstat/libxenstat/Makefile10
-rw-r--r--tools/xenstat/xentop/Makefile5
-rw-r--r--tools/xenstore/Makefile20
-rw-r--r--tools/xentrace/Makefile5
54 files changed, 255 insertions, 27 deletions
diff --git a/tools/Makefile b/tools/Makefile
index 375b5633b5..69fefef647 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -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 ] || \
diff --git a/tools/Rules.mk b/tools/Rules.mk
index f2fcd2a811..49314d9fd7 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -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
diff --git a/tools/blktap/Makefile b/tools/blktap/Makefile
index d4019c0252..9dc571853a 100644
--- a/tools/blktap/Makefile
+++ b/tools/blktap/Makefile
@@ -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
diff --git a/tools/blktap/parallax/Makefile b/tools/blktap/parallax/Makefile
index a6a0c0a3f8..8500c1728b 100644
--- a/tools/blktap/parallax/Makefile
+++ b/tools/blktap/parallax/Makefile
@@ -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)
diff --git a/tools/blktap/ublkback/Makefile b/tools/blktap/ublkback/Makefile
index 6915d2f523..0ed19cae6b 100644
--- a/tools/blktap/ublkback/Makefile
+++ b/tools/blktap/ublkback/Makefile
@@ -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)
diff --git a/tools/check/Makefile b/tools/check/Makefile
index 744f0983b5..4605c03c39 100644
--- a/tools/check/Makefile
+++ b/tools/check/Makefile
@@ -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
diff --git a/tools/console/Makefile b/tools/console/Makefile
index 206621d083..cbef956c5f 100644
--- a/tools/console/Makefile
+++ b/tools/console/Makefile
@@ -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)
diff --git a/tools/console/testsuite/Makefile b/tools/console/testsuite/Makefile
index 2deb7d43d6..71deb0a6f8 100644
--- a/tools/console/testsuite/Makefile
+++ b/tools/console/testsuite/Makefile
@@ -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
diff --git a/tools/debugger/libxendebug/Makefile b/tools/debugger/libxendebug/Makefile
index d0a90e1267..2e16446253 100644
--- a/tools/debugger/libxendebug/Makefile
+++ b/tools/debugger/libxendebug/Makefile
@@ -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
diff --git a/tools/debugger/pdb/Makefile b/tools/debugger/pdb/Makefile
index 1842ec7d0b..03cdc486b4 100644
--- a/tools/debugger/pdb/Makefile
+++ b/tools/debugger/pdb/Makefile
@@ -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
diff --git a/tools/debugger/pdb/linux-2.6-module/Makefile b/tools/debugger/pdb/linux-2.6-module/Makefile
index 609596f6c9..9025cd85c1 100644
--- a/tools/debugger/pdb/linux-2.6-module/Makefile
+++ b/tools/debugger/pdb/linux-2.6-module/Makefile
@@ -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
diff --git a/tools/debugger/pdb/linux-2.6-patches/Makefile b/tools/debugger/pdb/linux-2.6-patches/Makefile
index 7d062510d8..f2cb7f6ef5 100644
--- a/tools/debugger/pdb/linux-2.6-patches/Makefile
+++ b/tools/debugger/pdb/linux-2.6-patches/Makefile
@@ -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 :
diff --git a/tools/examples/Makefile b/tools/examples/Makefile
index 37a94b6329..93a8242637 100644
--- a/tools/examples/Makefile
+++ b/tools/examples/Makefile
@@ -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:
diff --git a/tools/firmware/Makefile b/tools/firmware/Makefile
index d0c738a41d..63ccb7b17e 100644
--- a/tools/firmware/Makefile
+++ b/tools/firmware/Makefile
@@ -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 $@; \
diff --git a/tools/firmware/acpi/Makefile b/tools/firmware/acpi/Makefile
index 26d932fbea..1932b0cc7b 100644
--- a/tools/firmware/acpi/Makefile
+++ b/tools/firmware/acpi/Makefile
@@ -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
diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile
index 5a821f7dcb..c38832fbc5 100644
--- a/tools/firmware/hvmloader/Makefile
+++ b/tools/firmware/hvmloader/Makefile
@@ -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)
diff --git a/tools/firmware/rombios/Makefile b/tools/firmware/rombios/Makefile
index 0624e81e96..3f4200df25 100644
--- a/tools/firmware/rombios/Makefile
+++ b/tools/firmware/rombios/Makefile
@@ -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
diff --git a/tools/firmware/vgabios/Makefile b/tools/firmware/vgabios/Makefile
index 2b27e01f7c..b5482ea8c7 100644
--- a/tools/firmware/vgabios/Makefile
+++ b/tools/firmware/vgabios/Makefile
@@ -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 \
diff --git a/tools/firmware/vmxassist/Makefile b/tools/firmware/vmxassist/Makefile
index 17b13b2be2..d34d107373 100644
--- a/tools/firmware/vmxassist/Makefile
+++ b/tools/firmware/vmxassist/Makefile
@@ -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)
diff --git a/tools/guest-headers/Makefile b/tools/guest-headers/Makefile
index ce9395a8ab..dc1456667f 100644
--- a/tools/guest-headers/Makefile
+++ b/tools/guest-headers/Makefile
@@ -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:
diff --git a/tools/ioemu/Makefile b/tools/ioemu/Makefile
index 09c69c77ec..d17550f4bf 100644
--- a/tools/ioemu/Makefile
+++ b/tools/ioemu/Makefile
@@ -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
diff --git a/tools/ioemu/target-i386-dm/Makefile b/tools/ioemu/target-i386-dm/Makefile
index 3219711167..c5dcc83208 100644
--- a/tools/ioemu/target-i386-dm/Makefile
+++ b/tools/ioemu/target-i386-dm/Makefile
@@ -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
diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
index cbe5855a1d..e4a6ac798a 100644
--- a/tools/libxc/Makefile
+++ b/tools/libxc/Makefile
@@ -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
diff --git a/tools/misc/Makefile b/tools/misc/Makefile
index 003947c8e3..eb110d7e2b 100644
--- a/tools/misc/Makefile
+++ b/tools/misc/Makefile
@@ -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
diff --git a/tools/misc/cpuperf/Makefile b/tools/misc/cpuperf/Makefile
index 185660efcb..932c5e82b5 100644
--- a/tools/misc/cpuperf/Makefile
+++ b/tools/misc/cpuperf/Makefile
@@ -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
diff --git a/tools/misc/lomount/Makefile b/tools/misc/lomount/Makefile
index 1a47c0b45f..0ed470b1d3 100644
--- a/tools/misc/lomount/Makefile
+++ b/tools/misc/lomount/Makefile
@@ -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)
diff --git a/tools/misc/mbootpack/Makefile b/tools/misc/mbootpack/Makefile
index d1e3334bf7..18116688f3 100644
--- a/tools/misc/mbootpack/Makefile
+++ b/tools/misc/mbootpack/Makefile
@@ -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:
diff --git a/tools/misc/miniterm/Makefile b/tools/misc/miniterm/Makefile
index 6229d6b95b..5b596a5f9f 100644
--- a/tools/misc/miniterm/Makefile
+++ b/tools/misc/miniterm/Makefile
@@ -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) *~
diff --git a/tools/misc/nsplitd/Makefile b/tools/misc/nsplitd/Makefile
index 8880ceabf7..d15bb4d12b 100644
--- a/tools/misc/nsplitd/Makefile
+++ b/tools/misc/nsplitd/Makefile
@@ -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) *~
diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
index 197b89a1a8..75bf46bc83 100644
--- a/tools/pygrub/Makefile
+++ b/tools/pygrub/Makefile
@@ -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"
@@ -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 *~ a.out
diff --git a/tools/pygrub/src/fsys/ext2/ext2module.c b/tools/pygrub/src/fsys/ext2/ext2module.c
index 63d20f2983..57f1a83eaf 100644
--- a/tools/pygrub/src/fsys/ext2/ext2module.c
+++ b/tools/pygrub/src/fsys/ext2/ext2module.c
@@ -228,7 +228,10 @@ ext2_fs_open (Ext2Fs *fs, PyObject *args, PyObject *kwargs)
}
#ifdef HAVE_EXT2FS_OPEN2
- if (offset != 0) {
+ if (offset == 0) {
+ offsetopt[0] = '\0';
+ }
+ else {
snprintf(offsetopt, 29, "offset=%d", offset);
}
diff --git a/tools/python/Makefile b/tools/python/Makefile
index 87d08a22e6..b3e404cb9f 100644
--- a/tools/python/Makefile
+++ b/tools/python/Makefile
@@ -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" --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 *~
diff --git a/tools/python/xen/util/diagnose.py b/tools/python/xen/util/diagnose.py
index 51c59fdfff..d2d51eb626 100644
--- a/tools/python/xen/util/diagnose.py
+++ b/tools/python/xen/util/diagnose.py
@@ -41,7 +41,7 @@ def diagnose(dom):
global dompath
try:
- domain = server.xend_domain(dom)
+ domain = server.xend.domain(dom)
state = sxp.child_value(domain, 'state')
domid = int(sxp.child_value(domain, 'domid'))
name = sxp.child_value(domain, 'name')
diff --git a/tools/security/Makefile b/tools/security/Makefile
index 75646c6f46..7ac197b854 100644
--- a/tools/security/Makefile
+++ b/tools/security/Makefile
@@ -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)
diff --git a/tools/sv/Makefile b/tools/sv/Makefile
index 06aa7c50ef..c9ae1deb0d 100644
--- a/tools/sv/Makefile
+++ b/tools/sv/Makefile
@@ -1,2 +1,3 @@
+.PHONY: all
all:
diff --git a/tools/tests/Makefile b/tools/tests/Makefile
index 99b6b20408..afa6578619 100644
--- a/tools/tests/Makefile
+++ b/tools/tests/Makefile
@@ -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
diff --git a/tools/vnet/Makefile b/tools/vnet/Makefile
index 7d16a7369f..33827c6a90 100644
--- a/tools/vnet/Makefile
+++ b/tools/vnet/Makefile
@@ -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'
diff --git a/tools/vnet/doc/Makefile b/tools/vnet/doc/Makefile
index 6ca7585f15..67f70ab68d 100644
--- a/tools/vnet/doc/Makefile
+++ b/tools/vnet/doc/Makefile
@@ -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)
diff --git a/tools/vnet/examples/Makefile b/tools/vnet/examples/Makefile
index 6953ef10cd..ba605ca318 100644
--- a/tools/vnet/examples/Makefile
+++ b/tools/vnet/examples/Makefile
@@ -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:
diff --git a/tools/vnet/libxutil/Makefile b/tools/vnet/libxutil/Makefile
index 8ace83e554..757e5567d6 100644
--- a/tools/vnet/libxutil/Makefile
+++ b/tools/vnet/libxutil/Makefile
@@ -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) *~
diff --git a/tools/vnet/scripts/Makefile b/tools/vnet/scripts/Makefile
index 05f737edc4..077d6b6224 100644
--- a/tools/vnet/scripts/Makefile
+++ b/tools/vnet/scripts/Makefile
@@ -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:
diff --git a/tools/vnet/vnetd/Makefile b/tools/vnet/vnetd/Makefile
index 74a3d07b40..fe54c21bd1 100644
--- a/tools/vnet/vnetd/Makefile
+++ b/tools/vnet/vnetd/Makefile
@@ -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
diff --git a/tools/vtpm/Makefile b/tools/vtpm/Makefile
index d34882f619..377f1b0436 100644
--- a/tools/vtpm/Makefile
+++ b/tools/vtpm/Makefile
@@ -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); \
diff --git a/tools/vtpm_manager/Makefile b/tools/vtpm_manager/Makefile
index f57b82facb..1ae3a180ee 100644
--- a/tools/vtpm_manager/Makefile
+++ b/tools/vtpm_manager/Makefile
@@ -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 $@; \
diff --git a/tools/vtpm_manager/crypto/Makefile b/tools/vtpm_manager/crypto/Makefile
index 160fce812e..63233a940e 100644
--- a/tools/vtpm_manager/crypto/Makefile
+++ b/tools/vtpm_manager/crypto/Makefile
@@ -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 *~
diff --git a/tools/vtpm_manager/manager/Makefile b/tools/vtpm_manager/manager/Makefile
index 278a37e963..d0b3526b42 100644
--- a/tools/vtpm_manager/manager/Makefile
+++ b/tools/vtpm_manager/manager/Makefile
@@ -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) *~
diff --git a/tools/vtpm_manager/tcs/Makefile b/tools/vtpm_manager/tcs/Makefile
index 56f4166fdf..9d25817e63 100644
--- a/tools/vtpm_manager/tcs/Makefile
+++ b/tools/vtpm_manager/tcs/Makefile
@@ -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 *~
diff --git a/tools/vtpm_manager/util/Makefile b/tools/vtpm_manager/util/Makefile
index 8e59d0d8d3..9e26c5df15 100644
--- a/tools/vtpm_manager/util/Makefile
+++ b/tools/vtpm_manager/util/Makefile
@@ -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 *~
diff --git a/tools/xcutils/Makefile b/tools/xcutils/Makefile
index 9907dfa0c5..4c7354afb8 100644
--- a/tools/xcutils/Makefile
+++ b/tools/xcutils/Makefile
@@ -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)
diff --git a/tools/xenmon/Makefile b/tools/xenmon/Makefile
index ffdca8049e..baba3e129d 100644
--- a/tools/xenmon/Makefile
+++ b/tools/xenmon/Makefile
@@ -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)
diff --git a/tools/xenstat/libxenstat/Makefile b/tools/xenstat/libxenstat/Makefile
index 52832017ff..f97f2a7618 100644
--- a/tools/xenstat/libxenstat/Makefile
+++ b/tools/xenstat/libxenstat/Makefile
@@ -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)
diff --git a/tools/xenstat/xentop/Makefile b/tools/xenstat/xentop/Makefile
index 633fd57064..d3b7671bdb 100644
--- a/tools/xenstat/xentop/Makefile
+++ b/tools/xenstat/xentop/Makefile
@@ -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,19 @@ CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT)
LDFLAGS += -L$(XEN_LIBXENSTAT)
LDLIBS += -lxenstat -lncurses
+.PHONY: all
all: xentop
+.PHONY: 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
diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
index 70877eff8a..708662e8fc 100644
--- a/tools/xenstore/Makefile
+++ b/tools/xenstore/Makefile
@@ -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
@@ -55,14 +57,17 @@ xenstored_test: xenstored_core_test.o xenstored_watch_test.o xenstored_domain_te
xs_tdb_dump: xs_tdb_dump.o utils.o tdb.o talloc.o
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
+.PHONY: xs_test xs_random xs_stress xs_crashme
xs_test xs_random xs_stress xs_crashme: LDFLAGS+=-lpthread
xs_test: xs_test.o xs_lib.o utils.o
xs_random: xs_random.o xs_test_lib.o xs_lib.o talloc.o utils.o
xs_stress: xs_stress.o xs_test_lib.o xs_lib.o talloc.o utils.o
xs_crashme: xs_crashme.o xs_lib.o talloc.o utils.o
+.PHONY: speedtest
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 +85,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 +93,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
diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile
index b02a39b18e..f7f8ac1969 100644
--- a/tools/xentrace/Makefile
+++ b/tools/xentrace/Makefile
@@ -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)