diff options
author | jkim <jkim@FreeBSD.org> | 2010-10-14 23:31:58 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2010-10-14 23:31:58 +0000 |
commit | 14375cfe0483dbaa81b0c610f8f7de3ec2e65dba (patch) | |
tree | 165b412e77bb844bab4e157561c0b5709bc502e5 | |
parent | 6b87db6229949831f7144c5f9eb26333841b9fe8 (diff) | |
download | FreeBSD-src-14375cfe0483dbaa81b0c610f8f7de3ec2e65dba.zip FreeBSD-src-14375cfe0483dbaa81b0c610f8f7de3ec2e65dba.tar.gz |
Stop hard coding nm(1) and make it overridable.
-rw-r--r-- | sys/conf/files.amd64 | 2 | ||||
-rw-r--r-- | sys/modules/acpi/acpi/Makefile | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index ec7ffb5..a3b113b 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -87,7 +87,7 @@ acpi_wakecode.h optional acpi \ clean "acpi_wakecode.h" acpi_wakedata.h optional acpi \ dependency "acpi_wakecode.o" \ - compile-with 'nm -n --defined-only acpi_wakecode.o | while read offset dummy what; do echo "#define $${what} 0x$${offset}"; done > ${.TARGET}' \ + compile-with '${NM} -n --defined-only acpi_wakecode.o | while read offset dummy what; do echo "#define $${what} 0x$${offset}"; done > ${.TARGET}' \ no-obj no-implicit-rule before-depend \ clean "acpi_wakedata.h" # diff --git a/sys/modules/acpi/acpi/Makefile b/sys/modules/acpi/acpi/Makefile index f71609d..c98e91f 100644 --- a/sys/modules/acpi/acpi/Makefile +++ b/sys/modules/acpi/acpi/Makefile @@ -108,18 +108,22 @@ CFLAGS+=-DSMP SRCS+= acpi_switch.S acpi_wakedata.h CLEANFILES+= acpi_wakedata.h ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} +NORMAL_S= ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} +NM?= nm acpi_switch.o: acpi_switch.S - ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} + ${NORMAL_S} acpi_wakecode.o: acpi_wakecode.S assym.s - ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} + ${NORMAL_S} acpi_wakecode.bin: acpi_wakecode.o objcopy -S -O binary acpi_wakecode.o ${.TARGET} acpi_wakecode.h: acpi_wakecode.bin file2c -sx 'static char wakecode[] = {' '};' < acpi_wakecode.bin > \ ${.TARGET} acpi_wakedata.h: acpi_wakecode.o - nm -n --defined-only ${.ALLSRC} | while read offset dummy what; do \ - echo "#define $${what} 0x$${offset}"; done > ${.TARGET} + ${NM} -n --defined-only acpi_wakecode.o | \ + while read offset dummy what; do \ + echo "#define $${what} 0x$${offset}"; \ + done > ${.TARGET} .else acpi_wakecode.h: acpi_wakecode.S assym.s ${MAKE} -f ${.CURDIR}/../../../${MACHINE_CPUARCH}/acpica/Makefile \ |