Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/man/man8 Rewrite MAKEDEV.8.



details:   https://anonhg.NetBSD.org/src/rev/ca145c167d30
branches:  trunk
changeset: 508635:ca145c167d30
user:      wiz <wiz%NetBSD.org@localhost>
date:      Mon Apr 16 08:08:19 2001 +0000

description:
Rewrite MAKEDEV.8.
Use one common template instead of 20 slightly different ones.

diffstat:

 share/man/man8/MAKEDEV.8.template              |   95 ++++++++++++++++++
 share/man/man8/MAKEDEV2manpage.pl              |   40 +++++--
 share/man/man8/man8.alpha/MAKEDEV.8.template   |  131 -------------------------
 share/man/man8/man8.amiga/MAKEDEV.8.template   |   81 ---------------
 share/man/man8/man8.arc/MAKEDEV.8.template     |   82 ---------------
 share/man/man8/man8.arm32/MAKEDEV.8.template   |   72 -------------
 share/man/man8/man8.atari/MAKEDEV.8.template   |   80 ---------------
 share/man/man8/man8.bebox/MAKEDEV.8.template   |   82 ---------------
 share/man/man8/man8.hp300/MAKEDEV.8.template   |   80 ---------------
 share/man/man8/man8.hpcmips/MAKEDEV.8.template |   82 ---------------
 share/man/man8/man8.i386/MAKEDEV.8.template    |   82 ---------------
 share/man/man8/man8.mac68k/MAKEDEV.8.template  |   81 ---------------
 share/man/man8/man8.mvme68k/MAKEDEV.8.template |   81 ---------------
 share/man/man8/man8.next68k/MAKEDEV.8.template |   81 ---------------
 share/man/man8/man8.pc532/MAKEDEV.8.template   |   81 ---------------
 share/man/man8/man8.pmax/MAKEDEV.8.template    |   81 ---------------
 share/man/man8/man8.prep/MAKEDEV.8.template    |   82 ---------------
 share/man/man8/man8.sparc/MAKEDEV.8.template   |   81 ---------------
 share/man/man8/man8.sparc64/MAKEDEV.8.template |   82 ---------------
 share/man/man8/man8.sun3/MAKEDEV.8.template    |   81 ---------------
 share/man/man8/man8.vax/MAKEDEV.8.template     |   73 -------------
 share/man/man8/man8.x68k/MAKEDEV.8.template    |   81 ---------------
 22 files changed, 124 insertions(+), 1668 deletions(-)

diffs (truncated from 1932 to 300 lines):

diff -r b72f25143d51 -r ca145c167d30 share/man/man8/MAKEDEV.8.template
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man8/MAKEDEV.8.template Mon Apr 16 08:08:19 2001 +0000
@@ -0,0 +1,95 @@
+.\" $NetBSD: MAKEDEV.8.template,v 1.1 2001/04/16 08:08:19 wiz Exp $
+.\"
+.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Thomas Klausner.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"    notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"    notice, this list of conditions and the following disclaimer in the
+.\"    documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\"    must display the following acknowledgement:
+.\"        This product includes software developed by the NetBSD
+.\"        Foundation, Inc. and its contributors.
+.\" 4. Neither the name of The NetBSD Foundation nor the names of its
+.\"    contributors may be used to endorse or promote products derived
+.\"    from this software without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd @@@DATE@@@
+.Dt MAKEDEV 8 @@@ARCH@@@
+.Os
+.Sh NAME
+.Nm MAKEDEV
+.Nd create system and device special files
+.Sh SYNOPSIS
+.Nm
+.Ar special Op Ar ...
+
+.Nm
+.Ar device Op Ar ...
+.Sh DESCRIPTION
+.Nm
+is used to create system and device special files.
+As arguments it takes the names of known devices, like
+.Ar sd0 ,
+or of special targets, like
+.Pa all
+or
+.Pa std ,
+which create a collection of device special files.
+.Pp
+The script is in
+.Pa /dev/MAKEDEV
+and must be called from the
+.Pa /dev
+directory.
+.Pp
+The special targets supported on
+.Nx Ns / Ns @@@ARCH@@@
+are:
+.Pp
+@@@SPECIAL@@@
+.Pp
+Please note that any hash marks
+.Pq Dq #
+in the following list of supported device targets must be replaced by
+digits when calling
+.Nm "" :
+.Pp
+@@@DEVICES@@@
+.Sh FILES
+.Bl -tag -width "/dev/MAKEDEV" -compact
+.It Pa /dev
+special device files directory
+.It Pa /dev/MAKEDEV
+script described in this man page
+.El
+.Sh SEE ALSO
+.Xr intro 4 ,
+.Xr config 8 ,
+.Xr mknod 8
+.Sh BUGS
+This man page is generated automatically from the same sources
+as
+.Pa /dev/MAKEDEV ,
+in which the device files are not always sorted, which may result
+in an unusual (non-alphabetical) order.
diff -r b72f25143d51 -r ca145c167d30 share/man/man8/MAKEDEV2manpage.pl
--- a/share/man/man8/MAKEDEV2manpage.pl Mon Apr 16 03:10:14 2001 +0000
+++ b/share/man/man8/MAKEDEV2manpage.pl Mon Apr 16 08:08:19 2001 +0000
@@ -1,6 +1,6 @@
 #!/usr/pkg/bin/perl
 #
