[patch] SP_ENCODING support in doc.docbook.mk
Hiroki Sato
hrs at FreeBSD.org
Fri Aug 6 19:32:18 UTC 2004
Hi,
Denis Peplin <den at freebsd.org> wrote
in <4110CB82.8000204 at FreeBSD.org>:
den> Patch in attacment can fix encoding of printed
den> formats, at least for KOI8-R (and for encodings,
den> supported by jade).
I think this should depend on <langcode>/share directory,
not on share/. What do you think about separating such
customizations for a specific language like the attached patch?
--
| Hiroki SATO
-------------- next part --------------
Index: en_US.ISO8859-1/share/mk/doc.local.mk
===================================================================
RCS file: en_US.ISO8859-1/share/mk/doc.local.mk
diff -N en_US.ISO8859-1/share/mk/doc.local.mk
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ en_US.ISO8859-1/share/mk/doc.local.mk 6 Aug 2004 19:19:09 -0000
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+SP_ENCODING?= ${LANGCODE:C,^.*\.,,:C,^ISO,ISO-,}
Index: ru_RU.KOI8-R/share/mk/doc.local.mk
===================================================================
RCS file: ru_RU.KOI8-R/share/mk/doc.local.mk
diff -N ru_RU.KOI8-R/share/mk/doc.local.mk
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ ru_RU.KOI8-R/share/mk/doc.local.mk 6 Aug 2004 19:17:37 -0000
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+SP_ENCODING?= KOI8-R
Index: share/mk/doc.docbook.mk
===================================================================
RCS file: /home/ncvs/doc/share/mk/doc.docbook.mk,v
retrieving revision 1.110
diff -d -u -I\$FreeBSD:.*\$ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$hrs:.*\$ -r1.110 doc.docbook.mk
--- share/mk/doc.docbook.mk 6 Aug 2004 09:33:17 -0000 1.110
+++ share/mk/doc.docbook.mk 6 Aug 2004 19:16:28 -0000
@@ -147,7 +147,10 @@
SX?= ${PREFIX}/bin/sx
.endif
-JADE_CMD= ${JADE}
+.if defined(SP_ENCODING)
+JADE_ENV+= SP_ENCODING=${SP_ENCODING}
+.endif
+JADE_CMD= env ${JADE_ENV} ${JADE}
DSLHTML?= ${DOC_PREFIX}/share/sgml/default.dsl
DSLPRINT?= ${DOC_PREFIX}/share/sgml/default.dsl
@@ -451,17 +454,6 @@
.MAIN: all
all: ${_docs}
-
-#
-# SP_ENCODING support
-#
-CUR_ENCODING!= ${ECHO} ${LANGCODE} | ${SED} 's/^.*\.//' | \
- ${SED} 's/^ISO/ISO\-/'
-.for _sp_encoding in ${SP_ENCODING_LIST}
-.if ${CUR_ENCODING} == ${_sp_encoding}
-JADE_CMD= SP_ENCODING=${CUR_ENCODING} ${JADE}
-.endif
-.endfor
# XML --------------------------------------------------------------------
Index: share/mk/doc.project.mk
===================================================================
RCS file: /home/ncvs/doc/share/mk/doc.project.mk,v
retrieving revision 1.18
diff -d -u -I\$FreeBSD:.*\$ -I\$NetBSD:.*\$ -I\$OpenBSD:.*\$ -I\$DragonFly:.*\$ -I\$Id:.*\$ -I\$hrs:.*\$ -r1.18 doc.project.mk
--- share/mk/doc.project.mk 23 Jul 2004 18:58:56 -0000 1.18
+++ share/mk/doc.project.mk 6 Aug 2004 19:16:28 -0000
@@ -99,6 +99,12 @@
# targets and variables commonly used in doc/ and www/ tree.
.include "doc.common.mk"
+DOC_LOCAL_MK= ${DOC_PREFIX}/${LANGCODE}/share/mk/doc.local.mk
+
+.if exists(${DOC_LOCAL_MK})
+.include "${DOC_LOCAL_MK}"
+.endif
+
# Ownership information.
.include "doc.install.mk"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-doc/attachments/20040807/61483ce3/attachment.sig>
More information about the freebsd-doc
mailing list