bitkeeper revision 1.1159.223.40 (41f676cbajLGqFeWFqajtJ3X4OkgoA)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Tue, 25 Jan 2005 16:41:47 +0000 (16:41 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Tue, 25 Jan 2005 16:41:47 +0000 (16:41 +0000)
Build system fixes.
Signed-off-by: keir.fraser@cl.cam.ac.uk
15 files changed:
Makefile
docs/Makefile
linux-2.4.29-xen-sparse/arch/xen/Makefile
linux-2.6.10-xen-sparse/arch/xen/Makefile
tools/Makefile
tools/examples/Makefile
tools/libxutil/Makefile
tools/python/Makefile
tools/vnet/Makefile
tools/vnet/examples/Makefile
tools/vnet/vnet-module/Makefile-2.4
tools/vnet/vnet-module/Makefile-2.6
tools/vnet/vnetd/Makefile
tools/xfrd/Makefile
xen/Makefile

index c7b4640eccf487b9a6dc65ec7318d3c39af874a8..0bd91f33abdcb1d7a17c56a26725cf0d1ef82305 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,9 +2,6 @@
 # Grand Unified Makefile for Xen.
 #
 
-DISTDIR                ?= $(CURDIR)/dist
-DESTDIR                ?= $(DISTDIR)/install
-
 INSTALL                := install
 INSTALL_DIR    := $(INSTALL) -d -m0755
 INSTALL_DATA   := $(INSTALL) -m0644
@@ -18,7 +15,6 @@ ALLKERNELS = $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.*))
 ALLSPARSETREES = $(patsubst %-xen-sparse,%,$(wildcard *-xen-sparse))
 XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
 
-
 export DESTDIR
 
 include buildconfigs/Rules.mk
@@ -31,26 +27,16 @@ all: dist
 
 # install everything into the standard system directories
 # NB: install explicitly does not check that everything is up to date!
-install: install-tools install-xen install-kernels install-docs
+install: xen checked-tools kernels docs
 
-install-xen:
-       $(MAKE) -C xen install
-
-install-tools:
+# Only check for install req'mts on 'make install', not on 'make dist'.
+checked-tools:
+       $(MAKE) -C tools/check install
        $(MAKE) -C tools install
 
