|
From: <ai...@us...> - 2013-10-01 21:20:57
|
Revision: 12567
http://sourceforge.net/p/plplot/code/12567
Author: airwin
Date: 2013-10-01 21:20:49 +0000 (Tue, 01 Oct 2013)
Log Message:
-----------
Set appropriate environment variables (found with a google search) so
that the onsgmls validation tool works fine even if the XML source for
DocBook contains any of the many UTF-8 characters that are allowed for
XML but not for SGML.
Modified Paths:
--------------
trunk/cmake/modules/docbook.cmake
trunk/doc/docbook/src/CMakeLists.txt
Modified: trunk/cmake/modules/docbook.cmake
===================================================================
--- trunk/cmake/modules/docbook.cmake 2013-10-01 18:13:58 UTC (rev 12566)
+++ trunk/cmake/modules/docbook.cmake 2013-10-01 21:20:49 UTC (rev 12567)
@@ -54,12 +54,17 @@
set(DOCBOOK_DTD_SYSID "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd")
find_program(ONSGMLS onsgmls)
+find_program(ENV_FOR_ONSGMLS env)
-if(ONSGMLS )
- message(STATUS "validate target will be available to check for syntax issues in the PLplot DocBook documentation using ${ONSGMLS}.")
-else(ONSGMLS )
- message(STATUS "WARNING: validate target will not be available to check for syntax issues in the PLplot DocBook documentation because onsgmls was not found.")
-endif(ONSGMLS )
+if(ONSGMLS AND ENV_FOR_ONSGMLS)
+ message(STATUS "validate target will be available to check for syntax issues in the PLplot DocBook documentation using ${ENV_FOR_ONSGMLS} SP_CHARSET_FIXED=yes SP_ENCODING=xml ${ONSGMLS}.")
+ # Note, these environment variables have to be set to use onsgml with
+ # UTF-8 documents, see https://bugzilla.redhat.com/show_bug.cgi?id=66179
+ set(ONSGMLS ${ENV_FOR_ONSGMLS} SP_CHARSET_FIXED=yes SP_ENCODING=xml ${ONSGMLS})
+else(ONSGMLS AND ENV_FOR_ONSGMLS)
+ message(STATUS "WARNING: validate target will not be available to check for syntax issues in the PLplot DocBook documentation because onsgmls (or env) was not found.")
+ set(ONSGMLS NOTFOUND)
+endif(ONSGMLS AND ENV_FOR_ONSGMLS)
# This option is used for the BUILD_DOC case below and elsewhere and also
# for the PREBUILT_DOC case elsewhere (when stylesheet.css is configured).
Modified: trunk/doc/docbook/src/CMakeLists.txt
===================================================================
--- trunk/doc/docbook/src/CMakeLists.txt 2013-10-01 18:13:58 UTC (rev 12566)
+++ trunk/doc/docbook/src/CMakeLists.txt 2013-10-01 21:20:49 UTC (rev 12567)
@@ -105,6 +105,7 @@
# Custom target for validating xml file
add_custom_target(validate
COMMAND ${ONSGMLS} ${XML_DECL} ${CMAKE_CURRENT_BINARY_DIR}/${PLPLOTDOC}-html.xml > ${VALIDATE_OUTPUT}
+ VERBATIM
)
add_dependencies(validate copy_prebuiltdoc)
endif(ONSGMLS)
@@ -179,6 +180,7 @@
add_custom_target(validate
COMMAND ${ONSGMLS} ${XML_DECL} ${CMAKE_CURRENT_BINARY_DIR}/${PLPLOTDOC}-html.xml > ${VALIDATE_OUTPUT}
+ VERBATIM
)
add_dependencies(validate
docbook_plplot-symbols_txt
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|