Create FreeBSD copyright (c comment) for OS version

This commit is contained in:
Wolfram Schneider 1996-08-04 22:34:23 +00:00
parent d2c75ac3d8
commit 7b2dfbf801
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=17432
2 changed files with 35 additions and 5 deletions

View File

@ -1,5 +1,5 @@
# From: @(#)Makefile 8.2 (Berkeley) 1/4/94
# $Id: Makefile,v 1.37 1996/06/15 18:05:36 wollman Exp $
# $Id: Makefile,v 1.38 1996/07/09 15:48:20 ache Exp $
#
# Doing a make install builds /usr/include
#
@ -47,8 +47,9 @@ beforeinstall: ${SHARED}
done
.if exists (${.CURDIR}/../sys/conf/newvers.sh)
@${ECHO} creating osreldate.h from newvers.sh
@echo \#'undef __FreeBSD_version' > ${OSREL}.new
. ${.CURDIR}/../sys/conf/newvers.sh ; \
. ${.CURDIR}/../sys/conf/newvers.sh; \
echo "$$COPYRIGHT" >> ${OSREL}.new; \
echo \#'undef __FreeBSD_version' >> ${OSREL}.new; \
echo \#'define __FreeBSD_version' $$RELDATE >> ${OSREL}.new
.else
@${ECHO} creating osreldate.h from sysctl info

View File

@ -32,7 +32,7 @@
# SUCH DAMAGE.
#
# @(#)newvers.sh 8.1 (Berkeley) 4/20/94
# $Id: newvers.sh,v 1.22 1995/11/10 21:52:59 joerg Exp $
# $Id: newvers.sh,v 1.23 1996/07/12 11:21:57 peter Exp $
TYPE="FreeBSD"
REVISION="2.2"
@ -46,6 +46,33 @@ VERSION="${TYPE} ${RELEASE}"
RELDATE="199608"
b=share/examples/etc/bsd-style-copyright
year=`date '+%Y'`
# look for copyright template
for bsd_copyright in ../$b ../../$b ../../../$b /usr/src/$b /usr/$b
do
if [ -r "$bsd_copyright" ]; then
COPYRIGHT=`sed -e "s/\[year\]/$year/" \
-e 's/\[your name here\]\. /FreeBSD Inc./' \
-e 's/\[your name\]/FreeBSD Inc./' $bsd_copyright`
break
fi
done
# no copyright found, use a dummy
if [ X"$COPYRIGHT" = X ]; then
COPYRIGHT="/*
* Copyright (C) $year
* FreeBSD Inc. All rights reserved.
*
*/"
fi
# add newline
COPYRIGHT="$COPYRIGHT
"
LC_TIME=; export LC_TIME
if [ ! -r version ]
then
@ -54,7 +81,9 @@ fi
touch version
v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date`
echo "char ostype[] = \"${TYPE}\";" > vers.c
cat /dev/null > vers.c
echo "$COPYRIGHT" >> vers.c
echo "char ostype[] = \"${TYPE}\";" >> vers.c
echo "char osrelease[] = \"${RELEASE}\";" >> vers.c
echo "int osreldate = ${RELDATE};" >> vers.c
echo "char sccs[4] = { '@', '(', '#', ')' };" >>vers.c