suggestion for adding a l10n-capable doc-format navi

Hiroki Sato hrs at eos.ocn.ne.jp
Sun Apr 20 10:53:46 UTC 2003


bmah at FreeBSD.org (Bruce A. Mah) wrote
  in <200304191749.h3JHndxV053505 at bmah.dyndns.org>:

bmah> >  Yes, you have got a point.  I made another patch that makes the link
bmah> >  be generated only when ${FORMATS} includes both of "html" and "html-split,"
bmah> >  and "WITH_DOCFORMAT_NAVI_LINK=YES."
bmah> 
bmah> OK.  I *think* this is better.  This will make it more conservative 
bmah> about adding the navi-link, but it will give it to us whenever we know 
bmah> that we have both versions available.  (Plus we can still override it 
bmah> if for some reason we need to do this.)

 How about the following:

  1) WITH_FOO is defined and WITH_FOO!=NO, it means YES.
  2) WITH_FOO is defined and WITH_FOO==NO, it means NO.
  3) WITH_FOO is not defined, it means NO.

 A problem of that defining of WITH_FOO always means YES is that
 we cannot disable it if it is enabled by default in Makefile
 using WITH_FOO?=YES.  But as you pointed out, in other places
 this sort of variables that is defined mean YES regardless of what
 the value was.  The above behavior is not against the old one, I think.

 Besides, I changed the logic for WITH_DOCFORMAT_NAVI_LINK again
 in the attached patch like this:

  if $WITH_DOCFORMAT_NAVI_LINK is defined
     if $WITH_DOCFORMAT_NAVI_LINK != NO
        <add navi-link>
     endif
  else if $FORMATS includes both "html" and "html-split"
     <add navi-link>
  endif

 Namely, $WITH_DOCFORMAT_NAVI_LINK has priority.  Even if html and/or
 html-split version do not exist, specifying WITH_DOCFORMAT_NAVI_LINK=YES we
 can generate the navi-link.  If the variable is not defined, the link is
 generated only when the two versions are built at the same time.  I guess
 the latter behavior does not become harmful.  I think I will commit
 the patch and backout WITH_DOCFORMAT_NAVI_LINK?=YES in doc/en_US.ISO8859-1.

 Any comments?

-- 
| Hiroki SATO  <hrs at eos.ocn.ne.jp> / <hrs at FreeBSD.org>
-------------- next part --------------
Index: doc.docbook.mk
===================================================================
RCS file: /home/dcvs/doc/share/mk/doc.docbook.mk,v
retrieving revision 1.82
diff -d -u -I\$FreeBSD:.*\$ -I\$Id:.*\$ -I\$hrs:.*\$ -r1.82 doc.docbook.mk
--- doc.docbook.mk	19 Apr 2003 11:39:30 -0000	1.82
+++ doc.docbook.mk	20 Apr 2003 10:39:51 -0000
@@ -192,18 +192,22 @@
 PNMTOPSFLAGS+=	-rle
 .endif
 
-.if !defined(WITH_INLINE_LEGALNOTICE) || empty(WITH_INLINE_LEGALNOTICE)
+.if !defined(WITH_INLINE_LEGALNOTICE) || (${WITH_INLINE_LEGALNOTICE} == "NO")
 HTMLFLAGS+=	-V %generate-legalnotice-link%
 .endif
-.if defined(WITH_ARTICLE_TOC) && !empty(WITH_ARTICLE_TOC)
+.if defined(WITH_ARTICLE_TOC) && (${WITH_ARTICLE_TOC} != "NO")
 HTMLFLAGS+=	-V %generate-article-toc%
 PRINTFLAGS+=	-V %generate-article-toc%
 .endif
-.if defined(WITH_BIBLIOXREF_TITLE) && !empty(WITH_BIBLIOXREF_TITLE)
+.if defined(WITH_BIBLIOXREF_TITLE) && (${WITH_BIBLIOXREF_TITLE} != "NO")
 HTMLFLAGS+=	-V biblio-xref-title
 PRINTFLAGS+=	-V biblio-xref-title
 .endif
-.if defined(WITH_DOCFORMAT_NAVI_LINK) && !empty(WITH_DOCFORMAT_NAVI_LINK)
+.if defined(WITH_DOCFORMAT_NAVI_LINK)
+.if (${WITH_DOCFORMAT_NAVI_LINK} != "NO")
+HTMLFLAGS+=	-V %generate-docformat-navi-link%
+.endif
+.elif (${FORMATS:Mhtml} == "html") && (${FORMATS:Mhtml-split} == "html-split")
 HTMLFLAGS+=	-V %generate-docformat-navi-link%
 .endif
 


More information about the freebsd-doc mailing list