| @@ -1,15 +1,15 @@ | | | @@ -1,15 +1,15 @@ |
1 | #! /usr/bin/env sh | | 1 | #! /usr/bin/env sh |
2 | # $NetBSD: build.sh,v 1.198.2.3 2009/03/18 05:39:06 snj Exp $ | | 2 | # $NetBSD: build.sh,v 1.198.2.3.4.1 2009/08/26 03:38:31 matt Exp $ |
3 | # | | 3 | # |
4 | # Copyright (c) 2001-2008 The NetBSD Foundation, Inc. | | 4 | # Copyright (c) 2001-2008 The NetBSD Foundation, Inc. |
5 | # All rights reserved. | | 5 | # All rights reserved. |
6 | # | | 6 | # |
7 | # This code is derived from software contributed to The NetBSD Foundation | | 7 | # This code is derived from software contributed to The NetBSD Foundation |
8 | # by Todd Vierling and Luke Mewburn. | | 8 | # by Todd Vierling and Luke Mewburn. |
9 | # | | 9 | # |
10 | # Redistribution and use in source and binary forms, with or without | | 10 | # Redistribution and use in source and binary forms, with or without |
11 | # modification, are permitted provided that the following conditions | | 11 | # modification, are permitted provided that the following conditions |
12 | # are met: | | 12 | # are met: |
13 | # 1. Redistributions of source code must retain the above copyright | | 13 | # 1. Redistributions of source code must retain the above copyright |
14 | # notice, this list of conditions and the following disclaimer. | | 14 | # notice, this list of conditions and the following disclaimer. |
15 | # 2. Redistributions in binary form must reproduce the above copyright | | 15 | # 2. Redistributions in binary form must reproduce the above copyright |
| @@ -330,30 +330,40 @@ getarch() | | | @@ -330,30 +330,40 @@ getarch() |
330 | ;; | | 330 | ;; |
331 | | | 331 | |
332 | sun2) | | 332 | sun2) |
333 | MACHINE_ARCH=m68000 | | 333 | MACHINE_ARCH=m68000 |
334 | ;; | | 334 | ;; |
335 | | | 335 | |
336 | amiga|atari|cesfic|hp300|luna68k|mac68k|mvme68k|news68k|next68k|sun3|x68k) | | 336 | amiga|atari|cesfic|hp300|luna68k|mac68k|mvme68k|news68k|next68k|sun3|x68k) |
337 | MACHINE_ARCH=m68k | | 337 | MACHINE_ARCH=m68k |
338 | ;; | | 338 | ;; |
339 | | | 339 | |
340 | evbmips|sbmips) # no default MACHINE_ARCH | | 340 | evbmips|sbmips) # no default MACHINE_ARCH |
341 | ;; | | 341 | ;; |
342 | | | 342 | |
| | | 343 | sgimips64) |
| | | 344 | MACHINE=${MACHINE%64} |
| | | 345 | MACHINE_ARCH=mips64eb |
| | | 346 | ;; |
| | | 347 | |
343 | ews4800mips|mipsco|newsmips|sgimips) | | 348 | ews4800mips|mipsco|newsmips|sgimips) |
344 | MACHINE_ARCH=mipseb | | 349 | MACHINE_ARCH=mipseb |
345 | ;; | | 350 | ;; |
346 | | | 351 | |
| | | 352 | algor64|pmax64) |
| | | 353 | MACHINE=${MACHINE%64} |
| | | 354 | MACHINE_ARCH=mips64el |
| | | 355 | ;; |
| | | 356 | |
347 | algor|arc|cobalt|hpcmips|playstation2|pmax) | | 357 | algor|arc|cobalt|hpcmips|playstation2|pmax) |
348 | MACHINE_ARCH=mipsel | | 358 | MACHINE_ARCH=mipsel |
349 | ;; | | 359 | ;; |
350 | | | 360 | |
351 | evbppc64|macppc64|ofppc64) | | 361 | evbppc64|macppc64|ofppc64) |
352 | makewrappermachine=${MACHINE} | | 362 | makewrappermachine=${MACHINE} |
353 | MACHINE=${MACHINE%64} | | 363 | MACHINE=${MACHINE%64} |
354 | MACHINE_ARCH=powerpc64 | | 364 | MACHINE_ARCH=powerpc64 |
355 | ;; | | 365 | ;; |
356 | | | 366 | |
357 | amigappc|bebox|evbppc|ibmnws|macppc|mvmeppc|ofppc|prep|rs6000|sandpoint) | | 367 | amigappc|bebox|evbppc|ibmnws|macppc|mvmeppc|ofppc|prep|rs6000|sandpoint) |
358 | MACHINE_ARCH=powerpc | | 368 | MACHINE_ARCH=powerpc |
359 | ;; | | 369 | ;; |
| @@ -401,26 +411,30 @@ validatearch() | | | @@ -401,26 +411,30 @@ validatearch() |
401 | bomb "Unknown target MACHINE_ARCH: ${MACHINE_ARCH}" | | 411 | bomb "Unknown target MACHINE_ARCH: ${MACHINE_ARCH}" |
402 | ;; | | 412 | ;; |
403 | | | 413 | |
404 | esac | | 414 | esac |
405 | | | 415 | |
406 | # Determine valid MACHINE_ARCHs for MACHINE | | 416 | # Determine valid MACHINE_ARCHs for MACHINE |
407 | # | | 417 | # |
408 | case "${MACHINE}" in | | 418 | case "${MACHINE}" in |
409 | | | 419 | |
410 | evbarm) | | 420 | evbarm) |
411 | arches="arm armeb" | | 421 | arches="arm armeb" |
412 | ;; | | 422 | ;; |
413 | | | 423 | |
| | | 424 | algor|pmax) |
| | | 425 | arches="mipsel mips64el" |
| | | 426 | ;; |
| | | 427 | |
414 | evbmips|sbmips) | | 428 | evbmips|sbmips) |
415 | arches="mipseb mipsel mips64eb mips64el" | | 429 | arches="mipseb mipsel mips64eb mips64el" |
416 | ;; | | 430 | ;; |
417 | | | 431 | |
418 | sgimips) | | 432 | sgimips) |
419 | arches="mipseb mips64eb" | | 433 | arches="mipseb mips64eb" |
420 | ;; | | 434 | ;; |
421 | | | 435 | |
422 | evbsh3) | | 436 | evbsh3) |
423 | arches="sh3eb sh3el" | | 437 | arches="sh3eb sh3el" |
424 | ;; | | 438 | ;; |
425 | | | 439 | |
426 | macppc|evbppc|ofppc) | | 440 | macppc|evbppc|ofppc) |
| @@ -1199,27 +1213,27 @@ createmakewrapper() | | | @@ -1199,27 +1213,27 @@ createmakewrapper() |
1199 | else | | 1213 | else |
1200 | makewrapout=">>\${makewrapper}" | | 1214 | makewrapout=">>\${makewrapper}" |
1201 | fi | | 1215 | fi |
1202 | | | 1216 | |
1203 | case "${KSH_VERSION:-${SH_VERSION}}" in | | 1217 | case "${KSH_VERSION:-${SH_VERSION}}" in |
1204 | *PD\ KSH*|*MIRBSD\ KSH*) | | 1218 | *PD\ KSH*|*MIRBSD\ KSH*) |
1205 | set +o braceexpand | | 1219 | set +o braceexpand |
1206 | ;; | | 1220 | ;; |
1207 | esac | | 1221 | esac |
1208 | | | 1222 | |
1209 | eval cat <<EOF ${makewrapout} | | 1223 | eval cat <<EOF ${makewrapout} |
1210 | #! ${HOST_SH} | | 1224 | #! ${HOST_SH} |
1211 | # Set proper variables to allow easy "make" building of a NetBSD subtree. | | 1225 | # Set proper variables to allow easy "make" building of a NetBSD subtree. |
1212 | # Generated from: \$NetBSD: build.sh,v 1.198.2.3 2009/03/18 05:39:06 snj Exp $ | | 1226 | # Generated from: \$NetBSD: build.sh,v 1.198.2.3.4.1 2009/08/26 03:38:31 matt Exp $ |
1213 | # with these arguments: ${_args} | | 1227 | # with these arguments: ${_args} |
1214 | # | | 1228 | # |
1215 | | | 1229 | |
1216 | EOF | | 1230 | EOF |
1217 | { | | 1231 | { |
1218 | for f in ${makeenv}; do | | 1232 | for f in ${makeenv}; do |
1219 | if eval "[ -z \"\${$f}\" -a \"\${${f}-X}\" = \"X\" ]"; then | | 1233 | if eval "[ -z \"\${$f}\" -a \"\${${f}-X}\" = \"X\" ]"; then |
1220 | eval echo "unset ${f}" | | 1234 | eval echo "unset ${f}" |
1221 | else | | 1235 | else |
1222 | eval echo "${f}=\'\$$(echo ${f})\'\;\ export\ ${f}" | | 1236 | eval echo "${f}=\'\$$(echo ${f})\'\;\ export\ ${f}" |
1223 | fi | | 1237 | fi |
1224 | done | | 1238 | done |
1225 | | | 1239 | |