From bf6eeb13b43509e54cf800ca7ea4ddc55f683103 Mon Sep 17 00:00:00 2001
From: Murray Stokely <murray@FreeBSD.org>
Date: Mon, 25 Feb 2002 14:24:51 +0000
Subject: [PATCH] Netscape 4.X does not support the '@import' directive in CSS
 stylesheets.  To get around this, append the filename specified in the
 'CSS_SHEET_ADDITIONS' variable (if defined) to the end of the default CSS
 stylesheet.  This allows us to add document-specific stylesheet rules while
 still supporting braindead browsers and reusing the default CSS code.

---
 share/mk/doc.docbook.mk | 3 +++
 share/mk/doc.project.mk | 1 +
 2 files changed, 4 insertions(+)

diff --git a/share/mk/doc.docbook.mk b/share/mk/doc.docbook.mk
index 4059cce3e6..d596259683 100644
--- a/share/mk/doc.docbook.mk
+++ b/share/mk/doc.docbook.mk
@@ -727,4 +727,7 @@ package-${_curformat}: ${PACKAGES}/${.CURDIR:T}.${LANGCODE}.${_curformat}.tgz
 .if ${LOCAL_CSS_SHEET} != ${CSS_SHEET}
 ${LOCAL_CSS_SHEET}: ${CSS_SHEET}
 	${CP} -p ${.ALLSRC} ${.TARGET}
+.if defined(CSS_SHEET_ADDITIONS)
+	${CAT} ${.CURDIR}/${CSS_SHEET_ADDITIONS} >> ${.TARGET}
+.endif
 .endif
diff --git a/share/mk/doc.project.mk b/share/mk/doc.project.mk
index ccc72bb5df..74270f6d97 100644
--- a/share/mk/doc.project.mk
+++ b/share/mk/doc.project.mk
@@ -69,6 +69,7 @@ PREFIX?=	${LOCALBASE}
 PRI_LANG?=	en_US.ISO8859-1
 
 CP?=		/bin/cp
+CAT?=		/bin/cat
 ECHO_CMD?=	echo
 LN?=		/bin/ln
 MKDIR?=		/bin/mkdir -p