[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Restructure the makefiles used to drive builds of linux 2.6 kernels.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 303d51d0d57898334b92a66d827afb91b5659ac0
# Parent  aad1d3e231ffa2240a13e266ce3ced22a7cdec8f
Restructure the makefiles used to drive builds of linux 2.6 kernels.  
A common file eliminates duplication across makefiles.

Signed-off-by: Michal Ostrowski <mostrows@xxxxxxxxxxxxxx>

diff -r aad1d3e231ff -r 303d51d0d578 buildconfigs/mk.linux-2.6-xen
--- a/buildconfigs/mk.linux-2.6-xen     Wed Oct  5 12:32:00 2005
+++ b/buildconfigs/mk.linux-2.6-xen     Wed Oct  5 12:41:59 2005
@@ -4,7 +4,7 @@
 LINUX_SERIES = 2.6
 LINUX_VER    = 2.6.12
 
-EXTRAVERSION = xen
+EXTRAVERSION ?= xen
 
 LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
 
diff -r aad1d3e231ff -r 303d51d0d578 buildconfigs/mk.linux-2.6-xen0
--- a/buildconfigs/mk.linux-2.6-xen0    Wed Oct  5 12:32:00 2005
+++ b/buildconfigs/mk.linux-2.6-xen0    Wed Oct  5 12:41:59 2005
@@ -1,51 +1,2 @@
-
-OS           = linux
-
-LINUX_SERIES = 2.6
-LINUX_VER    = 2.6.12
-
 EXTRAVERSION = xen0
-
-LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
-
-include buildconfigs/Rules.mk
-
-.PHONY: build clean delete
-
-# The real action starts here!
-build: $(LINUX_DIR)/include/linux/autoconf.h
-       if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
-           $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
-           $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) 
INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
-       fi
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) 
install
-
-$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
-       rm -rf $(LINUX_DIR)
-       cp -al $(<D) $(LINUX_DIR)
-       # Apply arch-xen patches
-       ( cd linux-$(LINUX_SERIES)-xen-sparse ; \
-          LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
-       # Re-use config from install dir if one exits else use default config
-       CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' 
$(LINUX_DIR)/Makefile); \
-       [ -r 
$(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
-         cp 
$(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) 
$(LINUX_DIR)/.config \
-         || cp 
$(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TARGET_ARCH) \
-               $(LINUX_DIR)/.config
-       # See if we need to munge config to enable PAE
-       $(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk 
config-update-pae
-       # Patch kernel Makefile to set EXTRAVERSION
-       ( cd $(LINUX_DIR) ; \
-         sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = 
-$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
-         rm -f Makefile ; mv Mk.tmp Makefile )
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
-
-config: CONFIGMODE = menuconfig
-config: $(LINUX_DIR)/include/linux/autoconf.h
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
-
-clean::
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
-
-delete: 
-       rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 
+include buildconfigs/mk.linux-2.6-xen
diff -r aad1d3e231ff -r 303d51d0d578 buildconfigs/mk.linux-2.6-xenU
--- a/buildconfigs/mk.linux-2.6-xenU    Wed Oct  5 12:32:00 2005
+++ b/buildconfigs/mk.linux-2.6-xenU    Wed Oct  5 12:41:59 2005
@@ -1,51 +1,2 @@
-
-OS           = linux
-
-LINUX_SERIES = 2.6
-LINUX_VER    = 2.6.12
-
 EXTRAVERSION = xenU
-
-LINUX_DIR    = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
-
-include buildconfigs/Rules.mk
-
-.PHONY: build clean delete
-
-# The real action starts here!
-build: $(LINUX_DIR)/include/linux/autoconf.h
-       if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
-           $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
-           $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) 
INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
-       fi
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) 
install
-
-$(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
-       rm -rf $(LINUX_DIR)
-       cp -al $(<D) $(LINUX_DIR)
-       # Apply arch-xen patches
-       ( cd linux-$(LINUX_SERIES)-xen-sparse ; \
-          LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
-       # Re-use config from install dir if one exits else use default config
-       CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' 
$(LINUX_DIR)/Makefile); \
-       [ -r 
$(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
-         cp 
$(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) 
$(LINUX_DIR)/.config \
-         || cp 
$(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TARGET_ARCH) \
-               $(LINUX_DIR)/.config
-       # See if we need to munge config to enable PAE
-       $(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk 
config-update-pae
-       # Patch kernel Makefile to set EXTRAVERSION
-       ( cd $(LINUX_DIR) ; \
-         sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = 
-$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
-         rm -f Makefile ; mv Mk.tmp Makefile )
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
-
-config: CONFIGMODE = menuconfig
-config: $(LINUX_DIR)/include/linux/autoconf.h
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
-
-clean::
-       $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
-
-delete: 
-       rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR) 
+include buildconfigs/mk.linux-2.6-xen

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.