Author: jkim
Date: Thu Oct 14 23:31:58 2010
New Revision: 213884
URL: http://svn.freebsd.org/changeset/base/213884

Log:
  Stop hard coding nm(1) and make it overridable.

Modified:
  head/sys/conf/files.amd64
  head/sys/modules/acpi/acpi/Makefile

Modified: head/sys/conf/files.amd64
==============================================================================
--- head/sys/conf/files.amd64   Thu Oct 14 23:28:31 2010        (r213883)
+++ head/sys/conf/files.amd64   Thu Oct 14 23:31:58 2010        (r213884)
@@ -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"
 #

Modified: head/sys/modules/acpi/acpi/Makefile
==============================================================================
--- head/sys/modules/acpi/acpi/Makefile Thu Oct 14 23:28:31 2010        
(r213883)
+++ head/sys/modules/acpi/acpi/Makefile Thu Oct 14 23:31:58 2010        
(r213884)
@@ -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 \
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to