-#      $NetBSD: MAKEDEV2manpage.pl,v 1.4 2000/06/11 10:02:58 veego Exp $
+#      $NetBSD: MAKEDEV2manpage.pl,v 1.5 2001/04/16 08:08:19 wiz Exp $
 #
 # Copyright (c) 1999
 #      Hubert Feyrer <hubertf%netbsd.org@localhost>.  All rights reserved.
@@ -37,10 +37,12 @@
 ###########################################################################
 #
 # Convert src/etc/etc.${ARCH}/MAKEDEV and
-# src/share/man/man8/man8.${ARCH}/MAKEDEV.8.template to  
+# src/share/man/man8/MAKEDEV.8.template to  
 # src/share/man/man8/man8.${ARCH}/MAKEDEV.8, replacing
 #  - @@@SPECIAL@@@ with all targets in the first section (all, std, ...)
 #  - @@@DEVICES@@@ with the remaining targets
+#  - @@@DATE@@@ with the date from the previous version, if found
+#  - @@@ARCH@@@ with the architecture name
 #
 
 $_lastline = "";
@@ -157,7 +159,7 @@
                   $l .= "$page(4)";
               }
 
-              while ($l =~ s/\s*(\w+)\((\d)\)(.*)/\n.Xr \1 \2 \3/g){;}
+              while ($l =~ s/\s*(\w+)\((\d)\)(.*)/\n.Xr \1 \2 \3/g){$l =~ s/[ \t]+$//g;}
 
              print MANPAGE ". It Ar $target\n";
              print MANPAGE "$l\n";
@@ -177,14 +179,14 @@
 
     return "no MAKEDEV file found"
        if ! -f "../../../etc/etc.${arch}/MAKEDEV";
-    return "no man8.${arch}/MAKEDEV.8.template"
-       if ! -f "man8.${arch}/MAKEDEV.8.template";
+    return "no MAKEDEV.8.template"
+       if ! -f "MAKEDEV.8.template";
 
     rename("man8.${arch}/MAKEDEV.8", "man8.${arch}/MAKEDEV.8.old");
 
     # find out current RCS ID
     $RCSID="\$NetBSD\$";
-    open(OLD, "man8.${arch}/MAKEDEV.8.old") or die;
+    open(OLD, "man8.${arch}/MAKEDEV.8.old");
     while(<OLD>) {
         if (/(\$NetBSD.*\$)/) {
             $RCSID = "$1";
@@ -196,22 +198,38 @@
     print MANPAGE ".\\\" *** ------------------------------------------------------------------\n";
     print MANPAGE ".\\\" *** This file was generated automatically\n";
     print MANPAGE ".\\\" *** from src/etc/etc.${arch}/MAKEDEV and\n";
-    print MANPAGE ".\\\" *** src/share/man/man8/man8.${arch}/MAKEDEV.8.template\n";
-    print MANPAGE ".\\\" *** \n";
+    print MANPAGE ".\\\" *** src/share/man/man8/MAKEDEV.8.template\n";
+    print MANPAGE ".\\\" ***\n";
     print MANPAGE ".\\\" *** DO NOT EDIT - any changes will be lost!!!\n";
     print MANPAGE ".\\\" *** ------------------------------------------------------------------\n";
     print MANPAGE ".\\\"\n";
 
     open(MAKEDEV, "../../../etc/etc.${arch}/MAKEDEV") or die;
     
-    open(TEMPLATE, "man8.${arch}/MAKEDEV.8.template")  or die;
+    open(TEMPLATE, "MAKEDEV.8.template")       or die;
     while(<TEMPLATE>) {
-       if (/^\@\@\@.*\@\@\@$/) {
-           print MANPAGE ".\\\" $_";
+       if (/\@\@\@.*\@\@\@/) {
            if (/^\@\@\@SPECIAL\@\@\@$/) {
+               print MANPAGE ".\\\" $_";
                do_special();
            } elsif (/^\@\@\@DEVICES\@\@\@$/) {
+               print MANPAGE ".\\\" $_";
                do_devices();
+           } elsif (/\@\@\@ARCH\@\@\@/) {
+               s/\@\@\@ARCH\@\@\@/${arch}/g;
+               print MANPAGE "$_";
+           } elsif (/\@\@\@DATE\@\@\@/) {
+               my $mydate;
+               $mydate=`grep ^.Dd man8.${arch}/MAKEDEV.8.old 2>/dev/null`;
+               if ($mydate) {
+                   print MANPAGE $mydate;
+               } else {
+                   print MANPAGE "$_";
+                   print "Date not found in previous version, or previous".
+                         " version not found.\nPlease replace".
+                         " \@\@\@DATE\@\@\@ in man8.${arch}/MAKEDEV.8 with".
+                         " a real date.\n";
+               }
            }
        } elsif (/(\$NetBSD.*\$)/) {
            $id=$1;
diff -r b72f25143d51 -r ca145c167d30 share/man/man8/man8.alpha/MAKEDEV.8.template
--- a/share/man/man8/man8.alpha/MAKEDEV.8.template      Mon Apr 16 03:10:14 2001 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-.\" $NetBSD: MAKEDEV.8.template,v 1.2 2000/06/14 17:25:47 cgd Exp $
-.\"
-.\" Copyright (c) 1999 Christopher G. Demetriou
-.\" All rights reserved.
-.\" 
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"    notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"    notice, this list of conditions and the following disclaimer in the
-.\"    documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"          This product includes software developed for the
-.\"          NetBSD Project.  See http://www.netbsd.org/ for
-.\"          information about NetBSD.
-.\" 4. The name of the author may not be used to endorse or promote products
-.\"    derived from this software without specific prior written permission.
-.\" 
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\" 
-.\" <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
-.\"
-.\"
-.\" Copyright (c) 1991 The Regents of the University of California.
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\" 1. Redistributions of source code must retain the above copyright
-.\"    notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\"    notice, this list of conditions and the following disclaimer in the
-.\"    documentation and/or other materials provided with the distribution.
-.\" 3. All advertising materials mentioning features or use of this software
-.\"    must display the following acknowledgement:
-.\"    This product includes software developed by the University of
-.\"    California, Berkeley and its contributors.
-.\" 4. Neither the name of the University nor the names of its contributors
-.\"    may be used to endorse or promote products derived from this software
-.\"    without specific prior written permission.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-.\" SUCH DAMAGE.
-.\"
-.\"    @(#)MAKEDEV.8   5.2 (Berkeley) 3/22/91
-.\"
-.Dd April 3, 1999
-.Dt MAKEDEV 8 alpha
-.Os
-.Sh NAME
-.Nm MAKEDEV ,
-.Nm makedev
-.Nd create system and device special files
-.Sh SYNOPSIS
-.Nm MAKEDEV
-.Ar name
-.Op Ar ...
-.Sh DESCRIPTION
-The shell script
-.Nm MAKEDEV ,
-found in the
-.Pa /dev
-directory, is used to create
-the common special
-files.
-.\" See
-.\" .Xr special 8
-.\" for a more complete discussion of special files.
-.Pp
-.Nm MAKEDEV
-takes any number of device names as arguments,
-where the names are the common abbreviation for
-the device.
-.Pp
-The
-.Nx Ns Tn /alpha
-.Nm
-script supports the following special names.
-.Pp



Home | Main Index | Thread Index | Old Index