Source-Changes-HG archive

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

[src/trunk]: src/sys/conf Redo Rev. 1.188:



details:   https://anonhg.NetBSD.org/src/rev/c56038153d50
branches:  trunk
changeset: 810310:c56038153d50
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Tue Aug 25 02:57:32 2015 +0000

description:
Redo Rev. 1.188:
o Explicitly add dependency of `<kernel>' on `<kernel>.ldscript', instead of
  relying on ${SYSTEM_DEP}, which is evaluated much earlier than
  `sys/conf/Makefile.kern.inc' is included, to avoid evaluation ordering
  problems.
o Print a message when creating a `<kernel>.ldscript'.
o Trim empty lines in `<kernel>.ldscript'.

diffstat:

 sys/conf/Makefile.kern.inc |  17 ++++-------------
 1 files changed, 4 insertions(+), 13 deletions(-)

diffs (42 lines):

diff -r 9adac9bc4d1a -r c56038153d50 sys/conf/Makefile.kern.inc
--- a/sys/conf/Makefile.kern.inc        Tue Aug 25 02:38:15 2015 +0000
+++ b/sys/conf/Makefile.kern.inc        Tue Aug 25 02:57:32 2015 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.kern.inc,v 1.189 2015/08/24 18:02:55 christos Exp $
+#      $NetBSD: Makefile.kern.inc,v 1.190 2015/08/25 02:57:32 uebayasi Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -229,13 +229,6 @@
 SYSTEM_OBJ?=   ${MD_OBJS} ${MI_OBJS} ${OBJS:O} ${SYSLIBCOMPAT} ${LIBKERN}
 .endif
 SYSTEM_DEP+=   Makefile ${SYSTEM_OBJ} .gdbinit
-.if defined(KERNLDSCRIPT)
-.if exists(${KERNLDSCRIPT})
-SYSTEM_DEP+=   -T ${KERNLDSCRIPT}
-.else
-SYSTEM_DEP+=   ${.TARGET}.ldscript
-.endif
-.endif
 .if defined(CTFMERGE)
 SYSTEM_CTFMERGE= ${CTFMERGE} ${CTFMFLAGS} -o ${.TARGET} ${SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
 .else
@@ -257,15 +250,13 @@
 .if defined(KERNLDSCRIPT)
 .for k in ${KERNELS}
 EXTRA_CLEAN+=  ${k}.ldscript
+${k}: ${k}.ldscript
 ${k}.ldscript: ${KERNLDSCRIPT}
-       ${CPP} ${KERNLDSCRIPT} | grep -v '^#' >$@
+       ${_MKTARGET_CREATE}
+       ${CPP} ${KERNLDSCRIPT} | grep -v '^#' | grep -v '^$$' >$@
 .endfor
-.if exists(${KERNLDSCRIPT})
-LINKSCRIPT=    -T ${KERNLDSCRIPT}
-.else
 LINKSCRIPT=    -T ${.TARGET}.ldscript
 .endif
-.endif
 
 TEXTADDR?=     ${LOADADDRESS}                  # backwards compatibility
 LINKTEXT?=     ${TEXTADDR:C/.+/-Ttext &/}



Home | Main Index | Thread Index | Old Index