Clean up Makefile's in preparation for importing new Intel ACPICA code.
authorYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Fri, 11 Mar 2005 18:27:49 +0000 (18:27 +0000)
committerYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Fri, 11 Mar 2005 18:27:49 +0000 (18:27 +0000)
Push .PATH and other variables into sys/dev/acpica5/Makefile.inc,
and share it with userland ACPI tools under usr.sbin/acpi.

sys/dev/acpica5/Makefile
sys/dev/acpica5/Makefile.inc
sys/dev/acpica5/acpi_toshiba/Makefile
usr.sbin/acpi/Makefile.inc

index 02214ae..ef24f33 100644 (file)
@@ -1,38 +1,19 @@
 # $FreeBSD: src/sys/modules/acpi/acpi/Makefile,v 1.3 2004/01/08 16:38:32 njl Exp $
-# $DragonFly: src/sys/dev/acpica5/Makefile,v 1.7 2004/12/20 17:21:38 dillon Exp $
-
-.include "Makefile.inc"
+# $DragonFly: src/sys/dev/acpica5/Makefile,v 1.8 2005/03/11 18:27:49 y0netan1 Exp $
 
 .PATH: ${.CURDIR}/../../${MACHINE_ARCH}/acpica5        \
        ${.CURDIR}/../../${MACHINE_ARCH}/isa            \
        ${.CURDIR}/../../bus/pci                        \
        ${.CURDIR}/Osd                                  \
-       ${.CURDIR}                                      \
-       ${.CURDIR}/../../${SYSACPICA}/interpreter/dispatcher    \
-       ${.CURDIR}/../../${SYSACPICA}/interpreter/executer      \
-       ${.CURDIR}/../../${SYSACPICA}/interpreter/parser        \
-       ${.CURDIR}/../../${SYSACPICA}/events                    \
-       ${.CURDIR}/../../${SYSACPICA}/hardware                  \
-       ${.CURDIR}/../../${SYSACPICA}/namespace                 \
-       ${.CURDIR}/../../${SYSACPICA}/resources                 \
-       ${.CURDIR}/../../${SYSACPICA}/tables                    \
-       ${.CURDIR}/../../${SYSACPICA}/utilities                 \
-       ${.CURDIR}/../../${SYSACPICA}/debugger                  \
-       ${.CURDIR}/../../${SYSACPICA}/disassembler              \
-       ${.CURDIR}/../../${SYSACPICA}/INTERPRETER/DISPATCHER    \
-       ${.CURDIR}/../../${SYSACPICA}/INTERPRETER/EXECUTER      \
-       ${.CURDIR}/../../${SYSACPICA}/INTERPRETER/PARSER        \
-       ${.CURDIR}/../../${SYSACPICA}/EVENTS                    \
-       ${.CURDIR}/../../${SYSACPICA}/HARDWARE                  \
-       ${.CURDIR}/../../${SYSACPICA}/NAMESPACE                 \
-       ${.CURDIR}/../../${SYSACPICA}/RESOURCES                 \
-       ${.CURDIR}/../../${SYSACPICA}/TABLES                    \
-       ${.CURDIR}/../../${SYSACPICA}/UTILITIES                 \
+       ${.CURDIR}
+
+SYSDIR?= ${.CURDIR}/../..
+.include "Makefile.inc"
+
 
 KMOD   = acpi
 
 # ACPI CA sources
-CFLAGS+=   -I${.OBJDIR} -I${.CURDIR} -I${.CURDIR}/../../${SYSACPICA}/include
 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
@@ -106,21 +87,6 @@ acpi_wakecode.h: acpi_wakecode.S
        ${MAKE} -f ${.CURDIR}/../../${MACHINE_ARCH}/acpica5/Makefile \
                MAKESRCPATH=${.CURDIR}/../../${MACHINE_ARCH}/acpica5
 
