ia64/xen-unstable

changeset 13740:b51ed174fe8f

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@xensource.com>
author Ian Campbell <ian.campbell@xensource.com>
date Tue Jan 30 13:46:48 2007 +0000 (2007-01-30)
parents b33a7d45d50a
children f91dd7642a42
files Makefile tools/Rules.mk xen/Makefile
line diff
     1.1 --- a/Makefile	Tue Jan 30 13:42:19 2007 +0000
     1.2 +++ b/Makefile	Tue Jan 30 13:46:48 2007 +0000
     1.3 @@ -22,7 +22,7 @@ endif
     1.4  install: install-xen install-kernels install-tools install-docs
     1.5  
     1.6  .PHONY: build
     1.7 -build: kernels build-headers
     1.8 +build: kernels
     1.9  	$(MAKE) -C xen build
    1.10  	$(MAKE) -C tools build
    1.11  	$(MAKE) -C docs build
    1.12 @@ -59,11 +59,11 @@ prep-kernels:
    1.13  	for i in $(XKERNELS) ; do $(MAKE) $$i-prep || exit 1; done
    1.14  
    1.15  .PHONY: install-xen
    1.16 -install-xen: build-headers
    1.17 +install-xen:
    1.18  	$(MAKE) -C xen install
    1.19  
    1.20  .PHONY: install-tools
    1.21 -install-tools: build-headers
    1.22 +install-tools:
    1.23  	$(MAKE) -C tools install
    1.24  
    1.25  .PHONY: install-kernels
    1.26 @@ -82,11 +82,6 @@ dev-docs:
    1.27  .PHONY: kbuild
    1.28  kbuild: kernels
    1.29  
    1.30 -# generate header files
    1.31 -.PHONY: build-headers
    1.32 -build-headers:
    1.33 -	$(MAKE) -C xen/include/public/foreign
    1.34 -
    1.35  # Delete the kernel build trees entirely
    1.36  .PHONY: kdelete
    1.37  kdelete:
     2.1 --- a/tools/Rules.mk	Tue Jan 30 13:42:19 2007 +0000
     2.2 +++ b/tools/Rules.mk	Tue Jan 30 13:46:48 2007 +0000
     2.3 @@ -32,7 +32,7 @@ CFLAGS += $(CFLAGS-y)
     2.4  %.o: %.cc
     2.5  	$(CC) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
     2.6  
     2.7 -.PHONY: mk-symlinks mk-symlinks-xen mk-symlinks-$(XEN_OS)
     2.8 +.PHONY: mk-symlinks mk-symlinks-xen mk-symlinks-$(XEN_OS) mk-foreign-headers
     2.9  
    2.10  mk-symlinks-SunOS:
    2.11  
    2.12 @@ -43,7 +43,7 @@ mk-symlinks-Linux:
    2.13  	  ln -sf ../../$(LINUX_ROOT)/include/xen/public/*.h . )
    2.14  	( cd xen && rm -f sys && ln -sf linux sys )
    2.15  
    2.16 -mk-symlinks-xen:
    2.17 +mk-symlinks-xen: mk-foreign-headers
    2.18  	mkdir -p xen
    2.19  	( cd xen && ln -sf ../$(XEN_ROOT)/xen/include/public/*.h . )
    2.20  	mkdir -p xen/hvm
    2.21 @@ -55,4 +55,7 @@ mk-symlinks-xen:
    2.22  	mkdir -p xen/foreign
    2.23  	( cd xen/foreign && ln -sf ../../$(XEN_ROOT)/xen/include/public/foreign/*.h . )
    2.24  
    2.25 +mk-foreign-headers:
    2.26 +	make -C $(XEN_ROOT)/xen/include/public/foreign
    2.27 +
    2.28  mk-symlinks: mk-symlinks-xen mk-symlinks-$(XEN_OS)
     3.1 --- a/xen/Makefile	Tue Jan 30 13:42:19 2007 +0000
     3.2 +++ b/xen/Makefile	Tue Jan 30 13:46:48 2007 +0000
     3.3 @@ -22,7 +22,7 @@ build install debug clean distclean csco
     3.4  _build: $(TARGET).gz
     3.5  
     3.6  .PHONY: _install
     3.7 -_install: $(TARGET).gz
     3.8 +_install: $(TARGET).gz build-headers
     3.9  	[ -d $(DESTDIR)/boot ] || $(INSTALL_DIR) $(DESTDIR)/boot
    3.10  	$(INSTALL_DATA) $(TARGET).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_FULLVERSION).gz
    3.11  	ln -f -s $(notdir $(TARGET))-$(XEN_FULLVERSION).gz $(DESTDIR)/boot/$(notdir $(TARGET))-$(XEN_VERSION).$(XEN_SUBVERSION).gz
    3.12 @@ -69,7 +69,7 @@ build install debug clean distclean csco
    3.13  	gzip -f -9 < $< > $@.new
    3.14  	mv $@.new $@
    3.15  
    3.16 -$(TARGET): delete-unfresh-files
    3.17 +$(TARGET): delete-unfresh-files build-headers
    3.18  	$(MAKE) -C tools
    3.19  	$(MAKE) -f $(BASEDIR)/Rules.mk include/xen/compile.h
    3.20  	$(MAKE) -f $(BASEDIR)/Rules.mk include/xen/acm_policy.h
    3.21 @@ -133,6 +133,11 @@ include/asm-$(TARGET_ARCH)/asm-offsets.h
    3.22  	  echo ""; \
    3.23  	  echo "#endif") <$< >$@
    3.24  
    3.25 +# generate header files
    3.26 +.PHONY: build-headers
    3.27 +build-headers:
    3.28 +	$(MAKE) -C include/public/foreign
    3.29 +
    3.30  SUBDIRS = acm arch/$(TARGET_ARCH) common drivers 
    3.31  define all_sources
    3.32      ( find include/asm-$(TARGET_ARCH) -name '*.h' -print; \