put a 'Generated from' with RCS Ids of MAKEDEV.awk, MAKEDEV.tmpl and the

MD MAKEDEV.conf into the generated file

don't copy the 'PLEASE RUN ...' paragraph to the generated file

don't copy the list of individual devices to the generated file -
the info is available in MAKEDEV(8) for those who need it
This commit is contained in:
jdolecek 2004-01-14 20:37:51 +00:00
parent a5e9e87e98
commit d68daf2dd5
1 changed files with 38 additions and 4 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/awk -
#
# $NetBSD: MAKEDEV.awk,v 1.11 2003/12/19 06:04:16 lukem Exp $
# $NetBSD: MAKEDEV.awk,v 1.12 2004/01/14 20:37:51 jdolecek Exp $
#
# Copyright (c) 2003 The NetBSD Foundation, Inc.
# All rights reserved.
@ -99,9 +99,9 @@ BEGIN {
print "ERROR: no platform MAKEDEV.conf - '" cfgfile "' doesn't exist" > "/dev/stderr"
exit 1
}
# skip first two lines - RCS Id and blank line
getline < cfgfile
getline < cfgfile
# skip first two lines
getline CONFRCSID < cfgfile # RCS Id
getline < cfgfile # blank line
MDDEV = 0 # MD device targets
while (getline < cfgfile) {
if (MDDEV)
@ -204,6 +204,40 @@ BEGIN {
next
}
# output 'Generated from' lines
/\$[N]etBSD/ {
print "#"
print "# Generated from:"
# MAKEDEV.awk (this script) RCS Id
ARCSID = "$NetBSD: MAKEDEV.awk,v 1.12 2004/01/14 20:37:51 jdolecek Exp $"
gsub(/\$/, "", ARCSID)
print "# " ARCSID
# MAKEDEV.tmpl RCS Id
gsub(/\$/, "")
print $0
# MD MAKEDEV.conf RCS Id
# strip leading hash and insert machine subdirectory name
gsub(/\$/, "", CONFRCSID)
sub(/^\# /, "", CONFRCSID)
sub(/MAKEDEV.conf/, "etc." machine "/MAKEDEV.conf", CONFRCSID)
print "# " CONFRCSID
next # don't print the RCS Id line again
}
# filter the 'PLEASE RUN ...' paragraph
/^\# PLEASE RUN/, /^\#\#\#\#\#\#/ {
next
}
# filter the device list
/^\# Tapes/,/^$/ {
next
}
# filter the two unneeded makedisk_p* routines, leave only
# the one used
/^makedisk_p8\(\) \{/, /^\}/ {