Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/etc Teach this to deal with the use of include in majors files.
details: https://anonhg.NetBSD.org/src/rev/626457a79a09
branches: trunk
changeset: 332374:626457a79a09
user: matt <matt%NetBSD.org@localhost>
date: Fri Sep 19 09:01:05 2014 +0000
description:
Teach this to deal with the use of include in majors files.
diffstat:
etc/MAKEDEV.awk | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (43 lines):
diff -r 3f1319019eb1 -r 626457a79a09 etc/MAKEDEV.awk
--- a/etc/MAKEDEV.awk Fri Sep 19 09:00:23 2014 +0000
+++ b/etc/MAKEDEV.awk Fri Sep 19 09:01:05 2014 +0000
@@ -1,6 +1,6 @@
#!/usr/bin/awk -
#
-# $NetBSD: MAKEDEV.awk,v 1.24 2013/05/20 11:37:02 mbalmer Exp $
+# $NetBSD: MAKEDEV.awk,v 1.25 2014/09/19 09:01:05 matt Exp $
#
# Copyright (c) 2003 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -63,17 +63,20 @@
majors[1] = "arch/powerpc/conf/majors.powerpc";
else
majors[1] = "arch/" machine "/conf/majors." machine;
+ nm = 2;
# process all files with majors and fill the chr[] and blk[]
# arrays, used in template processing
- for (m in majors) {
+ for (m = 0; m < nm; m++) {
file = top majors[m]
if (system("test -f '" file "'") != 0) {
print "ERROR: can't find majors file '" file "'" > "/dev/stderr"
exit 1
}
while (getline < file) {
- if ($1 == "device-major") {
+ if ($1 == "include") {
+ majors[nm++] = substr($2, 2, length($2)-2);
+ } else if ($1 == "device-major") {
if ($3 == "char") {
chr[$2] = $4
if ($5 == "block")
@@ -211,7 +214,7 @@
print "# Generated from:"
# MAKEDEV.awk (this script) RCS Id
- ARCSID = "$NetBSD: MAKEDEV.awk,v 1.24 2013/05/20 11:37:02 mbalmer Exp $"
+ ARCSID = "$NetBSD: MAKEDEV.awk,v 1.25 2014/09/19 09:01:05 matt Exp $"
gsub(/\$/, "", ARCSID)
print "# " ARCSID
Home |
Main Index |
Thread Index |
Old Index