Source-Changes-HG archive

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

[src/trunk]: src/sys/conf Use && to fail early if subcommands of kernel link ...



details:   https://anonhg.NetBSD.org/src/rev/dd43afbfefa9
branches:  trunk
changeset: 814792:dd43afbfefa9
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Apr 09 18:51:44 2016 +0000

description:
Use && to fail early if subcommands of kernel link fail.

(Remind me why we string together shell commands instead of just
using make targets?)

diffstat:

 sys/conf/Makefile.kern.inc |  18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diffs (48 lines):

diff -r 2a3814338a3b -r dd43afbfefa9 sys/conf/Makefile.kern.inc
--- a/sys/conf/Makefile.kern.inc        Sat Apr 09 18:47:05 2016 +0000
+++ b/sys/conf/Makefile.kern.inc        Sat Apr 09 18:51:44 2016 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.kern.inc,v 1.249 2015/11/27 20:59:47 christos Exp $
+#      $NetBSD: Makefile.kern.inc,v 1.250 2016/04/09 18:51:44 riastradh Exp $
 #
 # This file contains common `MI' targets and definitions and it is included
 # at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
@@ -52,7 +52,7 @@
 ##
 # source tree is located via $S relative to the compilation directory
 .ifndef S
-S!=    cd ../../../..; pwd
+S!=    cd ../../../.. && pwd
 .endif
 
 ##
@@ -229,12 +229,12 @@
 
 LINKFLAGS_DEBUG?=      -X
 
-SYSTEM_LD_TAIL?=@${TOOL_SED} '/const char sccs/!d;s/.*@(.)//;s/" "//;s/\\.*//' vers.c; \
-               ${SIZE} $@; chmod 755 $@; \
+SYSTEM_LD_TAIL?=@${TOOL_SED} '/const char sccs/!d;s/.*@(.)//;s/" "//;s/\\.*//' vers.c && \
+               ${SIZE} $@ && chmod 755 $@ && \
                ${SYSTEM_CTFMERGE}
-SYSTEM_LD_TAIL_DEBUG?=; \
-               echo mv -f $@ $@.gdb; mv -f $@ $@.gdb; \
-               echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb; \
+SYSTEM_LD_TAIL_DEBUG?=&& \
+               echo mv -f $@ $@.gdb && mv -f $@ $@.gdb && \
+               echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb && \
                ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb
 LINKFLAGS_NORMAL?=     -S
 STRIPFLAGS?=   -g
@@ -254,9 +254,9 @@
 SYSTEM_LD_TAIL_STAGE1= ${SYSTEM_LD_TAIL}
 SYSTEM_LD_TAIL_STAGE2= ${SYSTEM_LD_TAIL}
 .if defined(COPY_SYMTAB)
-SYSTEM_LD_TAIL_STAGE2+=        ; echo ${DBSYM} $@; ${DBSYM} $@
+SYSTEM_LD_TAIL_STAGE2+=        && echo ${DBSYM} $@ && ${DBSYM} $@
 .if !empty(DEBUG:M-g)
-SYSTEM_LD_TAIL_STAGE2+=        ; echo ${DBSYM} $@.gdb; ${DBSYM} $@.gdb
+SYSTEM_LD_TAIL_STAGE2+=        && echo ${DBSYM} $@.gdb && ${DBSYM} $@.gdb
 .endif
 .endif
 SYSTEM_LD_TAIL_STAGE2+=        ${SYSTEM_LD_TAIL_EXTRA}



Home | Main Index | Thread Index | Old Index