Source-Changes-HG archive

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

[src/netbsd-8]: src Pull up following revision(s) (requested by uwe in ticket...



details:   https://anonhg.NetBSD.org/src/rev/471e745cbe7f
branches:  netbsd-8
changeset: 851382:471e745cbe7f
user:      snj <snj%NetBSD.org@localhost>
date:      Mon Feb 19 18:26:44 2018 +0000

description:
Pull up following revision(s) (requested by uwe in ticket #555):
        build.sh: 1.322-1.323
        tools/make/buildmake.sh.in: 1.9-1.12
Make sure nbmake is always built with the right _PATH_DEFSYSPATH.
--
Restore formatting/indentation of the configure call in rebuildmake()
to what it used to be.
--
G/c unused runcmd.
--
Do not use HOST_CFLAGS to link the make binary.
--
Do not use HOST_CFLAGS and others.  build.sh calls configure with
CFLAGS set to HOST_CFLAGS, etc - so HOST_* environment variables are
already taken into account if set.
OTOH, if configure were to add anything to CFLAGS etc, the old code
would happily ignore those changes, picking up original environment
variables instead.

diffstat:

 build.sh                   |  13 ++++---------
 tools/make/buildmake.sh.in |  23 ++++++++++++++---------
 2 files changed, 18 insertions(+), 18 deletions(-)

diffs (76 lines):

diff -r 0152bf9ee3b7 -r 471e745cbe7f build.sh
--- a/build.sh  Mon Feb 19 18:21:21 2018 +0000
+++ b/build.sh  Mon Feb 19 18:26:44 2018 +0000
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#      $NetBSD: build.sh,v 1.316 2017/04/08 18:22:35 christos Exp $
+#      $NetBSD: build.sh,v 1.316.4.1 2018/02/19 18:26:44 snj Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1616,13 +1616,8 @@
 
        statusmsg "Bootstrapping ${toolprefix}make"
        ${runcmd} cd "${tmpdir}"
-       ${runcmd} env \
-\
-CC="${HOST_CC-cc}" \
-CPPFLAGS="${HOST_CPPFLAGS} -D_PATH_DEFSYSPATH="'\"'${NETBSDSRCDIR}/share/mk'\"' \
-CFLAGS="${HOST_CFLAGS--O}" \
-LDFLAGS="${HOST_LDFLAGS}" \
-\
+       ${runcmd} env CC="${HOST_CC-cc}" CPPFLAGS="${HOST_CPPFLAGS}" \
+               CFLAGS="${HOST_CFLAGS--O}" LDFLAGS="${HOST_LDFLAGS}" \
            ${HOST_SH} "${TOP}/tools/make/configure" ||
        ( cp ${tmpdir}/config.log ${tmpdir}-config.log
              bomb "Configure of ${toolprefix}make failed, see ${tmpdir}-config.log for details" )
@@ -1893,7 +1888,7 @@
        eval cat <<EOF ${makewrapout}
 #! ${HOST_SH}
 # Set proper variables to allow easy "make" building of a NetBSD subtree.
-# Generated from:  \$NetBSD: build.sh,v 1.316 2017/04/08 18:22:35 christos Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.316.4.1 2018/02/19 18:26:44 snj Exp $
 # with these arguments: ${_args}
 #
 
diff -r 0152bf9ee3b7 -r 471e745cbe7f tools/make/buildmake.sh.in
--- a/tools/make/buildmake.sh.in        Mon Feb 19 18:21:21 2018 +0000
+++ b/tools/make/buildmake.sh.in        Mon Feb 19 18:26:44 2018 +0000
@@ -1,23 +1,28 @@
 #! /bin/sh
-#      $NetBSD: buildmake.sh.in,v 1.8 2006/08/26 22:17:48 christos Exp $
+#      $NetBSD: buildmake.sh.in,v 1.8.74.1 2018/02/19 18:26:44 snj Exp $
 #
 # buildmake.sh.in - Autoconf-processed shell script for building make(1).
 #
 
-: ${HOST_CC="@CC@"}
-: ${HOST_CFLAGS="@CPPFLAGS@ @CFLAGS@"}
-: ${HOST_LDFLAGS="@LDFLAGS@ @LIBS@"}
-: ${runcmd=""}
+: ${NETBSDSRCDIR:=@srcdir@/../..}
+MKSRCDIR=${NETBSDSRCDIR}/usr.bin/make
+
+_CC="@CC@"
+
+_CFLAGS="@CPPFLAGS@"
+_CFLAGS="${_CFLAGS} -D_PATH_DEFSYSPATH=\"${NETBSDSRCDIR}/share/mk\""
+_CFLAGS="${_CFLAGS} @DEFS@"
+_CFLAGS="${_CFLAGS} @CFLAGS@"
+
+_LDFLAGS="@LDFLAGS@ @LIBS@"
 
 docmd () {
        echo "$1"
        $1 || exit 1
 }
 
-MKSRCDIR=@srcdir@/../../usr.bin/make
-
 for f in $MKSRCDIR/*.c $MKSRCDIR/lst.lib/*.c; do
-       docmd "${HOST_CC} ${HOST_CFLAGS} @DEFS@ -c $f"
+       docmd "${_CC} ${_CFLAGS} -c $f"
 done
 
-docmd "${HOST_CC} ${HOST_CFLAGS} -o ${_TOOL_PREFIX:-nb}make *.o ${HOST_LDFLAGS}"
+docmd "${_CC} -o ${_TOOL_PREFIX:-nb}make *.o ${_LDFLAGS}"



Home | Main Index | Thread Index | Old Index