ia64/xen-unstable

view xen/Makefile @ 9917:42c73f3d7ac1

This patch changes to format in which EIP is printed to be consistent on 64-bit regardless of whether the addresses
leading bits are set or clear. It additionally changes the formatting so that trailing spaces are avoided, and it
suppresses the printing of empty records. It also prevents combining records with identical EIP but from different
domains.

It further changes the type of some variables from plain int to unsigned int, as that is yielding more efficient code
on x86-64 (signed 32-bit array indices require explicit sign extension, whereas in most cases an extra copy can be
avoided when the index type is unsigned, since all 32-bit operations already zero-extend their results).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kaf24@firebug.cl.cam.ac.uk
date Tue May 02 15:36:07 2006 +0100 (2006-05-02)
parents 25e4cd1c3d26
children c51c1e7ce0a3
line source
1 # This is the correct place to edit the build version.
2 # All other places this is stored (eg. compile.h) should be autogenerated.
3 export XEN_VERSION := 3
4 export XEN_SUBVERSION := 0
5 export XEN_EXTRAVERSION := -unstable
6 export XEN_FULLVERSION := $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
8 export BASEDIR := $(CURDIR)
10 .PHONY: default
11 default: build
13 .PHONY: dist
14 dist: install
16 .PHONY: build install clean cscope TAGS tags
17 build install debug clean cscope TAGS tags::
18 make -f Rules.mk _$@
20 .PHONY: _build
21 _build: $(TARGET).gz
23 .PHONY: _install
24 _install: $(TARGET).gz
25 [ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot
26 $(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION).gz
27 ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).gz
28 ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).gz
29 ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET)).gz
30 $(INSTALL_DATA) $(TARGET)-syms $(DESTDIR)/boot/$(notdir $(TARGET))-syms-$(XEN_FULLVERSION)
31 [ -d $(DESTDIR)/usr/include/xen/io ] || \
32 $(INSTALL_DIR) $(DESTDIR)/usr/include/xen/io
33 $(INSTALL_DATA) include/public/*.h $(DESTDIR)/usr/include/xen
34 $(INSTALL_DATA) include/public/io/*.h $(DESTDIR)/usr/include/xen/io
35 $(INSTALL_DATA) include/public/COPYING $(DESTDIR)/usr/include/xen
37 .PHONY: _debug
38 _debug:
39 objdump -D -S $(TARGET)-syms > $(TARGET).s
41 .PHONY: _clean
42 _clean: delete-unfresh-files
43 $(MAKE) -C tools clean
44 $(MAKE) -f $(BASEDIR)/Rules.mk -C common clean
45 $(MAKE) -f $(BASEDIR)/Rules.mk -C drivers clean
46 $(MAKE) -f $(BASEDIR)/Rules.mk -C acm clean
47 $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean
48 rm -f include/asm *.o $(TARGET)* *~ core
49 rm -f include/asm-*/asm-offsets.h
50 rm -f include/xen/acm_policy.h
52 $(TARGET).gz: $(TARGET)
53 gzip -f -9 < $< > $@.new
54 mv $@.new $@
56 $(TARGET): delete-unfresh-files
57 $(MAKE) -C tools
58 $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h
59 $(MAKE) -f $(BASEDIR)/Rules.mk include/xen/acm_policy.h
60 [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
61 $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) asm-offsets.s
62 $(MAKE) -f $(BASEDIR)/Rules.mk include/asm-$(TARGET_ARCH)/asm-offsets.h
63 $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $(TARGET)
65 # drivers/char/console.o contains static banner/compile info. Blow it away.
66 # Don't refresh these files during e.g., 'sudo make install'
67 .PHONY: delete-unfresh-files
68 delete-unfresh-files:
69 @if [ ! -r include/xen/compile.h -o -O include/xen/compile.h ]; then \
70 rm -f include/xen/{banner,compile}.h; \
71 fi
73 # acm_policy.h contains security policy for Xen
74 include/xen/acm_policy.h:
75 @(set -e; \
76 echo "/*"; \
77 echo " * DO NOT MODIFY."; \
78 echo " *"; \
79 echo " * This file was auto-generated by xen/Makefile $<"; \
80 echo " *"; \
81 echo " */"; \
82 echo ""; \
83 echo "#ifndef ACM_DEFAULT_SECURITY_POLICY"; \
84 echo "#define ACM_DEFAULT_SECURITY_POLICY $(ACM_DEFAULT_SECURITY_POLICY)"; \
85 echo "#endif") >$@
87 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
88 include/xen/compile.h: LANG=C
89 include/xen/compile.h: include/xen/compile.h.in include/xen/banner.h
90 @sed -e 's/@@date@@/$(shell date)/g' \
91 -e 's/@@time@@/$(shell date +%T)/g' \
92 -e 's/@@whoami@@/$(shell whoami)/g' \
93 -e 's/@@domain@@/$(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown]))/g' \
94 -e 's/@@hostname@@/$(shell hostname)/g' \
95 -e 's|@@compiler@@|$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -n 1 | sed -e "s;|;/;")|g' \
96 -e 's/@@version@@/$(XEN_VERSION)/g' \
97 -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
98 -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
99 -e 's!@@changeset@@!$(shell ((hg parents || head -n 7 ../ChangeLog || echo date: unavailable) | awk '{FS="changeset:[ ]+"}/^changeset/{CS=$$2};{FS="date:[ ]+"}/^date/{D=$$2}; END {print D, CS}') 2>/dev/null)!g' \
100 < include/xen/compile.h.in > $@.new
101 @cat include/xen/banner.h >> $@.new
102 @mv -f $@.new $@
104 include/xen/banner.h:
105 tools/figlet/figlet -d tools/figlet Xen $(XEN_FULLVERSION) > $@.new
106 @mv -f $@.new $@
108 include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
109 @(set -e; \
110 echo "/*"; \
111 echo " * DO NOT MODIFY."; \
112 echo " *"; \
113 echo " * This file was auto-generated from $<"; \
114 echo " *"; \
115 echo " */"; \
116 echo ""; \
117 echo "#ifndef __ASM_OFFSETS_H__"; \
118 echo "#define __ASM_OFFSETS_H__"; \
119 echo ""; \
120 sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \
121 echo ""; \
122 echo "#endif") <$< >$@
124 SUBDIRS = acm arch/$(TARGET_ARCH) common drivers
125 define all_sources
126 ( find include/asm-$(TARGET_ARCH) -name SCCS -prune -o -name '*.h' -print; \
127 find include -type d -name SCCS -prune -o \( -name "asm-*" -o \
128 -name config \) -prune -o -name '*.h' -print; \
129 find $(SUBDIRS) -name SCCS -prune -o -name '*.[chS]' -print )
130 endef
132 .PHONY: _TAGS
133 _TAGS:
134 $(all_sources) | etags -
136 .PHONY: _tags
137 _tags:
138 $(all_sources) | xargs ctags
140 .PHONY: _cscope
141 _cscope:
142 $(all_sources) > cscope.files
143 cscope -k -b -q
145 .PHONY: MAP
146 MAP:
147 $(NM) $(TARGET) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map