-# acpi.h includes "platform/acenv.h".  This is the easiest way to create
-# a modified acenv.h
-#
-${.OBJDIR}/acpi.h: ${.CURDIR}/../../${SYSACPICA}/include/acpi.h
-       cp ${.ALLSRC} ${.TARGET}
-
-${.OBJDIR}/platform/acenv.h: ${.CURDIR}/../../${SYSACPICA}/include/platform/acenv.h
-       if [ ! -d ${.OBJDIR}/platform ]; then mkdir ${.OBJDIR}/platform; fi
-       cat ${.ALLSRC} | \
-       sed -e 's/__FreeBSD__/__DragonFly__/' | \
-       sed -e 's/acfreebsd.h/acdragonfly.h/' > ${.TARGET}.new
-       mv -f ${.TARGET}.new ${.TARGET}
-
-SRCS+= ${.OBJDIR}/acpi.h ${.OBJDIR}/platform/acenv.h
-
 SUBDIR=        acpi_toshiba
 all: ${PROG} ${SUBDIR}
 
index c6278fe..3a7368a 100644 (file)
@@ -1,4 +1,46 @@
-# $DragonFly: src/sys/dev/acpica5/Makefile.inc,v 1.2 2004/07/05 00:07:35 dillon Exp $
+# $DragonFly: src/sys/dev/acpica5/Makefile.inc,v 1.3 2005/03/11 18:27:49 y0netan1 Exp $
 
-SYSACPICA_VERSION?=    20040527
-SYSACPICA?= contrib/dev/acpica-unix-${SYSACPICA_VERSION}
+SYSACPICA_VERSION=     20040527
+SYSACPICA_DIR?=                ${SYSDIR}/contrib/dev/acpica-unix-${SYSACPICA_VERSION}
+OSACPI_DIR?=           ${SYSDIR}/dev/acpica5
+
+CFLAGS+=       -I${.OBJDIR}                    \
+               -I${.CURDIR}                    \
+               -I${OSACPI_DIR}                 \
+               -I${SYSACPICA_DIR}/include
+
+.PATH: ${SYSACPICA_DIR}/interpreter/dispatcher \
+       ${SYSACPICA_DIR}/interpreter/executer   \
+       ${SYSACPICA_DIR}/interpreter/parser     \
+       ${SYSACPICA_DIR}/events                 \
+       ${SYSACPICA_DIR}/hardware               \
+       ${SYSACPICA_DIR}/namespace              \
+       ${SYSACPICA_DIR}/resources              \
+       ${SYSACPICA_DIR}/tables                 \
+       ${SYSACPICA_DIR}/utilities              \
+       ${SYSACPICA_DIR}/debugger               \
+       ${SYSACPICA_DIR}/disassembler           \
+       ${SYSACPICA_DIR}/INTERPRETER/DISPATCHER \
+       ${SYSACPICA_DIR}/INTERPRETER/EXECUTER   \
+       ${SYSACPICA_DIR}/INTERPRETER/PARSER     \
+       ${SYSACPICA_DIR}/EVENTS                 \
+       ${SYSACPICA_DIR}/HARDWARE               \
+       ${SYSACPICA_DIR}/NAMESPACE              \
+       ${SYSACPICA_DIR}/RESOURCES              \
+       ${SYSACPICA_DIR}/TABLES                 \
+       ${SYSACPICA_DIR}/UTILITIES
+
+# acpi.h includes "platform/acenv.h".  This is the easiest way to create
+# a modified acenv.h
+#
+${.OBJDIR}/acpi.h: ${SYSACPICA_DIR}/include/acpi.h
+       cp ${.ALLSRC} ${.TARGET}
+
+${.OBJDIR}/platform/acenv.h: ${SYSACPICA_DIR}/include/platform/acenv.h
+       if [ ! -d ${.OBJDIR}/platform ]; then mkdir ${.OBJDIR}/platform; fi
+       cat ${.ALLSRC} | \
+       sed -e 's/__FreeBSD__/__DragonFly__/' | \
+       sed -e 's/acfreebsd.h/acdragonfly.h/' > ${.TARGET}.new
+       mv -f ${.TARGET}.new ${.TARGET}
+
+SRCS+= ${.OBJDIR}/acpi.h ${.OBJDIR}/platform/acenv.h
index 39a163b..0138e3f 100644 (file)
@@ -1,7 +1,7 @@
 # $FreeBSD: src/sys/modules/acpi/acpi_toshiba/Makefile,v 1.1 2004/01/11 19:18:38 njl Exp $
-# $DragonFly: src/sys/dev/acpica5/acpi_toshiba/Makefile,v 1.1 2004/06/27 08:52:43 dillon Exp $
+# $DragonFly: src/sys/dev/acpica5/acpi_toshiba/Makefile,v 1.2 2005/03/11 18:27:49 y0netan1 Exp $
 
