# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
# Date 1170164808 0
# Node ID b51ed174fe8f92949d04767816223e8842365cb5
# Parent b33a7d45d50a2d1566111e54a066b91890832a2d
Push the target to build foreign headers into tools and xen
directories. This allows those directories to be built independently
without relying on the toplevel Makefile.
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
---
Makefile | 11 +++--------
tools/Rules.mk | 7 +++++--
xen/Makefile | 9 +++++++--
3 files changed, 15 insertions(+), 12 deletions(-)
diff -r b33a7d45d50a -r b51ed174fe8f Makefile
--- a/Makefile Tue Jan 30 13:42:19 2007 +0000
+++ b/Makefile Tue Jan 30 13:46:48 2007 +0000
@@ -22,7 +22,7 @@ install: install-xen install-kernels ins
install: install-xen install-kernels install-tools install-docs
.PHONY: build
-build: kernels build-headers
+build: kernels
$(MAKE) -C xen build
$(MAKE) -C tools build
$(MAKE) -C docs build
@@ -59,11 +59,11 @@ prep-kernels:
for i in $(XKERNELS) ; do $(MAKE) $$i-prep || exit 1; done
.PHONY: install-xen
-install-xen: build-headers
+install-xen:
$(MAKE) -C xen install
.PHONY: install-tools
-install-tools: build-headers
+install-tools:
$(MAKE) -C tools install
.PHONY: install-kernels
@@ -81,11 +81,6 @@ dev-docs:
# Build all the various kernels and modules
.PHONY: kbuild
kbuild: kernels
-
-# generate header files
-.PHONY: build-headers
-build-headers:
- $(MAKE) -C xen/include/public/foreign
# Delete the kernel build trees entirely
.PHONY: kdelete
diff -r b33a7d45d50a -r b51ed174fe8f tools/Rules.mk
--- a/tools/Rules.mk Tue Jan 30 13:42:19 2007 +0000
+++ b/tools/Rules.mk Tue Jan 30 13:46:48 2007 +0000
@@ -32,7 +32,7 @@ CFLAGS += $(CFLAGS-y)
%.o: %.cc
$(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
-.PHONY: mk-symlinks mk-symlinks-xen mk-symlinks-$(XEN_OS)
+.PHONY: mk-symlinks mk-symlinks-xen mk-symlinks-$(XEN_OS) mk-foreign-headers
mk-symlinks-SunOS:
@@ -43,7 +43,7 @@ mk-symlinks-Linux:
ln -sf ../../$(LINUX_ROOT)/include/xen/public/*.h . )
( cd xen && rm -f sys && ln -sf linux sys )
-mk-symlinks-xen:
+mk-symlinks-xen: mk-foreign-headers
mkdir -p xen
( cd xen && ln -sf ../$(XEN_ROOT)/xen/include/public/*.h . )
mkdir -p xen/hvm
@@ -55,4 +55,7 @@ mk-symlinks-xen:
mkdir -p xen/foreign
( cd xen/foreign && ln -sf
../../$(XEN_ROOT)/xen/include/public/foreign/*.h . )
+mk-foreign-headers:
+ make -C $(XEN_ROOT)/xen/include/public/foreign
+
mk-symlinks: mk-symlinks-xen mk-symlinks-$(XEN_OS)
diff -r b33a7d45d50a -r b51ed174fe8f xen/Makefile
--- a/xen/Makefile Tue Jan 30 13:42:19 2007 +0000
+++ b/xen/Makefile Tue Jan 30 13:46:48 2007 +0000
@@ -22,7 +22,7 @@ _build: $(TARGET).gz
_build: $(TARGET).gz
.PHONY: _install
-_install: $(TARGET).gz
+_install: $(TARGET).gz build-headers
[ -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
@@ -69,7 +69,7 @@ _distclean: clean
gzip -f -9 < $< > $@.new
mv $@.new $@
-$(TARGET): delete-unfresh-files
+$(TARGET): delete-unfresh-files build-headers
$(MAKE) -C tools
$(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h
$(MAKE) -f $(BASEDIR)/Rules.mk include/xen/acm_policy.h
@@ -133,6 +133,11 @@ include/asm-$(TARGET_ARCH)/asm-offsets.h
echo ""; \
echo "#endif") <$< >$@
+# generate header files
+.PHONY: build-headers
+build-headers:
+ $(MAKE) -C include/public/foreign
+
SUBDIRS = acm arch/$(TARGET_ARCH) common drivers
define all_sources
( find include/asm-$(TARGET_ARCH) -name '*.h' -print; \
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|