Skip to content

Commit

Permalink
mk: Also use /etc/release for OS_VERSION on NetBSD.
Browse files Browse the repository at this point in the history
  • Loading branch information
alarixnia committed Jul 22, 2022
1 parent a836f83 commit de79ac4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mk/bsd.prefs.mk
Original file line number Diff line number Diff line change
@@ -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.
#
Expand Down Expand Up @@ -101,7 +101,11 @@ OS_VARIANT?= # empty
# 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
Expand Down

0 comments on commit de79ac4

Please sign in to comment.