Date: Sun, 20 Apr 2003 19:52:05 +0900 (JST) From: Hiroki Sato <hrs@eos.ocn.ne.jp> To: bmah@FreeBSD.org Cc: doc@FreeBSD.org Subject: Re: suggestion for adding a l10n-capable doc-format navi Message-ID: <20030420.195205.50333554.hrs@eos.ocn.ne.jp> In-Reply-To: <200304191749.h3JHndxV053505@bmah.dyndns.org> References: <200304191540.h3JFeSxV052609@bmah.dyndns.org> <20030420.020436.102903006.hrs@eos.ocn.ne.jp> <200304191749.h3JHndxV053505@bmah.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
----Next_Part(Sun_Apr_20_19:52:05_2003_003)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit bmah@FreeBSD.org (Bruce A. Mah) wrote in <200304191749.h3JHndxV053505@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@eos.ocn.ne.jp> / <hrs@FreeBSD.org> ----Next_Part(Sun_Apr_20_19:52:05_2003_003)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="doc.docbook.mk.diff" 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 ----Next_Part(Sun_Apr_20_19:52:05_2003_003)----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030420.195205.50333554.hrs>