| @@ -1,15 +1,15 @@ | | | @@ -1,15 +1,15 @@ |
1 | #! /usr/bin/env sh | | 1 | #! /usr/bin/env sh |
2 | # $NetBSD: build.sh,v 1.376 2024/04/20 12:25:46 rillig Exp $ | | 2 | # $NetBSD: build.sh,v 1.377 2024/04/23 07:47:36 martin 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 |
| @@ -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.376 2024/04/20 12:25:46 rillig Exp $ | | 2034 | # Generated from: \$NetBSD: build.sh,v 1.377 2024/04/23 07:47:36 martin 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 |
| @@ -2423,27 +2423,27 @@ setup_mkrepro() | | | @@ -2423,27 +2423,27 @@ setup_mkrepro() |
2423 | bomb "Cannot determine VCS for '$d'" | | 2423 | bomb "Cannot determine VCS for '$d'" |
2424 | fi | | 2424 | fi |
2425 | | | 2425 | |
2426 | if [ -z "$t" ]; then | | 2426 | if [ -z "$t" ]; then |
2427 | bomb "Failed to get timestamp for vcs=$vcs in '$d'" | | 2427 | bomb "Failed to get timestamp for vcs=$vcs in '$d'" |
2428 | fi | | 2428 | fi |
2429 | | | 2429 | |
2430 | #echo "latest $d $vcs $t" | | 2430 | #echo "latest $d $vcs $t" |
2431 | if [ "$t" -gt "$MKREPRO_TIMESTAMP" ]; then | | 2431 | if [ "$t" -gt "$MKREPRO_TIMESTAMP" ]; then |
2432 | MKREPRO_TIMESTAMP="$t" | | 2432 | MKREPRO_TIMESTAMP="$t" |
2433 | fi | | 2433 | fi |
2434 | done | | 2434 | done |
2435 | | | 2435 | |
2436 | [ "${MKREPRO_TIMESTAMP}" != "0" ] || bomb "Failed to compute timestamp" | | 2436 | [ "${MKREPRO_TIMESTAMP}" -ne 0 ] || bomb "Failed to compute timestamp" |
2437 | if [ -z "${quiet}" ]; then | | 2437 | if [ -z "${quiet}" ]; then |
2438 | statusmsg2 "MKREPRO_TIMESTAMP" \ | | 2438 | statusmsg2 "MKREPRO_TIMESTAMP" \ |
2439 | "$(repro_date "${MKREPRO_TIMESTAMP}")" | | 2439 | "$(repro_date "${MKREPRO_TIMESTAMP}")" |
2440 | fi | | 2440 | fi |
2441 | export MKREPRO MKREPRO_TIMESTAMP | | 2441 | export MKREPRO MKREPRO_TIMESTAMP |
2442 | } | | 2442 | } |
2443 | | | 2443 | |
2444 | main() | | 2444 | main() |
2445 | { | | 2445 | { |
2446 | initdefaults | | 2446 | initdefaults |
2447 | _args=$@ | | 2447 | _args=$@ |
2448 | parseoptions "$@" | | 2448 | parseoptions "$@" |
2449 | | | 2449 | |