| @@ -1,15 +1,15 @@ | | | @@ -1,15 +1,15 @@ |
1 | #! /usr/bin/env sh | | 1 | #! /usr/bin/env sh |
2 | # $NetBSD: build.sh,v 1.375 2024/01/03 02:48:45 thorpej Exp $ | | 2 | # $NetBSD: build.sh,v 1.376 2024/04/20 12:25:46 rillig Exp $ |
3 | # | | 3 | # |
4 | # Copyright (c) 2001-2023 The NetBSD Foundation, Inc. | | 4 | # Copyright (c) 2001-2023 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 |
| @@ -1081,50 +1081,50 @@ help() | | | @@ -1081,50 +1081,50 @@ help() |
1081 | iso-image Create CD-ROM image in RELEASEDIR/images. | | 1081 | iso-image Create CD-ROM image in RELEASEDIR/images. |
1082 | iso-image-source Create CD-ROM image with source in RELEASEDIR/images. | | 1082 | iso-image-source Create CD-ROM image with source in RELEASEDIR/images. |
1083 | live-image Create bootable live image in | | 1083 | live-image Create bootable live image in |
1084 | RELEASEDIR/RELEASEMACHINEDIR/installation/liveimage. | | 1084 | RELEASEDIR/RELEASEMACHINEDIR/installation/liveimage. |
1085 | install-image Create bootable installation image in | | 1085 | install-image Create bootable installation image in |
1086 | RELEASEDIR/RELEASEMACHINEDIR/installation/installimage. | | 1086 | RELEASEDIR/RELEASEMACHINEDIR/installation/installimage. |
1087 | disk-image=TARGET Create bootable disk image in | | 1087 | disk-image=TARGET Create bootable disk image in |
1088 | RELEASEDIR/RELEASEMACHINEDIR/binary/gzimg/TARGET.img.gz. | | 1088 | RELEASEDIR/RELEASEMACHINEDIR/binary/gzimg/TARGET.img.gz. |
1089 | params Create params file with various make(1) parameters. | | 1089 | params Create params file with various make(1) parameters. |
1090 | show-params Show various make(1) parameters. | | 1090 | show-params Show various make(1) parameters. |
1091 | list-arch Show a list of valid MACHINE/MACHINE_ARCH values, | | 1091 | list-arch Show a list of valid MACHINE/MACHINE_ARCH values, |
1092 | and exit. The list may be narrowed by passing glob | | 1092 | and exit. The list may be narrowed by passing glob |
1093 | patterns or exact values in MACHINE or MACHINE_ARCH. | | 1093 | patterns or exact values in MACHINE or MACHINE_ARCH. |
1094 | mkrepro-timestamp Show the latest source timestamp used for reproducable | | 1094 | mkrepro-timestamp Show the latest source timestamp used for reproducible |
1095 | builds and exit. Requires -P or -V MKREPRO=yes. | | 1095 | builds and exit. Requires -P or -V MKREPRO=yes. |
1096 | | | 1096 | |
1097 | Options: | | 1097 | Options: |
1098 | -a ARCH Set MACHINE_ARCH=ARCH. [Default: deduced from MACHINE] | | 1098 | -a ARCH Set MACHINE_ARCH=ARCH. [Default: deduced from MACHINE] |
1099 | -B BID Set BUILDID=BID. | | 1099 | -B BID Set BUILDID=BID. |
1100 | -C EXTRAS Append EXTRAS to CDEXTRA for inclusion on CD-ROM. | | 1100 | -C EXTRAS Append EXTRAS to CDEXTRA for inclusion on CD-ROM. |
1101 | -c COMPILER Select compiler from COMPILER: | | 1101 | -c COMPILER Select compiler from COMPILER: |
1102 | clang | | 1102 | clang |
1103 | gcc | | 1103 | gcc |
1104 | [Default: gcc] | | 1104 | [Default: gcc] |
1105 | -D DEST Set DESTDIR=DEST. [Default: destdir.\${MACHINE}] | | 1105 | -D DEST Set DESTDIR=DEST. [Default: destdir.\${MACHINE}] |
1106 | -E Set "expert" mode; disables various safety checks. | | 1106 | -E Set "expert" mode; disables various safety checks. |
1107 | Should not be used without expert knowledge of the build | | 1107 | Should not be used without expert knowledge of the build |
1108 | system. | | 1108 | system. |
1109 | -h Show this help message, and exit. | | 1109 | -h Show this help message, and exit. |
1110 | -j NJOB Run up to NJOB jobs in parallel; see make(1) -j. | | 1110 | -j NJOB Run up to NJOB jobs in parallel; see make(1) -j. |
1111 | -M MOBJ Set obj root directory to MOBJ; sets MAKEOBJDIRPREFIX=MOBJ, | | 1111 | -M MOBJ Set obj root directory to MOBJ; sets MAKEOBJDIRPREFIX=MOBJ, |
1112 | unsets MAKEOBJDIR. | | 1112 | unsets MAKEOBJDIR. |
1113 | -m MACH Set MACHINE=MACH. Some MACH values are actually | | 1113 | -m MACH Set MACHINE=MACH. Some MACH values are actually |
1114 | aliases that set MACHINE/MACHINE_ARCH pairs. | | 1114 | aliases that set MACHINE/MACHINE_ARCH pairs. |
1115 | [Default: deduced from the host system if the host | | 1115 | [Default: deduced from the host system if the host |
1116 | OS is NetBSD] | | 1116 | OS is NetBSD] |
1117 | -N NOISY Set the noisyness (MAKEVERBOSE) level of the build to NOISY: | | 1117 | -N NOISY Set the noisiness (MAKEVERBOSE) level of the build to NOISY: |
1118 | 0 Minimal output ("quiet"). | | 1118 | 0 Minimal output ("quiet"). |
1119 | 1 Describe what is occurring. | | 1119 | 1 Describe what is occurring. |
1120 | 2 Describe what is occurring and echo the actual | | 1120 | 2 Describe what is occurring and echo the actual |
1121 | command. | | 1121 | command. |
1122 | 3 Ignore the effect of the "@" prefix in make | | 1122 | 3 Ignore the effect of the "@" prefix in make |
1123 | commands. | | 1123 | commands. |
1124 | 4 Trace shell commands using the shell's -x flag. | | 1124 | 4 Trace shell commands using the shell's -x flag. |
1125 | [Default: 2] | | 1125 | [Default: 2] |
1126 | -n Show commands that would be executed, but do not execute | | 1126 | -n Show commands that would be executed, but do not execute |
1127 | them. | | 1127 | them. |
1128 | -O OOBJ Set obj root directory to OOBJ; sets a MAKEOBJDIR pattern | | 1128 | -O OOBJ Set obj root directory to OOBJ; sets a MAKEOBJDIR pattern |
1129 | using OOBJ, unsets MAKEOBJDIRPREFIX. | | 1129 | using OOBJ, unsets MAKEOBJDIRPREFIX. |
1130 | -o Set MKOBJDIRS=no; do not create objdirs at start of build. | | 1130 | -o Set MKOBJDIRS=no; do not create objdirs at start of build. |
| @@ -2021,27 +2021,27 @@ createmakewrapper() | | | @@ -2021,27 +2021,27 @@ createmakewrapper() |
2021 | else | | 2021 | else |
2022 | makewrapout=">>\${makewrapper}" | | 2022 | makewrapout=">>\${makewrapper}" |
2023 | fi | | 2023 | fi |
2024 | | | 2024 | |
2025 | case "${KSH_VERSION:-${SH_VERSION}}" in | | 2025 | case "${KSH_VERSION:-${SH_VERSION}}" in |
2026 | *PD\ KSH*|*MIRBSD\ KSH*) | | 2026 | *PD\ KSH*|*MIRBSD\ KSH*) |
2027 | set +o braceexpand | | 2027 | set +o braceexpand |
2028 | ;; | | 2028 | ;; |
2029 | esac | | 2029 | esac |
2030 | | | 2030 | |
2031 | eval cat <<EOF ${makewrapout} | | 2031 | eval cat <<EOF ${makewrapout} |
2032 | #! ${HOST_SH} | | 2032 | #! ${HOST_SH} |
2033 | # Set proper variables to allow easy "make" building of a NetBSD subtree. | | 2033 | # Set proper variables to allow easy "make" building of a NetBSD subtree. |
2034 | # Generated from: \$NetBSD: build.sh,v 1.375 2024/01/03 02:48:45 thorpej Exp $ | | 2034 | # Generated from: \$NetBSD: build.sh,v 1.376 2024/04/20 12:25:46 rillig Exp $ |
2035 | # with these arguments: ${_args} | | 2035 | # with these arguments: ${_args} |
2036 | # | | 2036 | # |
2037 | | | 2037 | |
2038 | EOF | | 2038 | EOF |
2039 | { | | 2039 | { |
2040 | sorted_vars="$(for var in ${makeenv}; do echo "${var}" ; done \ | | 2040 | sorted_vars="$(for var in ${makeenv}; do echo "${var}" ; done \ |
2041 | | sort -u )" | | 2041 | | sort -u )" |
2042 | for var in ${sorted_vars}; do | | 2042 | for var in ${sorted_vars}; do |
2043 | eval val=\"\${${var}}\" | | 2043 | eval val=\"\${${var}}\" |
2044 | eval is_set=\"\${${var}+set}\" | | 2044 | eval is_set=\"\${${var}+set}\" |
2045 | if [ -z "${is_set}" ]; then | | 2045 | if [ -z "${is_set}" ]; then |
2046 | echo "unset ${var}" | | 2046 | echo "unset ${var}" |
2047 | else | | 2047 | else |