Skip to contentSkip to conversation

Makefile cleanup.

PATCH New Michal Ostrowski 1 participant 1 message Oct 4, 2005 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile cleanup.

changeset:   7197:c092fbcc18c6
user:        [email protected]
date:        Tue Oct  4 11:45:05 2005 -0400
summary:     Move setting of configuration variables to Config.mk.

Allows for partial-tree builds to be invoked from a sub-directory. Allow for users to include a ".config" with additional custom settings.

Config.mk +12 -0
diff -r 73e930d47aff -r c092fbcc18c6 Config.mk
@@ -1,4 +1,6 @@
 # -*- mode: Makefile; -*-
+
+-include $(XEN_ROOT)/.config
 
 # Currently supported architectures: x86_32, x86_64
 XEN_COMPILE_ARCH    ?= $(shell uname -m | sed -e s/i.86/x86_32/)
@@ -19,6 +21,16 @@
 STRIP      = $(CROSS_COMPILE)strip
 OBJCOPY    = $(CROSS_COMPILE)objcopy
 OBJDUMP    = $(CROSS_COMPILE)objdump
+
+# Default is to install to local 'dist' directory.
+DISTDIR ?= $(XEN_ROOT)/dist
+DESTDIR ?= $(DISTDIR)/install
+
+INSTALL                := install
+INSTALL_DIR    := $(INSTALL) -d -m0755
+INSTALL_DATA   := $(INSTALL) -m0644
+INSTALL_PROG   := $(INSTALL) -m0755
+
 
 ifeq ($(XEN_TARGET_ARCH),x86_64)
 LIBDIR = lib64
Makefile +1 -11
diff -r 73e930d47aff -r c092fbcc18c6 Makefile
@@ -1,23 +1,12 @@
 #
 # Grand Unified Makefile for Xen.
 #
-
-# Default is to install to local 'dist' directory.
-DISTDIR ?= $(CURDIR)/dist
-DESTDIR ?= $(DISTDIR)/install
-
-INSTALL		:= install
-INSTALL_DIR	:= $(INSTALL) -d -m0755
-INSTALL_DATA	:= $(INSTALL) -m0644
-INSTALL_PROG	:= $(INSTALL) -m0755
 
 KERNELS ?= linux-2.6-xen0 linux-2.6-xenU
 # linux-2.4-xen0 linux-2.4-xenU netbsd-2.0-xenU
 # You may use wildcards in the above e.g. KERNELS=*2.4*
 
 XKERNELS := $(foreach kernel, $(KERNELS), $(patsubst buildconfigs/mk.%,%,$(wildcard buildconfigs/mk.$(kernel))) )
-
-export DESTDIR
 
 # Export target architecture overrides to Xen and Linux sub-trees.
 ifneq ($(XEN_TARGET_ARCH),)
@@ -28,6 +17,7 @@
 # Default target must appear before any include lines
 all: dist
 
+XEN_ROOT=$(CURDIR)
 include Config.mk
 include buildconfigs/Rules.mk
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel