diff options
| author | martin <martin@NetBSD.org> | 2019-11-04 14:35:57 +0000 |
|---|---|---|
| committer | martin <martin@NetBSD.org> | 2019-11-04 14:35:57 +0000 |
| commit | 6d6a31370c22b7ced428965cbc96d9132efca7f9 (patch) | |
| tree | c093a25833f439a631708ce53545615b6f90f48e /etc | |
| parent | a0d5e1f5102c5d2c7dfcab7c2b7579fd7c1ff55b (diff) | |
Pull up following revision(s) (requested by tsutsui in ticket #397):
etc/MAKEDEV.awk: revision 1.28
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.
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/MAKEDEV.awk | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/etc/MAKEDEV.awk b/etc/MAKEDEV.awk index bb0d0c5832c..da45c644a54 100644 --- a/etc/MAKEDEV.awk +++ b/etc/MAKEDEV.awk @@ -1,6 +1,6 @@ #!/usr/bin/awk - # -# $NetBSD: MAKEDEV.awk,v 1.26 2019/06/13 20:54:04 christos Exp $ +# $NetBSD: MAKEDEV.awk,v 1.26.2.1 2019/11/04 14:35:57 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.26 2019/06/13 20:54:04 christos Exp $" + ARCSID = "$NetBSD: MAKEDEV.awk,v 1.26.2.1 2019/11/04 14:35:57 martin Exp $" gsub(/\$/, "", ARCSID) print "# " ARCSID |
