|
1 | 1 | #! /usr/bin/env sh
|
2 |
| -# $NetBSD: build.sh,v 1.308 2015/06/27 06:00:28 matt Exp $ |
| 2 | +# $NetBSD: build.sh,v 1.309 2016/04/29 16:08:09 christos Exp $ |
3 | 3 | #
|
4 | 4 | # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
|
5 | 5 | # All rights reserved.
|
@@ -1593,21 +1593,28 @@ rebuildmake()
|
1593 | 1593 | fi
|
1594 | 1594 |
|
1595 | 1595 | # Build bootstrap ${toolprefix}make if needed.
|
1596 |
| - if ${do_rebuildmake}; then |
1597 |
| - statusmsg "Bootstrapping ${toolprefix}make" |
1598 |
| - ${runcmd} cd "${tmpdir}" |
1599 |
| - ${runcmd} env CC="${HOST_CC-cc}" CPPFLAGS="${HOST_CPPFLAGS}" \ |
1600 |
| - CFLAGS="${HOST_CFLAGS--O}" LDFLAGS="${HOST_LDFLAGS}" \ |
1601 |
| - ${HOST_SH} "${TOP}/tools/make/configure" || |
1602 |
| - ( cp ${tmpdir}/config.log ${tmpdir}-config.log |
1603 |
| - bomb "Configure of ${toolprefix}make failed, see ${tmpdir}-config.log for details" ) |
1604 |
| - ${runcmd} ${HOST_SH} buildmake.sh || |
1605 |
| - bomb "Build of ${toolprefix}make failed" |
1606 |
| - make="${tmpdir}/${toolprefix}make" |
1607 |
| - ${runcmd} cd "${TOP}" |
1608 |
| - ${runcmd} rm -f usr.bin/make/*.o usr.bin/make/lst.lib/*.o |
1609 |
| - done_rebuildmake=true |
| 1596 | + if ! ${do_rebuildmake}; then |
| 1597 | + return |
1610 | 1598 | fi
|
| 1599 | + |
| 1600 | + statusmsg "Bootstrapping ${toolprefix}make" |
| 1601 | + ${runcmd} cd "${tmpdir}" |
| 1602 | + ${runcmd} env \ |
| 1603 | +\ |
| 1604 | +CC="${HOST_CC-cc}" \ |
| 1605 | +CPPFLAGS="${HOST_CPPFLAGS} -D_PATH_DEFSYSPATH="'\"'${NETBSDSRCDIR}/share/mk'\"' \ |
| 1606 | +CFLAGS="${HOST_CFLAGS--O}" \ |
| 1607 | +LDFLAGS="${HOST_LDFLAGS}" \ |
| 1608 | +\ |
| 1609 | + ${HOST_SH} "${TOP}/tools/make/configure" || |
| 1610 | + ( cp ${tmpdir}/config.log ${tmpdir}-config.log |
| 1611 | + bomb "Configure of ${toolprefix}make failed, see ${tmpdir}-config.log for details" ) |
| 1612 | + ${runcmd} ${HOST_SH} buildmake.sh || |
| 1613 | + bomb "Build of ${toolprefix}make failed" |
| 1614 | + make="${tmpdir}/${toolprefix}make" |
| 1615 | + ${runcmd} cd "${TOP}" |
| 1616 | + ${runcmd} rm -f usr.bin/make/*.o usr.bin/make/lst.lib/*.o |
| 1617 | + done_rebuildmake=true |
1611 | 1618 | }
|
1612 | 1619 |
|
1613 | 1620 | # validatemakeparams --
|
@@ -1869,7 +1876,7 @@ createmakewrapper()
|
1869 | 1876 | eval cat <<EOF ${makewrapout}
|
1870 | 1877 | #! ${HOST_SH}
|
1871 | 1878 | # Set proper variables to allow easy "make" building of a NetBSD subtree.
|
1872 |
| -# Generated from: \$NetBSD: build.sh,v 1.308 2015/06/27 06:00:28 matt Exp $ |
| 1879 | +# Generated from: \$NetBSD: build.sh,v 1.309 2016/04/29 16:08:09 christos Exp $ |
1873 | 1880 | # with these arguments: ${_args}
|
1874 | 1881 | #
|
1875 | 1882 |
|
|
0 commit comments