-.include "../Makefile.inc"
+SYSDIR?=${.CURDIR}/../../..
 .PATH:         ${.CURDIR}/../../../${MACHINE_ARCH}/acpica5
 
 KMOD=          acpi_toshiba
index 346705d..190e9b1 100644 (file)
@@ -1,58 +1,17 @@
 # $Id: Makefile.inc,v 1.1 2000/07/14 18:16:22 iwasaki Exp $
 # $FreeBSD: src/usr.sbin/acpi/Makefile.inc,v 1.8 2003/08/07 16:51:50 njl Exp $
-# $DragonFly: src/usr.sbin/acpi/Makefile.inc,v 1.1 2004/07/05 00:22:40 dillon Exp $
+# $DragonFly: src/usr.sbin/acpi/Makefile.inc,v 1.2 2005/03/11 18:27:49 y0netan1 Exp $
 
-# XXX use /sys/dev/acpica5/Makefile.inc
 SYSDIR?= ${.CURDIR}/../../../sys
 OSACPI_DIR= ${SYSDIR}/dev/acpica5
 .include "${OSACPI_DIR}/Makefile.inc"
-ACPICA_DIR?=   ${SYSDIR}/${SYSACPICA}
 
-CFLAGS+= -I${.OBJDIR}          \
-       -I${SYSDIR}             \
-       -I${OSACPI_DIR}         \
-       -I${ACPICA_DIR}/include \
-       -I${ACPICA_DIR}/compiler
+.PATH:         ${SYSACPICA_DIR}                \
+               ${SYSACPICA_DIR}/compiler       \
+               ${SYSACPICA_DIR}/common
+
+CFLAGS+=       -I${SYSACPICA_DIR}/compiler
 
 .if exists(${.CURDIR}/../../Makefile.inc)
 .include "${.CURDIR}/../../Makefile.inc"
 .endif
-
-# XXX share this with /sys/dev/acpica5/Makefile.inc?
-.PATH: ${ACPICA_DIR}                           \
-       ${ACPICA_DIR}/compiler                  \
-       ${ACPICA_DIR}/common                    \
-       ${ACPICA_DIR}/debugger                  \
-       ${ACPICA_DIR}/disassembler              \
-       ${ACPICA_DIR}/events                    \
-       ${ACPICA_DIR}/include                   \
-       ${ACPICA_DIR}/hardware                  \
-       ${ACPICA_DIR}/interpreter/dispatcher    \
-       ${ACPICA_DIR}/interpreter/executer      \
-       ${ACPICA_DIR}/interpreter/parser        \
-       ${ACPICA_DIR}/namespace                 \
-       ${ACPICA_DIR}/resources                 \
-       ${ACPICA_DIR}/tables                    \
-       ${ACPICA_DIR}/utilities                 \
-       ${ACPICA_DIR}/EVENTS                    \
-       ${ACPICA_DIR}/HARDWARE                  \
-       ${ACPICA_DIR}/INTERPRETER/DISPATCHER    \
-       ${ACPICA_DIR}/INTERPRETER/EXECUTER      \
-       ${ACPICA_DIR}/INTERPRETER/PARSER        \
-       ${ACPICA_DIR}/NAMESPACE                 \
-       ${ACPICA_DIR}/TABLES                    \
-
-# acpi.h includes "platform/acenv.h".  This is the easiest way to create
-# a modified acenv.h
-#
-${.OBJDIR}/acpi.h: ${ACPICA_DIR}/include/acpi.h
-       cp ${.ALLSRC} ${.TARGET}
-
-${.OBJDIR}/platform/acenv.h: ${ACPICA_DIR}/include/platform/acenv.h
-       if [ ! -d ${.OBJDIR}/platform ]; then mkdir ${.OBJDIR}/platform; fi
-       cat ${.ALLSRC} | \
-       sed -e 's/__FreeBSD__/__DragonFly__/' | \
-       sed -e 's/acfreebsd.h/acdragonfly.h/' > ${.TARGET}.new
-       mv -f ${.TARGET}.new ${.TARGET}
-
-SRCS+= ${.OBJDIR}/acpi.h ${.OBJDIR}/platform/acenv.h