tech@mandoc.bsd.lv
 help / color / mirror / Atom feed
From: Ingo Schwarze <schwarze@usta.de>
To: tech@mdocml.bsd.lv
Subject: do not skip manuals shared across architectures
Date: Mon, 26 Dec 2011 12:48:27 +0100	[thread overview]
Message-ID: <20111226114827.GG11624@iris.usta.de> (raw)

You want this on bsd.lv, too?
  Ingo

----- Forwarded message from Ingo Schwarze <schwarze@cvs.openbsd.org> -----

From: Ingo Schwarze <schwarze@cvs.openbsd.org>
Date: Mon, 26 Dec 2011 04:44:31 -0700 (MST)
To: source-changes@cvs.openbsd.org
Subject: CVS: cvs.openbsd.org: src

CVSROOT:	/cvs
Module name:	src
Changes by:	schwarze@cvs.openbsd.org	2011/12/26 04:44:31

Modified files:
	usr.bin/mandoc : mandocdb.c 

Log message:
Do not skip manuals shared across architectures when building databases.

----- End forwarded message -----


Index: mandocdb.c
===================================================================
RCS file: /cvs/src/usr.bin/mandoc/mandocdb.c,v
retrieving revision 1.31
diff -u -p -r1.31 mandocdb.c
--- mandocdb.c	25 Dec 2011 19:57:20 -0000	1.31
+++ mandocdb.c	26 Dec 2011 11:42:28 -0000
@@ -603,8 +603,8 @@ index_merge(const struct of *of, struct 
 
 		/*
 		 * By default, skip a file if the manual section
-		 * and architecture given in the file disagree
-		 * with the directory where the file is located.
+		 * given in the file disagrees with the directory
+		 * where the file is located.
 		 */
 
 		skip = 0;
@@ -619,6 +619,21 @@ index_merge(const struct of *of, struct 
 			skip = 1;
 		}
 
+		/*
+		 * Manual page directories exist for each kernel
+		 * architecture as returned by machine(1).
+		 * However, many manuals only depend on the
+		 * application architecture as returned by arch(1).
+		 * For example, some (2/ARM) manuals are shared
+		 * across the "armish" and "zaurus" kernel
+		 * architectures.
+		 * A few manuals are even shared across completely
+		 * different architectures, for example fdformat(1)
+		 * on amd64, i386, sparc, and sparc64.
+		 * Thus, warn about architecture mismatches,
+		 * but don't skip manuals for this reason.
+		 */
+
 		assert(of->arch);
 		assert(march);
 		if (strcasecmp(march, of->arch)) {
@@ -627,7 +642,7 @@ index_merge(const struct of *of, struct 
 					"architecture \"%s\" manual "
 					"in \"%s\" directory\n",
 					fn, march, of->arch);
-			skip = 1;
+			march = of->arch;
 		}
 
 		/*
--
 To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv

             reply	other threads:[~2011-12-26 11:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-26 11:48 Ingo Schwarze [this message]
2011-12-28  0:00 ` Kristaps Dzonsons
2011-12-28  0:37   ` Ingo Schwarze

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111226114827.GG11624@iris.usta.de \
    --to=schwarze@usta.de \
    --cc=tech@mdocml.bsd.lv \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).