Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/conf Pull up following revision(s) (requested by jmcn...



details:   https://anonhg.NetBSD.org/src/rev/16e44edc486f
branches:  netbsd-8
changeset: 850869:16e44edc486f
user:      snj <snj%NetBSD.org@localhost>
date:      Tue Jul 25 01:58:09 2017 +0000

description:
Pull up following revision(s) (requested by jmcneill in ticket #141):
        sys/conf/dts.mk: 1.1-1.2
        sys/conf/Makefile.kern.inc: revision 1.260
Move the dts rule to a separate file and add dependencies handling.
--
do dts depend processing in two passes, one for /include/ and one for #include

diffstat:

 sys/conf/Makefile.kern.inc |  24 ++----------------------
 sys/conf/dts.mk            |  34 ++++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 22 deletions(-)

diffs (83 lines):

diff -r d369cd69a443 -r 16e44edc486f sys/conf/Makefile.kern.inc
--- a/sys/conf/Makefile.kern.inc        Tue Jul 25 01:55:21 2017 +0000
+++ b/sys/conf/Makefile.kern.inc        Tue Jul 25 01:58:09 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.kern.inc,v 1.256.8.2 2017/07/24 06:20:33 snj Exp $
+#      $NetBSD: Makefile.kern.inc,v 1.256.8.3 2017/07/25 01:58:09 snj Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -321,6 +321,7 @@
 .include "${S}/conf/cscope.mk"
 .include "${S}/conf/gdbinit.mk"
 .include "${S}/conf/ssp.mk"
+.include "${S}/conf/dts.mk"
 
 ##
 ## (7) misc targets: install, clean(dir), depend(all), lint, links, tags,
@@ -534,27 +535,6 @@
        @${KCOMPILE.s} -pg
 .endif # ___USE_SUFFIX_RULES___
 
-# Begin DTS handling
-
-DTSINC?=$S/external/gpl2/dts/dist/include
-DTSGNUPATH?=$S/external/gpl2/dts/dist/arch/${MACHINE_CPU}/boot/dts
-DTSPATH?=$S/arch/${MACHINE_CPU}/dts
-DTSPADDING?=1024
-
-.SUFFIXES: .dtb .dts
-.dts.dtb:
-       ${CPP} -P -xassembler-with-cpp -I ${DTSINC} -I ${DTSPATH} -I ${DTSGNUPATH} \
-           -include ${.IMPSRC} /dev/null | \
-       ${TOOL_DTC} -i ${DTSINC} -i ${DTSPATH} -i ${DTSGNUPATH} -I dts -O dtb \
-           -p ${DTSPADDING} -b 0 -o ${.TARGET}
-
-.PATH.dts: ${DTSPATH} ${DTSGNUPATH}
-
-DTB= ${DTS:.dts=.dtb}
-all: ${DTB}
-
-# End DTS handling
-
 ##
 ## the end
 ##
diff -r d369cd69a443 -r 16e44edc486f sys/conf/dts.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/conf/dts.mk   Tue Jul 25 01:58:09 2017 +0000
@@ -0,0 +1,34 @@
+# $NetBSD: dts.mk,v 1.2.4.2 2017/07/25 01:58:09 snj Exp $
+
+DTSINC?=$S/external/gpl2/dts/dist/include
+DTSGNUPATH?=$S/external/gpl2/dts/dist/arch/${MACHINE_CPU}/boot/dts
+DTSPATH?=$S/arch/${MACHINE_CPU}/dts
+DTSPADDING?=1024
+
+.SUFFIXES: .dtd .dtb .dts
+
+.dts.dtd:
+       (${CPP} -P -xassembler-with-cpp -I ${DTSINC} -I ${DTSPATH} \
+           -I ${DTSGNUPATH} -include ${.IMPSRC} /dev/null | \
+       ${TOOL_DTC} -i ${DTSINC} -i ${DTSPATH} -i ${DTSGNUPATH} -I dts -O dtb \
+           -p ${DTSPADDING} -b 0 -o /dev/null -d /dev/stdout | \
+       ${TOOL_SED} -e 's@/dev/null@${.TARGET:.dtd=.dtb}@' \
+           -e 's@<stdin>@${.IMPSRC}@' && \
+       ${CPP} -P -xassembler-with-cpp -I ${DTSINC} -I ${DTSPATH} \
+           -I ${DTSGNUPATH} -include ${.IMPSRC} -M /dev/null | \
+       ${TOOL_SED} -e 's@null.o@${.TARGET:.dtd=.dtb}@' \
+           -e 's@/dev/null@@') > ${.TARGET}
+
+
+.dts.dtb:
+       ${CPP} -P -xassembler-with-cpp -I ${DTSINC} -I ${DTSPATH} \
+           -I ${DTSGNUPATH} -include ${.IMPSRC} /dev/null | \
+       ${TOOL_DTC} -i ${DTSINC} -i ${DTSPATH} -i ${DTSGNUPATH} -I dts -O dtb \
+           -p ${DTSPADDING} -b 0 -o ${.TARGET}
+
+.PATH.dts: ${DTSPATH} ${DTSGNUPATH}
+
+DEPS+= ${DTS:.dts=.dtd}
+DTB= ${DTS:.dts=.dtb}
+
+all: ${DTB}



Home | Main Index | Thread Index | Old Index