aboutsummaryrefslogtreecommitdiffstats
path: root/xen
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 /xen
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 'xen')
-rw-r--r--xen/Makefile20
-rw-r--r--xen/Rules.mk4
-rw-r--r--xen/arch/ia64/Makefile3
-rw-r--r--xen/arch/ia64/tools/privop/Makefile3
-rw-r--r--xen/arch/x86/Makefile3
-rw-r--r--xen/tools/Makefile3
-rw-r--r--xen/tools/figlet/Makefile1
7 files changed, 31 insertions, 6 deletions
diff --git a/xen/Makefile b/xen/Makefile
index c34445ac37..3bda17760f 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -7,17 +7,21 @@ export XEN_FULLVERSION := $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
export BASEDIR := $(CURDIR)
+.PHONY: default
default: build
ifeq ($(XEN_ROOT),)
+.PHONY: build install clean
build install clean:
make -f Rules.mk $@
else
+.PHONY: build
build: $(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
@@ -31,6 +35,7 @@ install: $(TARGET).gz
$(INSTALL_DATA) include/public/io/*.h $(DESTDIR)/usr/include/xen/io
$(INSTALL_DATA) include/public/COPYING $(DESTDIR)/usr/include/xen
+.PHONY: clean
clean:: delete-unfresh-files
$(MAKE) -C tools clean
$(MAKE) -f $(BASEDIR)/Rules.mk -C common clean
@@ -43,9 +48,11 @@ clean:: delete-unfresh-files
endif
+.PHONY: install
dist: install
-debug: FORCE
+.PHONY: debug
+debug:
objdump -D -S $(TARGET)-syms > $(TARGET).s
$(TARGET).gz: $(TARGET)
@@ -63,6 +70,7 @@ $(TARGET): delete-unfresh-files
# 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; \
@@ -119,8 +127,6 @@ include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
echo ""; \
echo "#endif") <$< >$@
-.PHONY: default debug build 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; \
@@ -128,12 +134,20 @@ define all_sources
-name config \) -prune -o -name '*.h' -print; \
find $(SUBDIRS) -name SCCS -prune -o -name '*.[chS]' -print )
endef
+
+.PHONY: TAGS
TAGS:
$(all_sources) | etags -
+
+.PHONY: tags
tags:
$(all_sources) | xargs ctags
+
+.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/Rules.mk b/xen/Rules.mk
index 1f4687f7fa..82449c344f 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -86,13 +86,15 @@ 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
-clean:: $(addprefix _clean_, $(subdir-all)) FORCE
+.PHONY: clean
+clean:: $(addprefix _clean_, $(subdir-all))
rm -f *.o *~ core
_clean_%/: FORCE
$(MAKE) -f $(BASEDIR)/Rules.mk -C $* clean
diff --git a/xen/arch/ia64/Makefile b/xen/arch/ia64/Makefile
index 14db4f2fa9..4ce2d7acd5 100644
--- a/xen/arch/ia64/Makefile
+++ b/xen/arch/ia64/Makefile
@@ -75,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
diff --git a/xen/arch/ia64/tools/privop/Makefile b/xen/arch/ia64/tools/privop/Makefile
index c4e9b1c9fd..fb64e9087e 100644
--- a/xen/arch/ia64/tools/privop/Makefile
+++ b/xen/arch/ia64/tools/privop/Makefile
@@ -1,10 +1,13 @@
CC=gcc
CFLAGS=-O -Wall
+.PHONY: all
all: postat
+.PHONY: postat
postat: postat.c pohcalls.o
+.PHONY: clean
clean:
$(RM) -f *.o postat *.s *~
diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 5e70e72533..7ce15fea93 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -77,5 +77,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
diff --git a/xen/tools/Makefile b/xen/tools/Makefile
index 4d353617bd..67c48ce168 100644
--- a/xen/tools/Makefile
+++ b/xen/tools/Makefile
@@ -1,13 +1,16 @@
include $(BASEDIR)/../Config.mk
+.PHONY: default
default:
$(MAKE) -C figlet
$(MAKE) symbols
+.PHONY: clean
clean:
$(MAKE) -C figlet clean
rm -f *.o symbols
+.PHONY: symbols
symbols: symbols.c
$(HOSTCC) $(HOSTCFLAGS) -o $@ $<
diff --git a/xen/tools/figlet/Makefile b/xen/tools/figlet/Makefile
index bb9c64fa79..cc44294dad 100644
--- a/xen/tools/figlet/Makefile
+++ b/xen/tools/figlet/Makefile
@@ -4,5 +4,6 @@ include $(BASEDIR)/../Config.mk
figlet: figlet.c
$(HOSTCC) -o $@ $<
+.PHONY: clean
clean:
rm -f *.o figlet