Module Name: src
Committed By: apb
Date: Sun Nov 4 11:09:15 UTC 2012
Modified Files:
src/etc: Makefile
Added Files:
src/etc: motd.default
Removed Files:
src/etc: motd
Log Message:
motd needs to be re-generated when DISTRIBVER changes, so change he
Makefile to use the new ${_NETBSD_VERSION_DEPENDS} mechanism defined in
bsd.own.mk.
Rename the default motd file in the source tree from "motd" to
"motd.default", because otherwise it would conflict with the motd file
that is now created in the .OBJDIR.
To generate a diff of this commit:
cvs rdiff -u -r1.399 -r1.400 src/etc/Makefile
cvs rdiff -u -r1.3 -r0 src/etc/motd
cvs rdiff -u -r0 -r1.1 src/etc/motd.default
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/etc/Makefile
diff -u src/etc/Makefile:1.399 src/etc/Makefile:1.400
--- src/etc/Makefile:1.399 Sun Nov 4 11:04:10 2012
+++ src/etc/Makefile Sun Nov 4 11:09:14 2012
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.399 2012/11/04 11:04:10 apb Exp $
+# $NetBSD: Makefile,v 1.400 2012/11/04 11:09:14 apb Exp $
# from: @(#)Makefile 8.7 (Berkeley) 5/25/95
# Environment variables without default values:
@@ -114,21 +114,8 @@ BIN1+= etc.${MACHINE}/ttyaction
.endif
# -rw-rw-r--
-.if !empty(DISTRIBVER:M*.99.*)
-BIN2+= motd.current
-FILESNAME_motd.current= motd
-.elif !empty(DISTRIBVER:M*BETA*)
-BIN2+= motd.beta
-FILESNAME_motd.beta= motd
-.elif !empty(DISTRIBVER:M*RC*)
-BIN2+= motd.rc
-FILESNAME_motd.rc= motd
-.elif !empty(DISTRIBVER:M*STABLE*)
-BIN2+= motd.stable
-FILESNAME_motd.stable= motd
-.else
BIN2+= motd
-.endif
+FILESBUILD_motd= YES
# -rw-------
BIN3+= hosts.equiv
@@ -172,6 +159,24 @@ distribution: .PHONY .MAKE check_DESTDIR
.endif # !DISTRIBUTION_DONE
+# motd is copied from a different ${MOTD_SOURCE} depending on DISTRIBVER
+#
+.if !empty(DISTRIBVER:M*.99.*)
+MOTD_SOURCE= motd.current
+.elif !empty(DISTRIBVER:M*BETA*)
+MOTD_SOURCE= motd.beta
+.elif !empty(DISTRIBVER:M*RC*)
+MOTD_SOURCE= motd.rc
+.elif !empty(DISTRIBVER:M*STABLE*)
+MOTD_SOURCE= motd.stable
+.else
+MOTD_SOURCE= motd.default
+.endif
+CLEANFILES+= motd
+motd: ${.CURDIR}/${MOTD_SOURCE} ${_NETBSD_VERSION_DEPENDS}
+ ${_MKTARGET_CREATE}
+ ${HOST_INSTALL_FILE} ${.CURDIR}/${MOTD_SOURCE} ${.TARGET}
+
CLEANFILES+= MAKEDEV
MAKEDEV: ${.CURDIR}/MAKEDEV.awk ${.CURDIR}/MAKEDEV.tmpl \
${.CURDIR}/etc.${MACHINE}/MAKEDEV.conf
Added files:
Index: src/etc/motd.default
diff -u /dev/null src/etc/motd.default:1.1
--- /dev/null Sun Nov 4 11:09:15 2012
+++ src/etc/motd.default Sun Nov 4 11:09:15 2012
@@ -0,0 +1,4 @@
+NetBSD ?.? (UNKNOWN)
+
+Welcome to NetBSD!
+