WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Conditionalize building the Xen ACPI driver.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Conditionalize building the Xen ACPI driver.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 19 Mar 2006 14:44:07 +0000
Delivery-date: Sun, 19 Mar 2006 14:45:28 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID f513384a18ee703af2bd13f1eff16b789ac75cf4
# Parent  5b56d1e1ac8b9aa8d6b13545de772936efdfcaae
Conditionalize building the Xen ACPI driver.

Also introduces some cleanups to the Xen build system.

Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 5b56d1e1ac8b -r f513384a18ee xen/Rules.mk
--- a/xen/Rules.mk      Sun Mar 19 11:48:51 2006
+++ b/xen/Rules.mk      Sun Mar 19 12:13:35 2006
@@ -7,6 +7,15 @@
 perfc       ?= n
 perfc_arrays?= n
 crash_debug ?= n
+
+# Hardcoded configuration implications and dependencies.
+# Do this is a neater way if it becomes unwieldy.
+ifeq ($(debug),y)
+verbose := y
+endif
+ifeq ($(perfc_arrays),y)
+perfc := y
+endif
 
 XEN_ROOT=$(BASEDIR)/..
 include $(XEN_ROOT)/Config.mk
@@ -32,36 +41,29 @@
 OBJS    := $(patsubst %.S,%.o,$(S_SRCS))
 OBJS    += $(patsubst %.c,%.o,$(C_SRCS))
 
-# Note that link order matters!
-ALL_OBJS := $(BASEDIR)/common/common.o
-ALL_OBJS += $(BASEDIR)/drivers/char/driver.o
-ALL_OBJS += $(BASEDIR)/drivers/acpi/driver.o
-ifeq ($(ACM_SECURITY),y)
-ALL_OBJS += $(BASEDIR)/acm/acm.o
-CFLAGS += -DACM_SECURITY
-endif
-ALL_OBJS += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
+ALL_OBJS-y :=
+CFLAGS-y   :=
+subdirs-y  :=
+subdirs-n  :=
 
 include $(BASEDIR)/arch/$(TARGET_ARCH)/Rules.mk
 
-CFLAGS += -g -D__XEN__
+# Note that link order matters!
+ALL_OBJS-y               += $(BASEDIR)/common/common.o
+ALL_OBJS-y               += $(BASEDIR)/drivers/char/driver.o
+ALL_OBJS-$(HAS_ACPI)     += $(BASEDIR)/drivers/acpi/driver.o
+ALL_OBJS-$(ACM_SECURITY) += $(BASEDIR)/acm/acm.o
+ALL_OBJS-y               += $(BASEDIR)/arch/$(TARGET_ARCH)/arch.o
 
-ifneq ($(debug)$(verbose),nn)
-CFLAGS += -DVERBOSE
-endif
+CFLAGS-y               += -g -D__XEN__
+CFLAGS-$(ACM_SECURITY) += -DACM_SECURITY
+CFLAGS-$(verbose)      += -DVERBOSE
+CFLAGS-$(crash_debug)  += -DCRASH_DEBUG
+CFLAGS-$(perfc)        += -DPERF_COUNTERS
+CFLAGS-$(perfc_arrays) += -DPERF_ARRAYS
 
-ifeq ($(crash_debug),y)
-CFLAGS += -DCRASH_DEBUG
-endif
-
-ifeq ($(perfc),y)
-CFLAGS += -DPERF_COUNTERS
-ifeq ($(perfc_arrays),y)
-CFLAGS += -DPERF_ARRAYS
-endif
-endif
-
-CFLAGS := $(strip $(CFLAGS))
+ALL_OBJS := $(ALL_OBJS-y)
+CFLAGS   := $(strip $(CFLAGS) $(CFLAGS-y))
 
 %.o: %.c $(HDRS) Makefile
        $(CC) $(CFLAGS) -c $< -o $@
diff -r 5b56d1e1ac8b -r f513384a18ee xen/arch/ia64/Rules.mk
--- a/xen/arch/ia64/Rules.mk    Sun Mar 19 11:48:51 2006
+++ b/xen/arch/ia64/Rules.mk    Sun Mar 19 12:13:35 2006
@@ -1,6 +1,7 @@
 ########################################
 # ia64-specific definitions
 
+HAS_ACPI := y
 VALIDATE_VT    ?= n
 ifneq ($(COMPILE_ARCH),$(TARGET_ARCH))
 CROSS_COMPILE ?= /usr/local/sp_env/v2.2.5/i686/bin/ia64-unknown-linux-
diff -r 5b56d1e1ac8b -r f513384a18ee xen/arch/x86/Rules.mk
--- a/xen/arch/x86/Rules.mk     Sun Mar 19 11:48:51 2006
+++ b/xen/arch/x86/Rules.mk     Sun Mar 19 12:13:35 2006
@@ -1,5 +1,7 @@
 ########################################
 # x86-specific definitions
+
+HAS_ACPI := y
 
 #
 # If you change any of these configuration options then you must
diff -r 5b56d1e1ac8b -r f513384a18ee xen/drivers/Makefile
--- a/xen/drivers/Makefile      Sun Mar 19 11:48:51 2006
+++ b/xen/drivers/Makefile      Sun Mar 19 12:13:35 2006
@@ -1,8 +1,6 @@
+include $(BASEDIR)/Rules.mk
 
-default:
-       $(MAKE) -C char
-       $(MAKE) -C acpi
+subdirs-y := char/
+subdirs-$(HAS_ACPI) += acpi/
 
-clean:
-       $(MAKE) -C char clean
-       $(MAKE) -C acpi clean
+include $(BASEDIR)/Post.mk
diff -r 5b56d1e1ac8b -r f513384a18ee xen/Post.mk
--- /dev/null   Sun Mar 19 11:48:51 2006
+++ b/xen/Post.mk       Sun Mar 19 12:13:35 2006
@@ -0,0 +1,15 @@
+
+subdirs-all := $(subdirs-y) $(subdirs-n)
+
+default: $(subdirs-y)
+
+.PHONY: FORCE
+FORCE:
+
+%/: FORCE
+       $(MAKE) -C $*
+
+clean: $(addprefix _clean_, $(subdirs-all))
+_clean_%/: FORCE
+       $(MAKE) -C $* clean
+

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Conditionalize building the Xen ACPI driver., Xen patchbot -unstable <=