ia64/xen-unstable

changeset 7225:8f8e42887f09

Clean up DESTDIR handling. Default install is to root
directory (/). This is only overridden automatically
for the 'make dist' targets and their legacy aliases
(make {xen,tools,kernels,docs}).

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Oct 05 15:05:38 2005 +0100 (2005-10-05)
parents 6bbfd6a98974
children 072fb38810a6
files Config.mk Makefile buildconfigs/Rules.mk linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c xen/Makefile
line diff
     1.1 --- a/Config.mk	Wed Oct 05 14:40:35 2005 +0100
     1.2 +++ b/Config.mk	Wed Oct 05 15:05:38 2005 +0100
     1.3 @@ -20,9 +20,7 @@ STRIP      = $(CROSS_COMPILE)strip
     1.4  OBJCOPY    = $(CROSS_COMPILE)objcopy
     1.5  OBJDUMP    = $(CROSS_COMPILE)objdump
     1.6  
     1.7 -# Default is to install to local 'dist' directory.
     1.8 -DISTDIR ?= $(XEN_ROOT)/dist
     1.9 -DESTDIR ?= $(DISTDIR)/install
    1.10 +DISTDIR     ?= $(XEN_ROOT)/dist
    1.11  
    1.12  INSTALL      = install
    1.13  INSTALL_DIR  = $(INSTALL) -d -m0755
     2.1 --- a/Makefile	Wed Oct 05 14:40:35 2005 +0100
     2.2 +++ b/Makefile	Wed Oct 05 15:05:38 2005 +0100
     2.3 @@ -37,23 +37,33 @@ build: kernels
     2.4  	$(MAKE) -C docs build
     2.5  
     2.6  # build and install everything into local dist directory
     2.7 -dist: xen kernels tools docs
     2.8 +dist: DESTDIR=$(DISTDIR)/install
     2.9 +dist: dist-xen dist-kernels dist-tools dist-docs
    2.10  	$(INSTALL_DIR) $(DISTDIR)/check
    2.11  	$(INSTALL_DATA) ./COPYING $(DISTDIR)
    2.12  	$(INSTALL_DATA) ./README $(DISTDIR)
    2.13  	$(INSTALL_PROG) ./install.sh $(DISTDIR)
    2.14  	$(INSTALL_PROG) tools/check/chk tools/check/check_* $(DISTDIR)/check
    2.15 +dist-%: DESTDIR=$(DISTDIR)/install
    2.16 +dist-%: install-%
    2.17 +	@: # do nothing
    2.18  
    2.19 -xen:
    2.20 +# Legacy dist targets
    2.21 +xen: dist-xen
    2.22 +tools: dist-tools
    2.23 +kernels: dist-kernels
    2.24 +docs: dist-docs
    2.25 +
    2.26 +install-xen:
    2.27  	$(MAKE) -C xen install
    2.28  
    2.29 -tools:
    2.30 +install-tools:
    2.31  	$(MAKE) -C tools install
    2.32  
    2.33 -kernels:
    2.34 +install-kernels:
    2.35  	for i in $(XKERNELS) ; do $(MAKE) $$i-build || exit 1; done
    2.36  
    2.37 -docs:
    2.38 +install-docs:
    2.39  	sh ./docs/check_pkgs && $(MAKE) -C docs install || true
    2.40  
    2.41  dev-docs:
    2.42 @@ -109,10 +119,6 @@ install-iptables:
    2.43  	tar -jxf iptables-1.2.11.tar.bz2
    2.44  	$(MAKE) -C iptables-1.2.11 PREFIX= KERNEL_DIR=../linux-$(LINUX_VER)-xen0 install
    2.45  
    2.46 -install-%: DESTDIR=
    2.47 -install-%: %
    2.48 -	@: # do nothing
    2.49 -
    2.50  help:
    2.51  	@echo 'Installation targets:'
    2.52  	@echo '  install          - build and install everything'
    2.53 @@ -151,7 +157,6 @@ help:
    2.54  	@echo '                     with extreme care!)'
    2.55  
    2.56  # Use this target with extreme care!
    2.57 -uninstall: DESTDIR=
    2.58  uninstall: D=$(DESTDIR)
    2.59  uninstall:
    2.60  	[ -d $(D)/etc/xen ] && mv -f $(D)/etc/xen $(D)/etc/xen.old-`date +%s` || true
     3.1 --- a/buildconfigs/Rules.mk	Wed Oct 05 14:40:35 2005 +0100
     3.2 +++ b/buildconfigs/Rules.mk	Wed Oct 05 15:05:38 2005 +0100
     3.3 @@ -1,11 +1,6 @@
     3.4  
     3.5  include Config.mk
     3.6  
     3.7 -# We expect these two to already be set if people 
     3.8 -# are using the top-level Makefile
     3.9 -DISTDIR	?= $(CURDIR)/dist
    3.10 -DESTDIR	?= $(DISTDIR)/install
    3.11 -
    3.12  export DESTDIR
    3.13  
    3.14  ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
     4.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c	Wed Oct 05 14:40:35 2005 +0100
     4.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/process.c	Wed Oct 05 15:05:38 2005 +0100
     4.3 @@ -94,7 +94,7 @@ void enable_hlt(void)
     4.4  }
     4.5  
     4.6  EXPORT_SYMBOL(enable_hlt);
     4.7 -
     4.8 +#define xxprint(msg) HYPERVISOR_console_io(CONSOLEIO_write, strlen(msg), msg)
     4.9  /* XXX XEN doesn't use default_idle(), poll_idle(). Use xen_idle() instead. */
    4.10  extern void stop_hz_timer(void);
    4.11  extern void start_hz_timer(void);
    4.12 @@ -121,10 +121,17 @@ extern void smp_resume(void);
    4.13  /* We don't actually take CPU down, just spin without interrupts. */
    4.14  static inline void play_dead(void)
    4.15  {
    4.16 +    char foo[100];
    4.17 +
    4.18 +    sprintf(foo, "cpu=%d stack=%p\n", smp_processor_id(), foo);
    4.19 +    xxprint(foo);
    4.20 +
    4.21  	/* Death loop */
    4.22  	while (__get_cpu_var(cpu_state) != CPU_UP_PREPARE)
    4.23  		HYPERVISOR_sched_op(SCHEDOP_yield, 0);
    4.24  
    4.25 +        xxprint("Out of loop\n");
    4.26 +
    4.27  	__flush_tlb_all();
    4.28     /* 
    4.29      * Restore IPI/IRQ mappings before marking online to prevent 
    4.30 @@ -169,10 +176,15 @@ void cpu_idle (void)
    4.31  			rmb();
    4.32  
    4.33  			if (cpu_is_offline(cpu)) {
    4.34 +                            char foo[100];
    4.35  				local_irq_disable();
    4.36  #ifdef CONFIG_SMP
    4.37  				smp_suspend();
    4.38  #endif
    4.39 +
    4.40 +                                sprintf(foo, "X cpu=%d stack=%p\n",
    4.41 +                                        cpu, &cpu);
    4.42 +                                xxprint(foo);
    4.43  #if defined(CONFIG_XEN) && defined(CONFIG_HOTPLUG_CPU)
    4.44  				/* Ack it.  From this point on until
    4.45  				   we get woken up, we're not allowed
     5.1 --- a/xen/Makefile	Wed Oct 05 14:40:35 2005 +0100
     5.2 +++ b/xen/Makefile	Wed Oct 05 15:05:38 2005 +0100
     5.3 @@ -1,7 +1,3 @@
     5.4 -# Default is to install to local 'dist' directory.
     5.5 -DISTDIR ?= ../dist
     5.6 -DESTDIR ?= $(DISTDIR)/install
     5.7 -
     5.8  INSTALL			= install
     5.9  INSTALL_DATA		= $(INSTALL) -m0644
    5.10  INSTALL_DIR		= $(INSTALL) -d -m0755