Module Name: src
Committed By: kre
Date: Sun Oct 8 00:45:25 UTC 2017
Modified Files:
src: build.sh
Log Message:
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.319 -r1.320 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.319 src/build.sh:1.320
--- src/build.sh:1.319 Tue Oct 3 11:02:36 2017
+++ src/build.sh Sun Oct 8 00:45:25 2017
@@ -1,5 +1,5 @@
#! /usr/bin/env sh
-# $NetBSD: build.sh,v 1.319 2017/10/03 11:02:36 maya Exp $
+# $NetBSD: build.sh,v 1.320 2017/10/08 00:45:25 kre Exp $
#
# Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -1442,12 +1442,23 @@ sanitycheck()
;;
esac
- if [ ${MKX11-no} = "yes" ]; then
- test -d ../xsrc || \
- test -d /usr/xsrc || \
- test -d "${X11SRCDIR}" || \
+ 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"
- fi
+ done
}
# print_tooldir_make --
@@ -1901,7 +1912,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.319 2017/10/03 11:02:36 maya Exp $
+# Generated from: \$NetBSD: build.sh,v 1.320 2017/10/08 00:45:25 kre Exp $
# with these arguments: ${_args}
#