Module Name: src
Committed By: martin
Date: Sun Nov 3 12:03:36 UTC 2019
Modified Files:
src/etc: MAKEDEV.awk
Log Message:
PR port-arm/54640: hack to work around conditional RAW_PART definition in
arm/include/disklabel.h.
Recognize this special case and skip lines between #ifndef RAW_PART and
the next #endif.
To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/etc/MAKEDEV.awk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/etc/MAKEDEV.awk
diff -u src/etc/MAKEDEV.awk:1.27 src/etc/MAKEDEV.awk:1.28
--- src/etc/MAKEDEV.awk:1.27 Mon Oct 28 02:53:29 2019
+++ src/etc/MAKEDEV.awk Sun Nov 3 12:03:35 2019
@@ -1,6 +1,6 @@
#!/usr/bin/awk -
#
-# $NetBSD: MAKEDEV.awk,v 1.27 2019/10/28 02:53:29 ozaki-r Exp $
+# $NetBSD: MAKEDEV.awk,v 1.28 2019/11/03 12:03:35 martin Exp $
#
# Copyright (c) 2003 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -135,7 +135,18 @@ BEGIN {
diskpartitions = $3
else if ($1 == "#define" && $2 == "OLDMAXPARTITIONS")
diskbackcompat = $3
- else if ($1 == "#define" && $2 == "RAW_PART")
+ else if ($1 == "#ifndef" && $2 == "RAW_PART" &&
+ RAWDISK_OFF) {
+ # special case to ignore #ifndef RAW_PART
+ # sections (e.g. in arm/include/disklabel.h,
+ # when it is already set in
+ # zaurus/include/disklabel.h)
+ while (getline < inc) {
+ # skip all lines upto the next #endif
+ if ($1 == "#endif")
+ break;
+ }
+ } else if ($1 == "#define" && $2 == "RAW_PART")
RAWDISK_OFF = $3
else if ($1 == "#include" &&
$2 ~ "<.*/disklabel.h>" &&
@@ -214,7 +225,7 @@ BEGIN {
print "# Generated from:"
# MAKEDEV.awk (this script) RCS Id
- ARCSID = "$NetBSD: MAKEDEV.awk,v 1.27 2019/10/28 02:53:29 ozaki-r Exp $"
+ ARCSID = "$NetBSD: MAKEDEV.awk,v 1.28 2019/11/03 12:03:35 martin Exp $"
gsub(/\$/, "", ARCSID)
print "# " ARCSID