aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2011-12-28 00:32:13 +0000
committerIngo Schwarze <schwarze@openbsd.org>2011-12-28 00:32:13 +0000
commit35e4fb6045ddb0ecb07ca1cd746258735b8b124e (patch)
tree17547d84471bbe56ea7b4129869d854f304e23f4 /mandocdb.c
parent3ed42b38f8b5daaa9ef95ecfe2509c3344cd8504 (diff)
downloadmandoc-35e4fb6045ddb0ecb07ca1cd746258735b8b124e.tar.gz
mandoc-35e4fb6045ddb0ecb07ca1cd746258735b8b124e.tar.zst
mandoc-35e4fb6045ddb0ecb07ca1cd746258735b8b124e.zip
Do not skip manuals shared across architectures when building databases.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/mandocdb.c b/mandocdb.c
index cf92d6dd..6b25b4e9 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.41 2011/12/25 19:31:25 kristaps Exp $ */
+/* $Id: mandocdb.c,v 1.42 2011/12/28 00:32:13 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -615,8 +615,8 @@ index_merge(const struct of *of, struct mparse *mp,
/*
* 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;
@@ -631,6 +631,21 @@ index_merge(const struct of *of, struct mparse *mp,
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)) {
@@ -639,7 +654,7 @@ index_merge(const struct of *of, struct mparse *mp,
"architecture \"%s\" manual "
"in \"%s\" directory\n",
fn, march, of->arch);
- skip = 1;
+ march = of->arch;
}
/*