| @@ -1,15 +1,15 @@ | | | @@ -1,15 +1,15 @@ |
1 | #! /usr/bin/env sh | | 1 | #! /usr/bin/env sh |
2 | # $NetBSD: build.sh,v 1.351 2021/05/26 21:58:58 christos Exp $ | | 2 | # $NetBSD: build.sh,v 1.352 2021/05/27 21:03:26 christos Exp $ |
3 | # | | 3 | # |
4 | # Copyright (c) 2001-2011 The NetBSD Foundation, Inc. | | 4 | # Copyright (c) 2001-2011 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 |
| @@ -1963,27 +1963,27 @@ createmakewrapper() | | | @@ -1963,27 +1963,27 @@ createmakewrapper() |
1963 | else | | 1963 | else |
1964 | makewrapout=">>\${makewrapper}" | | 1964 | makewrapout=">>\${makewrapper}" |
1965 | fi | | 1965 | fi |
1966 | | | 1966 | |
1967 | case "${KSH_VERSION:-${SH_VERSION}}" in | | 1967 | case "${KSH_VERSION:-${SH_VERSION}}" in |
1968 | *PD\ KSH*|*MIRBSD\ KSH*) | | 1968 | *PD\ KSH*|*MIRBSD\ KSH*) |
1969 | set +o braceexpand | | 1969 | set +o braceexpand |
1970 | ;; | | 1970 | ;; |
1971 | esac | | 1971 | esac |
1972 | | | 1972 | |
1973 | eval cat <<EOF ${makewrapout} | | 1973 | eval cat <<EOF ${makewrapout} |
1974 | #! ${HOST_SH} | | 1974 | #! ${HOST_SH} |
1975 | # Set proper variables to allow easy "make" building of a NetBSD subtree. | | 1975 | # Set proper variables to allow easy "make" building of a NetBSD subtree. |
1976 | # Generated from: \$NetBSD: build.sh,v 1.351 2021/05/26 21:58:58 christos Exp $ | | 1976 | # Generated from: \$NetBSD: build.sh,v 1.352 2021/05/27 21:03:26 christos Exp $ |
1977 | # with these arguments: ${_args} | | 1977 | # with these arguments: ${_args} |
1978 | # | | 1978 | # |
1979 | | | 1979 | |
1980 | EOF | | 1980 | EOF |
1981 | { | | 1981 | { |
1982 | sorted_vars="$(for var in ${makeenv}; do echo "${var}" ; done \ | | 1982 | sorted_vars="$(for var in ${makeenv}; do echo "${var}" ; done \ |
1983 | | sort -u )" | | 1983 | | sort -u )" |
1984 | for var in ${sorted_vars}; do | | 1984 | for var in ${sorted_vars}; do |
1985 | eval val=\"\${${var}}\" | | 1985 | eval val=\"\${${var}}\" |
1986 | eval is_set=\"\${${var}+set}\" | | 1986 | eval is_set=\"\${${var}+set}\" |
1987 | if [ -z "${is_set}" ]; then | | 1987 | if [ -z "${is_set}" ]; then |
1988 | echo "unset ${var}" | | 1988 | echo "unset ${var}" |
1989 | else | | 1989 | else |
| @@ -2291,27 +2291,27 @@ dorump() | | | @@ -2291,27 +2291,27 @@ dorump() |
2291 | /cannot open output file/{fails[NR] = $0} | | 2291 | /cannot open output file/{fails[NR] = $0} |
2292 | END{ | | 2292 | END{ |
2293 | for (x in fails) | | 2293 | for (x in fails) |
2294 | print fails[x] | | 2294 | print fails[x] |
2295 | exit x!=0 | | 2295 | exit x!=0 |
2296 | }' | | 2296 | }' |
2297 | [ $? -ne 0 ] && bomb "Testlink of rump failed: ${set}" | | 2297 | [ $? -ne 0 ] && bomb "Testlink of rump failed: ${set}" |
2298 | done | | 2298 | done |
2299 | statusmsg "Rump build&link tests successful" | | 2299 | statusmsg "Rump build&link tests successful" |
2300 | } | | 2300 | } |
2301 | | | 2301 | |
2302 | repro_date() { | | 2302 | repro_date() { |
2303 | # try the bsd date fail back the the linux one | | 2303 | # try the bsd date fail back the the linux one |
2304 | (date -u -r "$1" 2> /dev/null) || date -u -d "@$1" | | 2304 | date -u -r "$1" 2> /dev/null || date -u -d "@$1" |
2305 | } | | 2305 | } |
2306 | | | 2306 | |
2307 | setup_mkrepro() | | 2307 | setup_mkrepro() |
2308 | { | | 2308 | { |
2309 | if [ ${MKREPRO-no} != "yes" ]; then | | 2309 | if [ ${MKREPRO-no} != "yes" ]; then |
2310 | return | | 2310 | return |
2311 | fi | | 2311 | fi |
2312 | | | 2312 | |
2313 | local dirs=${NETBSDSRCDIR-/usr/src}/ | | 2313 | local dirs=${NETBSDSRCDIR-/usr/src}/ |
2314 | if [ ${MKX11-no} = "yes" ]; then | | 2314 | if [ ${MKX11-no} = "yes" ]; then |
2315 | dirs="$dirs ${X11SRCDIR-/usr/xsrc}/" | | 2315 | dirs="$dirs ${X11SRCDIR-/usr/xsrc}/" |
2316 | fi | | 2316 | fi |
2317 | | | 2317 | |