pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   nia
Date:           Fri Jul 22 09:27:01 UTC 2022

Modified Files:
        pkgsrc/mk: bsd.prefs.mk

Log Message:
mk: Also use /etc/release for OS_VERSION on NetBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.423 -r1.424 pkgsrc/mk/bsd.prefs.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/bsd.prefs.mk
diff -u pkgsrc/mk/bsd.prefs.mk:1.423 pkgsrc/mk/bsd.prefs.mk:1.424
--- pkgsrc/mk/bsd.prefs.mk:1.423        Fri Jul 22 09:14:43 2022
+++ pkgsrc/mk/bsd.prefs.mk      Fri Jul 22 09:27:01 2022
@@ -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 @@ 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



Home | Main Index | Thread Index | Old Index