pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk mk: Also use /etc/release for OS_VERSION on NetBSD.
details: https://anonhg.NetBSD.org/pkgsrc/rev/b93739ccaa2d
branches: trunk
changeset: 382187:b93739ccaa2d
user: nia <nia%pkgsrc.org@localhost>
date: Fri Jul 22 09:27:01 2022 +0000
description:
mk: Also use /etc/release for OS_VERSION on NetBSD.
diffstat:
mk/bsd.prefs.mk | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (21 lines):
diff -r aef5bd1575ce -r b93739ccaa2d mk/bsd.prefs.mk
--- a/mk/bsd.prefs.mk Fri Jul 22 09:14:43 2022 +0000
+++ b/mk/bsd.prefs.mk Fri Jul 22 09:27:01 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.423 2022/07/22 09:14:43 nia Exp $
+# $NetBSD: bsd.prefs.mk,v 1.424 2022/07/22 09:27:01 nia Exp $
#
# This file includes the mk.conf file, which contains the user settings.
#
@@ -101,7 +101,11 @@
# without executing the commands at all. Later, recursed make
# invocations will skip these blocks entirely thanks to MAKEFLAGS.
.if !defined(OS_VERSION)
+. if ${OPSYS} == "NetBSD" && exists(/etc/release)
+_OS_VERSION_CMD= head -1 /etc/release | sed -e "s,^NetBSD ,,g" -e "s,/.*$,,g"
+. else
_OS_VERSION_CMD= ${UNAME} -r
+. endif
OS_VERSION= ${_OS_VERSION_CMD:sh}
MAKEFLAGS+= OS_VERSION=${OS_VERSION:Q}
.endif
Home |
Main Index |
Thread Index |
Old Index