Source-Changes-HG archive

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

[src/trunk]: src Introduce a done_rebuildmake variable, instead of abusing do...



details:   https://anonhg.NetBSD.org/src/rev/d8da93e63dae
branches:  trunk
changeset: 747700:d8da93e63dae
user:      apb <apb%NetBSD.org@localhost>
date:      Sun Sep 27 17:55:53 2009 +0000

description:
Introduce a done_rebuildmake variable, instead of abusing do_rebuildmake
to mean both "must rebuild make" and "have already rebuilt make".

diffstat:

 build.sh |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (47 lines):

diff -r dd23b4b7d4ae -r d8da93e63dae build.sh
--- a/build.sh  Sun Sep 27 17:55:31 2009 +0000
+++ b/build.sh  Sun Sep 27 17:55:53 2009 +0000
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#      $NetBSD: build.sh,v 1.210 2009/09/27 17:48:19 apb Exp $
+#      $NetBSD: build.sh,v 1.211 2009/09/27 17:55:53 apb Exp $
 #
 # Copyright (c) 2001-2009 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -240,6 +240,10 @@
        do_iso_image_source=false
        do_params=false
 
+       # done_{operation}=true if given operation has been done.
+       #
+       done_rebuildmake=false
+
        # Create scratch directory
        #
        tmpdir="${TMPDIR-/tmp}/nbbuild$$"
@@ -1011,6 +1015,7 @@
                make="${tmpdir}/${toolprefix}make"
                ${runcmd} cd "${TOP}"
                ${runcmd} rm -f usr.bin/make/*.o usr.bin/make/lst.lib/*.o
+               done_rebuildmake=true
        fi
 }
 
@@ -1199,7 +1204,7 @@
 
        # Install ${toolprefix}make if it was built.
        #
-       if ${do_rebuildmake}; then
+       if ${done_rebuildmake}; then
                ${runcmd} rm -f "${TOOLDIR}/bin/${toolprefix}make"
                ${runcmd} cp "${make}" "${TOOLDIR}/bin/${toolprefix}make" ||
                    bomb "Failed to install \$TOOLDIR/bin/${toolprefix}make"
@@ -1232,7 +1237,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.210 2009/09/27 17:48:19 apb Exp $
+# Generated from:  \$NetBSD: build.sh,v 1.211 2009/09/27 17:55:53 apb Exp $
 # with these arguments: ${_args}
 #
 



Home | Main Index | Thread Index | Old Index