diff --git a/share/mk/doc.common.mk b/share/mk/doc.common.mk index 59e43eadc2..5018dddc50 100644 --- a/share/mk/doc.common.mk +++ b/share/mk/doc.common.mk @@ -108,6 +108,12 @@ WWW_LANGCODE?= ${_WWW_LANGCODE} DOC_PREFIX!= ${REALPATH} ${DOC_PREFIX} WEB_PREFIX!= ${REALPATH} ${WEB_PREFIX} +.if ${WWW_LANGCODE} == "en" +WEB_PREFIX_REL= ${.CURDIR:S,^${WEB_PREFIX},,:C,/[^/]+,/..,g:S,^/..,,:S,^/,,:S,^$,.,:S,^/..,,} +.else +WEB_PREFIX_REL= ${.CURDIR:S,^${WEB_PREFIX},,:C,/[^/]+,/..,g:S,^/..,,:S,^/,,:S,^$,.,} +.endif + .if !defined(URL_RELPREFIX) URLS_ABSOLUTE= YES .elif !defined(URLS_ABSOLUTE) diff --git a/share/mk/doc.xml.mk b/share/mk/doc.xml.mk index 58ce731114..6829deb81f 100644 --- a/share/mk/doc.xml.mk +++ b/share/mk/doc.xml.mk @@ -1,7 +1,9 @@ # doc.xml.mk # $FreeBSD$ -XML_CATALOG_FILES= file://${DOC_PREFIX}/${LANGCODE}/share/sgml/catalog.xml \ +XML_CATALOG_FILES= file://${.OBJDIR}/catalog-cwd.xml \ + file://${DOC_PREFIX}/${LANGCODE}/share/sgml/catalog.xml \ + file://${DOC_PREFIX}/${LANGCODE}/share/sgml/catalog.xml \ file://${DOC_PREFIX}/share/sgml/catalog.xml \ file://${DOC_PREFIX}/share/sgml/catalog-common.xml \ file://${WEB_PREFIX}/${WWW_LANGCODE}/share/sgml/catalog.xml \ @@ -29,6 +31,16 @@ XML_INCLUDES+= ${F} .endif .endfor +XML_INCLUDES+= ${.OBJDIR}/autogen.ent ${.OBJDIR}/catalog-cwd.xml +CLEANFILES+= ${.OBJDIR}/autogen.ent ${.OBJDIR}/catalog-cwd.xml + +${.OBJDIR}/autogen.ent: + ${ECHO_CMD} '' > ${.TARGET} +${.OBJDIR}/catalog-cwd.xml: ${WEB_PREFIX}/share/sgml/catalog-cwd.xml + ${INSTALL} ${.ALLSRC} ${.TARGET} + +DEPENDSET.DEFAULT+= wwwstd + # DEPENDSET: transtable ...................................................... _DEPENDSET.transtable= ${XML_TRANSTABLE} ${XSL_TRANSTABLE} \ ${XSL_TRANSTABLE_MASTER} ${XSL_TRANSTABLE_COMMON}