From: Sascha Wildner Date: Wed, 2 Feb 2011 18:04:16 +0000 (+0100) Subject: acpi(4): Always compile the files dealing with ACPI_DEBUG into the module. X-Git-Tag: v2.11.0~267^2~123 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/7b19b1789a96e40c92e42cf7291ad1819d6d043a acpi(4): Always compile the files dealing with ACPI_DEBUG into the module. Before this commit, one had to define ACPI_DEBUG as a make variable to enable debugging support in the module, such as in: $ make -DACPI_DEBUG buildkernel Specifying ACPI_DEBUG in the kernel config alone did not enable it, but our modules are supposed to honor kernel options. Also this was contrary to what the manual page says. So to make this work for ACPI_DEBUG too, we just put all the affected source files into SRCS and always compile them. #ifdef's in these source files will take care of enabling/disabling debugging support so a module compiled without ACPI_DEBUG defined in the kernel or on the command line will still not have support after this commit (I've checked with nm(1)). The only change for someone not using ACPI_DEBUG is a little bit of additional buildkernel time. FWIW, it is the same way in FreeBSD, too. Reported-by: Andrea Magliano --- diff --git a/sys/dev/acpica5/Makefile b/sys/dev/acpica5/Makefile index ebcc115fa6..e582e4b88d 100644 --- a/sys/dev/acpica5/Makefile +++ b/sys/dev/acpica5/Makefile @@ -31,6 +31,10 @@ CFLAGS+= -DACPI_DEBUG_CACHE=1 KMOD = acpi # ACPI CA sources +SRCS+= dbcmds.c dbdisply.c dbexec.c dbfileio.c dbhistry.c +SRCS+= dbinput.c dbstats.c dbutils.c dbxface.c +SRCS+= dmbuffer.c dmnames.c dmobject.c dmopcode.c dmresrc.c dmresrcl.c +SRCS+= dmresrcs.c dmutils.c dmwalk.c SRCS+= dsfield.c dsinit.c dsmethod.c dsmthdat.c SRCS+= dsobject.c dsopcode.c dsutils.c dswexec.c dswload.c SRCS+= dswscope.c dswstate.c evevent.c evgpe.c evgpeblk.c @@ -73,18 +77,11 @@ SRCS+= device_if.h bus_if.h pci_if.h pcib_if.h isa_if.h acpi_if.h acpi_wmi_if.h MFILES = kern/device_if.m kern/bus_if.m bus/pci/pci_if.m bus/pci/pcib_if.m MFILES+= bus/isa/isa_if.m dev/acpica5/acpi_if.m dev/acpica5/acpi_wmi_if.m -# Debugging support -DBSRC= dbcmds.c dbdisply.c dbexec.c dbfileio.c dbhistry.c -DBSRC+= dbinput.c dbstats.c dbutils.c dbxface.c -DBSRC+= dmbuffer.c dmnames.c dmopcode.c dmobject.c dmresrc.c dmresrcl.c -DBSRC+= dmresrcs.c dmutils.c dmwalk.c - .if ACPI_NO_SEMAPHORES CFLAGS+=-DACPI_NO_SEMAPHORES .endif .if ACPI_DEBUG CFLAGS+=-DACPI_DEBUG -SRCS+= ${DBSRC} opt_ddb.h: Makefile echo "#define DDB 1" > ${.TARGET} .else