diff options
author | hrs <hrs@FreeBSD.org> | 2005-11-28 06:24:19 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2005-11-28 06:24:19 +0000 |
commit | e6bd9effd86c42b68e16388ef086e86e7a536837 (patch) | |
tree | 3074b6d55e8e7bd2d476e322b69d8ffc87a88c0e /release/doc | |
parent | 1f04771fa4ce46cff003cc3d9f0d04d58130d491 (diff) | |
download | FreeBSD-src-e6bd9effd86c42b68e16388ef086e86e7a536837.zip FreeBSD-src-e6bd9effd86c42b68e16388ef086e86e7a536837.tar.gz |
Apply arch= selection to the qandatoc mode. This fixes
link generation with no actual target.
Reported by: Tim Witthoeft (tim.witthoeft at gmail.com)
Diffstat (limited to 'release/doc')
-rw-r--r-- | release/doc/share/sgml/release.dsl | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/release/doc/share/sgml/release.dsl b/release/doc/share/sgml/release.dsl index 193f808..1d41fc8 100644 --- a/release/doc/share/sgml/release.dsl +++ b/release/doc/share/sgml/release.dsl @@ -97,6 +97,49 @@ ; None of the above (else (empty-sosofo))))) +(mode qandatoc + (default + (let* ((arch (attribute-string (normalize "arch"))) + (role (attribute-string (normalize "role"))) + (for-arch (entity-text "arch"))) + (cond + + ; If role=historic, and we're not printing historic things, then + ; don't output this element. + ((and (equal? role "historic") + (not %include-historic%)) + (empty-sosofo)) + + + ; If arch= not specified, then print unconditionally. This clause + ; handles the majority of cases. + ((or (equal? arch #f) (equal? arch "")) + (next-match)) + + ; arch= specified, see if it's equal to "all". If so, then + ; print unconditionally. Note that this clause could be + ; combined with the check to see if arch= wasn't specified + ; or was empty; they have the same outcome. + ((equal? arch "all") + (next-match)) + + ; arch= specified. If we're building for all architectures, + ; then print it prepended with the set of architectures to which + ; this element applies. + ; + ; XXX This doesn't work. +; ((equal? for-arch "all") +; (sosofo-append (literal "[") (literal arch) (literal "] ") +; (process-children))) + + ; arch= specified, so we need to check to see if the specified + ; parameter includes the architecture we're building for. + ((string-list-match? for-arch (split-string-to-list arch)) + (next-match)) + + ; None of the above + (else (empty-sosofo)))))) + ; We might have some sect1 level elements where the modification times ; are significant. An example of this is the "What's New" section in ; the release notes. We enable the printing of pubdate entry in |