-install-kernels:
-       cp -a $(DESTDIR)/boot/* /boot/
-       cp -a $(DESTDIR)/lib/modules/* /lib/modules/
-       cp -dR $(DESTDIR)/boot/*$(LINUX_VER)* $(prefix)/boot/
-       cp -dR $(DESTDIR)/lib/modules/* $(prefix)/lib/modules/
-
-install-docs:
-       sh ./docs/check_pkgs && $(MAKE) -C docs install || true
-       sh ./docs/check_pkgs
-       -$(MAKE) -C docs install
-
 # build and install everything into local dist directory
+dist: DISTDIR=$(CURDIR)/dist
+dist: DESTDIR=$(DISTDIR)/install
 dist: xen tools kernels docs
        $(INSTALL_DIR) $(DISTDIR)/check
        $(INSTALL_DATA) ./COPYING $(DISTDIR)
@@ -59,17 +45,16 @@ dist: xen tools kernels docs
        $(INSTALL_PROG) tools/check/chk tools/check/check_* $(DISTDIR)/check
 
 xen:
-       $(MAKE) dist=yes -C xen install
+       $(MAKE) -C xen install
 
 tools:
-       $(MAKE) dist=yes -C tools install
+       $(MAKE) -C tools install
 
 kernels:
        for i in $(XKERNELS) ; do $(MAKE) $$i-build || exit 1; done
 
 docs:
-       sh ./docs/check_pkgs
-       -$(MAKE) dist=yes -C docs install
+       sh ./docs/check_pkgs && $(MAKE) -C docs install || true
 
 # Build all the various kernels and modules
 kbuild: kernels
@@ -126,21 +111,17 @@ install-iptables:
 
 help:
        @echo 'Installation targets:'
-       @echo '  install          - install everything'
-       @echo '  install-xen      - install the Xen hypervisor'
-       @echo '  install-tools    - install the control tools'
-       @echo '  install-kernels  - install guest kernels'
-       @echo '  install-docs     - install documentation'
+       @echo '  install          - build and install everything'
        @echo ''
        @echo 'Building targets:'
-       @echo '  dist             - build everything and place in dist/'
+       @echo '  dist             - build and install everything into local dist directory'
        @echo '  world            - clean everything, delete guest kernel build'
        @echo '                     trees then make dist'
-       @echo '  xen              - build Xen hypervisor and place in dist/'
-       @echo '  tools            - build tools and place in dist/'
-       @echo '  kernels          - build guest kernels and place in dist/'
+       @echo '  xen              - build and install Xen hypervisor'
+       @echo '  tools            - build and install tools'
+       @echo '  kernels          - build and install guest kernels'
        @echo '  kbuild           - synonym for make kernels'
-       @echo '  docs             - build docs and place in dist/'
+       @echo '  docs             - build and install docs'
        @echo ''
        @echo 'Cleaning targets:'
        @echo '  clean            - clean the Xen, tools and docs (but not'
index 46c2d38c59511385ee9ffa26ce58ff56254c2e40..d9ae6715ac7fa7181f80a132e8b9e4a32c348693 100644 (file)
@@ -10,10 +10,7 @@ FIG2DEV              := fig2dev
 TGIF           := tgif
 LATEX2HTML     := latex2html
 
-package                = xen
-prefix         = /usr
-docdir         = $(prefix)/share/doc
-pkgdocdir      = $(docdir)/$(package)
+pkgdocdir      := /usr/share/doc/xen
 
 DOC_TEX                := $(wildcard src/*.tex)
 DOC_PS         := $(patsubst src/%.tex,ps/%.ps,$(DOC_TEX))
index df13c06a6ecd23c7e15d076e32a0c15f1a57f1a8..0f1d0580da45ac9d34ae3f30fd652c755b924dde 100644 (file)
@@ -118,9 +118,6 @@ install: bzImage
        install -m0664 .config $(INSTALL_PATH)/boot/config-$(INSTALL_NAME)$(INSTALL_SUFFIX)
        install -m0664 System.map $(INSTALL_PATH)/boot/System.map-$(INSTALL_NAME)$(INSTALL_SUFFIX)
 
-dist: 
-       $(MAKE) INSTALL_PATH=../dist/install install
-
 %_config: arch/xen/defconfig-%
        rm -f .config arch/xen/defconfig
        cp -f arch/xen/defconfig-$(@:_config=) arch/xen/defconfig
index eeaea0c89e7021dc20da61588047d3ecca6088f7..86132ecf16aef8f52108f48ed3b286ecfee4766d 100644 (file)
@@ -54,8 +54,6 @@ install: vmlinuz
        install -m0664 System.map $(INSTALL_PATH)/boot/System.map-$(XINSTALL_NAME)$(INSTALL_SUFFIX)
        mkdir -p $(INSTALL_PATH)/usr/include/xen/linux
        install -m0644 include/asm-xen/linux-public/*.h $(INSTALL_PATH)/usr/include/xen/linux
-dist:
-       $(MAKE) INSTALL_PATH=../dist/install install
 
 archclean:
        @if [ -e arch/xen/arch ]; then $(MAKE) $(clean)=arch/xen/arch; fi;
index 722f9d9f7df363e0349c07c7ab19f98abcdde3b7..907260707bda775bb4697bfcab48d3f6ce993dfd 100644 (file)
@@ -10,9 +10,7 @@ all:
        $(MAKE) -C xfrd
 
 install: 
-ifneq ($(dist),yes)
-       $(MAKE) -C check install
-endif
+       $(MAKE) -C check
        $(MAKE) -C libxutil install
        $(MAKE) -C libxc install
        $(MAKE) -C misc install
@@ -22,10 +20,6 @@ endif
        $(MAKE) -C xfrd install
        $(MAKE) -C sv install
 
-dist: $(TARGET)
-       $(MAKE) prefix=$(CURDIR)/../dist/install dist=yes install
-
-
 clean:
        $(MAKE) -C libxutil clean
        $(MAKE) -C libxc clean
index 0fb4950476686d024771134583d7364f00abe849..cc9ebbc50e3a7b9fd9e5d244424e8d8e170b250b 100644 (file)
@@ -33,14 +33,14 @@ install-configs:
        $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
        $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)/auto
        for i in $(XEN_CONFIGS); \
-           do [ -a $(DESTDIR)/$(XEN_CONFIG_DIR)/$$i ] || \
+           do [ -a $(DESTDIR)$(XEN_CONFIG_DIR)/$$i ] || \
            $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
        done
 
 install-scripts:
        $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
        for i in $(XEN_SCRIPTS); \
-           do [ -a $(DESTDIR)/$()/$$i ] || \
+           do [ -a $(DESTDIR)$(XEN_SCRIPT_DIR)/$$i ] || \
            $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
        done
 
index d68699de282311ee552e897e75139541712d1669..bedbcc7c5c192d16ca39dedde5da04011b1bd3a8 100644 (file)
@@ -25,11 +25,7 @@ LIB_SRCS += util.c
 
 LIB_OBJS := $(LIB_SRCS:.c=.o)
 
-CFLAGS   += -Wall
-CFLAGS   += -Werror
-CFLAGS   += -g
-CFLAGS   += -O3
-CFLAGS   += -fno-strict-aliasing
+CFLAGS   += -Wall -Werror -O3 -fno-strict-aliasing
 
 # Get gcc to generate the dependencies for us.
 CFLAGS   += -Wp,-MD,.$(@F).d
index 9d39bd85b40e78796098fa33671e8c06d04b9485..18bfeb1f7d50af262763942011122f6340fadd9a 100644 (file)
@@ -3,11 +3,7 @@ all:
        python setup.py build
 
 install: all
-       if [ "$(DESTDIR)" = "" ]; then                   \
-           python setup.py install;                     \
-       else                                             \
-           python setup.py install --root="$(DESTDIR)"; \
-       fi
+       python setup.py install --home="$(DESTDIR)/usr"
 
 clean:
        rm -rf build *.pyc *.pyo *.o *.a *~
index 1eddeb44cc6d149d8add2ccf24550f2b4502cb21..63939dff9dbf41de6395da2fa59bbb466ac3767e 100644 (file)
@@ -44,9 +44,6 @@ install: compile
        $(MAKE) -C vnet-module install
        $(MAKE) -C examples install
 
-dist: $(TARGET)
-       $(MAKE) install
-
 clean:
        -$(MAKE) -C vnetd clean
        -$(MAKE) -C vnet-module clean
index fe9d9f56ad12bb641d61d51f9440ad0adcc539e5..d0cc4a6e57cee787dd5ecf1dfdcdb0fa66c69172 100644 (file)
@@ -6,7 +6,7 @@ XEN_SCRIPT_DIR:=/etc/xen/scripts
 all:
 
 install:
-       install -m 0755 -d $(prefix)$(XEN_SCRIPT_DIR)
-       install -m 0554 network-vnet $(prefix)$(XEN_SCRIPT_DIR)
+       install -m 0755 -d $(DESTDIR)$(XEN_SCRIPT_DIR)
+       install -m 0554 network-vnet $(DESTDIR)$(XEN_SCRIPT_DIR)
 
 clean:
\ No newline at end of file
index 4a512aaa3b960feb17a48de4c1202f35fba09056..68c34c2b2941d74692e74dbd5655cb07a377e13a 100644 (file)
@@ -83,8 +83,8 @@ $(KERNEL_MODULE): $(VNET_OBJ)
 
 .PHONY: install install-module modules_install
 install install-module modules_install: module
-       install -m 0755 -d $(prefix)$(KERNEL_MODULE_DIR)
-       install -m 0554 $(KERNEL_MODULE) $(prefix)$(KERNEL_MODULE_DIR)
+       install -m 0755 -d $(DESTDIR)$(KERNEL_MODULE_DIR)
+       install -m 0554 $(KERNEL_MODULE) $(DESTDIR)$(KERNEL_MODULE_DIR)
 
 TAGS:
        etags *.c *.h
index 698644a1f4f5cc87a788cb581588936748b269c7..64e57ea5ffb60da69f51cf2783e73d441363eece 100644 (file)
@@ -38,8 +38,8 @@ module modules:
 
 .PHONY: install install-module modules_install
 install install-module modules_install: module
-       install -m 0755 -d $(prefix)$(KERNEL_MODULE_DIR)
-       install -m 0554 $(KERNEL_MODULE) $(prefix)$(KERNEL_MODULE_DIR)
+       install -m 0755 -d $(DESTDIR)$(KERNEL_MODULE_DIR)
+       install -m 0554 $(KERNEL_MODULE) $(DESTDIR)$(KERNEL_MODULE_DIR)
 
 .PHONY: clean
 clean:
index 69d4c0269c2d813798286ff131e4d9d36d20c7ab..be13801a0cf4cf1df5ce9741c0736b1f2a2489e3 100644 (file)
@@ -92,8 +92,8 @@ vnetd: $(VNETD_OBJ)
        $(CC) $(CFLAGS) -o $@ $^ $(VNETD_LIBS) -ldl -lpthread
 
 install: vnetd
-       mkdir -p $(prefix)/$(VNETD_INSTALL_DIR)
-       install -m 0755 vnetd $(prefix)/$(VNETD_INSTALL_DIR)
+       mkdir -p $(DESTDIR)$(VNETD_INSTALL_DIR)
+       install -m 0755 vnetd $(DESTDIR)$(VNETD_INSTALL_DIR)
 
 clean:
        -rm -f *.a *.o *~
index 6ca1a1d12f7031891daeab79c06b5cece72edd3c..0b16891eaf499e310d486935529a365c69208328 100644 (file)
@@ -72,8 +72,8 @@ xfrd: $(XFRD_PROG_OBJ)
 
 .PHONY: install
 install: xfrd
-       $(INSTALL_DIR) $(DESTDIR)/$(XFRD_INSTALL_DIR)
-       $(INSTALL_PROG) xfrd $(DESTDIR)/$(XFRD_INSTALL_DIR)
+       $(INSTALL_DIR) $(DESTDIR)$(XFRD_INSTALL_DIR)
+       $(INSTALL_PROG) xfrd $(DESTDIR)$(XFRD_INSTALL_DIR)
 
 .PHONY: libutil
 libutil: $(UTIL_LIB)
index fd2c06df3daef92a4d7be01a73ee76d940c4761c..2a84ca6835df89e39b5d1bc07ed32781f7bf2887 100644 (file)
@@ -9,7 +9,6 @@ export XEN_SUBVERSION    = 0
 export XEN_EXTRAVERSION  = ""
 
 export BASEDIR          := $(CURDIR)
-DESTDIR                        := $(CURDIR)/../dist/install
 
 include Rules.mk
 
@@ -30,8 +29,6 @@ install: $(TARGET).gz
        $(INSTALL_DATA) include/public/io/*.h $(DESTDIR)/usr/include/xen/io
        $(INSTALL_DATA) include/public/COPYING $(DESTDIR)/usr/include/xen
 
-dist: install
-
 clean:
        $(MAKE) -C tools clean
        $(MAKE) -C common clean