Module Name: src Committed By: martin Date: Mon Feb 26 13:52:00 UTC 2018
Modified Files: src [netbsd-8]: build.sh Log Message: Pull up following revision(s) (requested by maya in ticket #591): build.sh: revision 1.317-1.320 Add sanity check: passed -x but no xsrc directory Accept also ../xsrc in our sanity check, we use this as a default too, if it exists. Simplify. If we're going xsrc hunting, lets's do it properly. In particular it is not "good" just because ../xsrc or /usr/xsrc exists, if the user said -X /no/xsrc/here ... Further, when we find it, remember it. While here, also look in my favourite place: .../src/xsrc - src/x would be better (or src/x11) but that's too hard given the cvs module name and src tarball format. To generate a diff of this commit: cvs rdiff -u -r1.316.4.1 -r1.316.4.2 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/build.sh diff -u src/build.sh:1.316.4.1 src/build.sh:1.316.4.2 --- src/build.sh:1.316.4.1 Mon Feb 19 18:26:44 2018 +++ src/build.sh Mon Feb 26 13:52:00 2018 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.316.4.1 2018/02/19 18:26:44 snj Exp $ +# $NetBSD: build.sh,v 1.316.4.2 2018/02/26 13:52:00 martin Exp $ # # Copyright (c) 2001-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -1441,7 +1441,26 @@ sanitycheck() fi ;; esac + + while [ ${MKX11-no} = "yes" ]; do # not really a loop + test -n "${X11SRCDIR}" && { + test -d "${X11SRCDIR}" || + bomb "X11SRCDIR (${X11SRCDIR}) does not exist (with -x)" + break + } + for _xd in \ + "${NETBSDSRCDIR%/*}/xsrc" \ + "${NETBSDSRCDIR}/xsrc" \ + /usr/xsrc + do + test -d "${_xd}" && + setmakeenv X11SRCDIR "${_xd}" && + break 2 + done + bomb "Asked to build X11 but no xsrc" + done } + # print_tooldir_make -- # Try to find and print a path to an existing # ${TOOLDIR}/bin/${toolprefix}program @@ -1888,7 +1907,7 @@ createmakewrapper() eval cat <<EOF ${makewrapout} #! ${HOST_SH} # Set proper variables to allow easy "make" building of a NetBSD subtree. -# Generated from: \$NetBSD: build.sh,v 1.316.4.1 2018/02/19 18:26:44 snj Exp $ +# Generated from: \$NetBSD: build.sh,v 1.316.4.2 2018/02/26 13:52:00 martin Exp $ # with these arguments: ${_args} #