Fix &base; definition and add DOC_PREFIX_REL for autogen.ent.

Approved by:	doceng (implicit)
This commit is contained in:
Hiroki Sato 2012-05-17 20:21:00 +00:00
parent 35babe0ae5
commit 89a02c01d7
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=38827
2 changed files with 10 additions and 3 deletions

View file

@ -46,6 +46,13 @@ LANGCODE?= ${_LANGCODE}
# normalize DOC_PREFIX
DOC_PREFIX!= ${REALPATH} ${DOC_PREFIX}
# Used for &base;
.if ${LANGCODE} == "en_US.ISO8859-1"
DOC_PREFIX_REL= ${.CURDIR:S,^${DOC_PREFIX},,:C,/[^/]+,/..,g:S,^/..,,:S,^/,,:S,^$,.,:S,^/..,,}
.else
DOC_PREFIX_REL= ${.CURDIR:S,^${DOC_PREFIX},,:C,/[^/]+,/..,g:S,^/..,,:S,^/,,:S,^$,.,}
.endif
.if !defined(URL_RELPREFIX)
URLS_ABSOLUTE= YES
.elif !defined(URLS_ABSOLUTE)

View file

@ -3,15 +3,15 @@
<!-- FreeBSD Common Entities -->
<!-- PUBLIC "-//FreeBSD//ENTITIES FreeBSD Common Entities//EN" -->
<!-- default value of &base; -->
<!ENTITY base ".">
<!ENTITY % url.enbase.eq.base "IGNORE">
<![ %url.enbase.eq.base; [
<!ENTITY enbase "&base;">
]]>
<!ENTITY enbase "&base;/..">
<!-- default value of &base; -->
<!ENTITY base ".">
<!-- default langcode and encoding -->
<!ENTITY url.doc.langcode 'en_US.ISO8859-1'>
<!ENTITY xml.encoding 'iso-8859-1'>