Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Feb 2003 11:23:23 -0500
From:      Mike Barcroft <mike@FreeBSD.org>
To:        freebsd-arch@freebsd.org
Subject:   [RFC] Merging NOTES (was: Re: [RFC] splitting of conf/NOTES)
Message-ID:  <20030224112323.A61907@espresso.bsdmike.org>
In-Reply-To: <20030224001644.GA67255@dragon.nuxi.com>; from obrien@freebsd.org on Sun, Feb 23, 2003 at 04:16:44PM -0800
References:  <20030224001644.GA67255@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--OgqxwSJOaUobr8KG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

David O'Brien <obrien@freebsd.org> writes:
> I can now create a sparc64 LINT kernel with the patches at
> http://people.freebsd.org/~obrien/sp64notes.diff.  The essence of this
> patch is to split sys/conf/NOTES into NOTES, NOTES.bt, NOTES.ext2fs,
> NOTES.ps2, NOTES.raid, and NOTES.syscons.  Each /sys/<arch>/conf/Makefile
> now looks like:

Counter-proposal:
  Merge all sys/*/conf/NOTES and sys/conf/NOTES into one file, and add
  CPP parsing.

With this patch one has the ability to specify things like:
.if defined(__alpha__) || defined(__i386__)
or:
.ifndef __pc98__

This patch could also be extended to allow bus specific defines:
.ifdef __sparc64__
.define SBUS_SUPPORT
.endif

.if defined(__alpha__) || defined(__i386__)
.define ISA_SUPPORT
.endif

.ifdef SBUS_SUPPORT
...
.endif 

Also, when making a driver MD -> MI, one need only move it up a few
lines, so history is preserved in a single file.

Best regards,
Mike Barcroft

--OgqxwSJOaUobr8KG
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="NOTES.diff"

Index: alpha/conf/Makefile
===================================================================
RCS file: /work/repo/src/sys/alpha/conf/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- alpha/conf/Makefile	15 Jul 2002 17:50:17 -0000	1.1
+++ alpha/conf/Makefile	24 Feb 2003 16:22:18 -0000
@@ -6,5 +6,5 @@
 clean:
 	rm -f LINT
 
-LINT: ../../conf/NOTES NOTES ../../conf/makeLINT.sed
-	cat ../../conf/NOTES NOTES | sed -E -n -f ../../conf/makeLINT.sed > LINT
+LINT: ../../conf/NOTES ../../conf/makeLINT.sed
+	cat ../../conf/NOTES NOTES | sed -E -n -f ../../conf/makeLINT.sed | cpp -P -D__alpha__=1 | sed 's/"@/\\"/g' > LINT
Index: conf/NOTES
===================================================================
RCS file: /work/repo/src/sys/conf/NOTES,v
retrieving revision 1.1130
diff -u -r1.1130 NOTES
--- conf/NOTES	23 Feb 2003 13:32:32 -0000	1.1130
+++ conf/NOTES	24 Feb 2003 16:20:26 -0000
@@ -2118,3 +2118,23 @@
 options 	METEOR_TEST_VIDEO
 options 	NDEVFSINO=1025
 options 	NDEVFSOVERFLOW=32769
+
+#####################################################################
+# ALPHA SPECIFIC OPTIONS
+
+.ifdef __alpha__
+
+# All of sys/alpha/conf/NOTES moved here.
+
+.endif # __alpha__
+
+#####################################################################
+# I386 SPECIFIC OPTIONS
+
+.ifdef __i386__
+
+# All of sys/i386/conf/NOTES moved here.
+
+.endif # __i386__
+
+# ... ETC ...
Index: conf/makeLINT.sed
===================================================================
RCS file: /work/repo/src/sys/conf/makeLINT.sed,v
retrieving revision 1.2
diff -u -r1.2 makeLINT.sed
--- conf/makeLINT.sed	23 Feb 2003 19:40:45 -0000	1.2
+++ conf/makeLINT.sed	24 Feb 2003 16:08:29 -0000
@@ -1,7 +1,9 @@
 #!/usr/bin/sed -E -n -f
 # $FreeBSD: src/sys/conf/makeLINT.sed,v 1.2 2003/02/23 19:40:45 obrien Exp $
 
-/^(machine|ident|device|nodevice|makeoptions|options|profile|cpu|option|maxusers)[[:space:]]/ {
+/^(((machine|ident|device|nodevice|makeoptions|options|profile|cpu|option|maxusers|\.if|\.ifdef|\.ifndef)[[:space:]])|\.endif)/ {
     s/[[:space:]]*#.*$//
+    s/^\./#/
+    s/\\"/"@/g
     p
 }
Index: i386/conf/Makefile
===================================================================
RCS file: /work/repo/src/sys/i386/conf/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- i386/conf/Makefile	15 Jul 2002 17:48:47 -0000	1.7
+++ i386/conf/Makefile	24 Feb 2003 16:10:12 -0000
@@ -6,5 +6,5 @@
 clean:
 	rm -f LINT
 
-LINT: ../../conf/NOTES NOTES ../../conf/makeLINT.sed
-	cat ../../conf/NOTES NOTES | sed -E -n -f ../../conf/makeLINT.sed > LINT
+LINT: ../../conf/NOTES ../../conf/makeLINT.sed
+	cat ../../conf/NOTES NOTES | sed -E -n -f ../../conf/makeLINT.sed | cpp -P -D__i386__=1 | sed 's/"@/\\"/g' > LINT

--OgqxwSJOaUobr8KG--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030224112323.A61907>