|
From: <ai...@us...> - 2014-02-24 23:26:58
|
Revision: 13022
http://sourceforge.net/p/plplot/code/13022
Author: airwin
Date: 2014-02-24 23:26:54 +0000 (Mon, 24 Feb 2014)
Log Message:
-----------
More simplification of the Octave build.
Remove the generation (done by api2text.pl) of Octave text
documentation files in bindings/plplot_octave_txt since those
documentation files are no longer used to build the Octave binding.
Instead, the on-line help for the Octave (and Python) bindings is now
produced by swig using bindings/swig-support/swig_documentation.i.
That file is generated using api2swigdoc.pl which was derived from the
(now removed) api2text.pl script.
These changes were tested on Linux using the method specified in
README.Release_Manager_Cookbook to create and test the release tarball.
That tarball creation includes generating all PLplot documentation
and sticking it in the created tarball.
Modified Paths:
--------------
trunk/CMakeLists.txt
trunk/bindings/octave/CMakeLists.txt
trunk/bindings/swig-support/CMakeLists.txt
trunk/doc/docbook/README.developers
trunk/scripts/parity_bit_check.exclude
Removed Paths:
-------------
trunk/doc/docbook/bin/api2text.pl
Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt 2014-02-24 21:21:59 UTC (rev 13021)
+++ trunk/CMakeLists.txt 2014-02-24 23:26:54 UTC (rev 13022)
@@ -206,10 +206,6 @@
# List of targets that must be (pre-)built.
set(DIST_TARGETS)
- if(ENABLE_octave)
- list(APPEND DIST_TARGETS make_documentation)
- endif(ENABLE_octave)
-
if(BUILD_PRINT)
list(APPEND DIST_TARGETS print)
endif(BUILD_PRINT)
@@ -239,11 +235,6 @@
add_custom_target(
prebuild_dist
COMMAND ${CMAKE_COMMAND} -E remove_directory
- ${CMAKE_SOURCE_DIR}/bindings/octave/plplot_octave_txt
- COMMAND ${CMAKE_COMMAND} -E copy_directory
- ${CMAKE_BINARY_DIR}/bindings/octave/plplot_octave_txt
- ${CMAKE_SOURCE_DIR}/bindings/octave/plplot_octave_txt
- COMMAND ${CMAKE_COMMAND} -E remove_directory
${CMAKE_SOURCE_DIR}/doc/doxygen
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_BINARY_DIR}/doc/doxygen
Modified: trunk/bindings/octave/CMakeLists.txt
===================================================================
--- trunk/bindings/octave/CMakeLists.txt 2014-02-24 21:21:59 UTC (rev 13021)
+++ trunk/bindings/octave/CMakeLists.txt 2014-02-24 23:26:54 UTC (rev 13022)
@@ -38,71 +38,6 @@
install(FILES ${doc} DESTINATION ${DOC_DIR} RENAME ${doc}.octave)
endforeach(doc ${docfiles})
- # This is a representative generated (or prebuilt) octave documentation file.
- # There are more than a hundred of these *.txt files. If the (unlikely)
- # event that the plinit command is no longer part of the PLplot API, this
- # representative file would have to be changed.
- set(rep_doc plinit.txt)
-
- if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/plplot_octave_txt/${rep_doc})
- # Octave documentation has been prebuilt in the (tarball) source tree.
- # Copy it to the build tree if that tree is different from source tree.
- if(NOT CMAKE_BINARY_DIR STREQUAL "${CMAKE_SOURCE_DIR}")
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave_txt/${rep_doc}
- COMMAND ${CMAKE_COMMAND} -E copy_directory
- ${CMAKE_SOURCE_DIR}/bindings/octave/plplot_octave_txt
- ${CMAKE_BINARY_DIR}/bindings/octave/plplot_octave_txt
- )
- endif(NOT CMAKE_BINARY_DIR STREQUAL "${CMAKE_SOURCE_DIR}")
- set(make_documentation_DEPENDS
- ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave_txt/${rep_doc}
- )
- else(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/plplot_octave_txt/${rep_doc})
- # Generate full on-line help for plplot_octave
- file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave_txt)
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave_txt/plplot.doc
- COMMAND ${CMAKE_COMMAND} -E copy
- ${CMAKE_CURRENT_SOURCE_DIR}/etc/plplot.doc
- ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave_txt/plplot.doc
- DEPENDS
- ${CMAKE_CURRENT_SOURCE_DIR}/etc/plplot.doc
- )
- if(PERL_XML_DOM AND PERL_XML_PARSER)
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave_txt/${rep_doc}
- COMMAND ${PERL_EXECUTABLE}
- ${CMAKE_SOURCE_DIR}/doc/docbook/bin/api2text.pl
- ${CMAKE_SOURCE_DIR}/doc/docbook/src/plplotdoc.xml.in
- ${CMAKE_SOURCE_DIR}/doc/docbook/src/api.xml
- DEPENDS
- ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave_txt/plplot.doc
- ${CMAKE_SOURCE_DIR}/doc/docbook/bin/api2text.pl
- ${CMAKE_SOURCE_DIR}/doc/docbook/src/plplotdoc.xml.in
- ${CMAKE_SOURCE_DIR}/doc/docbook/src/api.xml
- WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave_txt
- )
-
- set(make_documentation_DEPENDS
- ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave_txt/${rep_doc}
- )
- else(PERL_XML_DOM AND PERL_XML_PARSER)
- message(STATUS
- "WARNING: Perl modules XML::Parser and/or XML::DOM not available\n"
- " so cannot generate full online help for plplot_octave"
- )
- set(make_documentation_DEPENDS
- ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave_txt/plplot.doc
- )
- endif(PERL_XML_DOM AND PERL_XML_PARSER)
- endif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/plplot_octave_txt/${rep_doc})
-
- add_custom_target(
- make_documentation ALL
- DEPENDS ${make_documentation_DEPENDS}
- )
-
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/octave_version.pl.in
${CMAKE_CURRENT_BINARY_DIR}/octave_version.pl
Modified: trunk/bindings/swig-support/CMakeLists.txt
===================================================================
--- trunk/bindings/swig-support/CMakeLists.txt 2014-02-24 21:21:59 UTC (rev 13021)
+++ trunk/bindings/swig-support/CMakeLists.txt 2014-02-24 23:26:54 UTC (rev 13022)
@@ -39,9 +39,6 @@
add_dependencies(check_all check_swig_documentation)
- set(make_documentation_DEPENDS
- ${CMAKE_CURRENT_BINARY_DIR}/plplot_octave_txt/${rep_doc}
- )
else(PERL_XML_DOM AND PERL_XML_PARSER)
message(STATUS
"WARNING: Perl modules XML::Parser and/or XML::DOM not available\n"
Modified: trunk/doc/docbook/README.developers
===================================================================
--- trunk/doc/docbook/README.developers 2014-02-24 21:21:59 UTC (rev 13021)
+++ trunk/doc/docbook/README.developers 2014-02-24 23:26:54 UTC (rev 13022)
@@ -58,6 +58,14 @@
library's API) to obtain the information used to generate the man
pages.
+(Aside. The bin subdirectory also contained at one time api2text.pl which
+was used by the non-swig version of the Octave bindings to generate
+text documentation for the octave PLplot commands. That script has
+now been removed and replaced by the closely related
+api2swigdoc.pl which generates bindings/swig-support/swig_documentation.i
+API documentation in a form which can be used by swig (for both
+the Python and Octave bindings).
+
2. info pages.
Our info pages are generated by a combination of
Deleted: trunk/doc/docbook/bin/api2text.pl
===================================================================
--- trunk/doc/docbook/bin/api2text.pl 2014-02-24 21:21:59 UTC (rev 13021)
+++ trunk/doc/docbook/bin/api2text.pl 2014-02-24 23:26:54 UTC (rev 13022)
@@ -1,204 +0,0 @@
-#!/usr/bin/perl
-# File: api2man.pl
-# Description: Convert the PLplot API chapter (file api.xml of the DocBook
-# manual) into a series of man pages.
-# Author: Rafael Laboissière <ra...@de...>
-#
-# Copyright (C) 2000, 2003 Rafael Laboissiere
-#
-# This script relies on the present structure of the API chapter (file
-# ../src/api.xml), where each API function is documented in its own
-# section. Here is the typical structure of a section:
-#
-# <sect1 id="NAME">
-# <title><function>NAME</function>: DESCRIPTION</title>
-#
-# <para>
-# <funcsynopsis>
-# <funcprototype>
-# <funcdef>
-# <function>NAME</function>
-# </funcdef>
-# <paramdef><parameter>ARG1</parameter></paramdef>
-# <paramdef><parameter>ARG2</parameter></paramdef>
-# ...
-# </funcprototype>
-# </funcsynopsis>
-# </para>
-#
-# <para>
-# DESCRIPTION
-# </para>
-#
-# <variablelist>
-# <varlistentry>
-# <term>
-# <parameter>ARG1</parameter>
-# TYPE
-# </term>
-# <listitem>
-# <para>
-# ARG1 DESCRIPTION
-# </para>
-# </listitem>
-# </varlistentry>
-# ...
-# </variablelist>
-#
-# </sect1>
-
-# Call this script by ginving the master file (typically
-# plplotdoc.xml) as the first argument, the API chapter file
-# (typically api.xml) as second argument, and the man volume
-# (typicvally 3plplot) as third.
-
-use XML::Parser;
-use XML::DOM;
-use Text::Wrap;
-$Text::Wrap::columns = 75;
-use Text::Tabs;
-$tabstop = 4;
-
-$api = "";
-open (MASTER, "< $ARGV[0]");
-while (<MASTER>) {
- if (/^(<!DOCTYPE.*)\[/) {
- $api .= "$1 [\n";
- }
- elsif (/^<\?xml/) {
- $api .= '<?xml version="1.0" standalone="yes"?>
-';
- }
- elsif (/^<!ENTITY pl/) {
- $api .= $_;
- }
-}
-$api .= "<!ENTITY amp '#38;#38;'>
-<!ENTITY deg ' degrees'>
-<!ENTITY gt '>'>
-<!ENTITY leq '&#60;='>
-<!ENTITY lt '&#60;'>
-<!ENTITY ndash '--'>
-]>\n";
-close MASTER;
-
-open (API, "< $ARGV[1]");
-$/ = undef;
-$api .= <API>;
-close API;
-
-sub process_node {
- my $ret = "";
- my $t = shift;
- my $c = $t->getChildNodes;
- my $m = $c->getLength;
- for (my $j = 0; $j < $m; $j++) {
- my $e = $c->item($j);
- my $nt = $e->getNodeType;
- if ($nt == TEXT_NODE) {
- my $a = $e->getData;
- $a =~ s/^\s+/ /;
- $a =~ s/^\s+$//;
- $a =~ s/\n\s+/ /g;
- $ret .= $a;
- }
- elsif ($nt == ELEMENT_NODE) {
- my $tag = $e->getTagName;
- if ($tag eq "parameter") {
- $ret .= "\n" . process_node ($e);
- }
- elsif ($tag eq "function") {
- $ret .= process_node ($e);
- }
- elsif ($tag eq "link") {
- $ret .= process_node ($e) ;
- }
- elsif ($tag eq "funcprototype") {
- $startproto = 1;
- my $p = process_node ($e);
- $p =~ s/ +$//;
- $ret .= $p . ")";
- }
- elsif ($tag eq "paramdef") {
- my $p = process_node ($e);
- $p =~ s/ +$//;
- $ret .= ($startproto ? "(" : ", ") . $p;
- $startproto = 0;
- }
- elsif ($tag eq "term") {
- $ret .= "\n" . process_node ($e) . ":";
- }
- elsif ($tag eq "listitem") {
- $ret .= "\t" . process_node ($e) . "\n";
- }
- elsif ($tag eq "xref") {
- $ret .= "the PLplot documentation";
- }
- elsif ($tag eq "varlistentry") {
- $ret .= "\n" . process_node ($e);
- }
- else {
- $ret .= process_node ($e);
- }
- }
- else {
- $ret .= process_node ($e);
- }
- }
- $ret =~ s/^\s+//;
- return $ret;
-}
-
-$p = new XML::DOM::Parser;
-$sects = $p->parse ($api)->getElementsByTagName ("sect1");
-my $ns = $sects->getLength;
-$titles = "";
-
-for ($i = 0; $i < $ns; $i++) {
- $fun = $sects->item ($i);
- $name = $fun->getAttribute ("id");
- $c = $fun->getChildNodes;
- $nc = $c->getLength;
- $desc = "";
- $varlist = "";
- $got_synopsis = 0;
- for ($j = 0; $j < $nc; $j++) {
- $part = $c->item($j);
- if ($part->getNodeType == ELEMENT_NODE) {
- $contents = process_node ($part);
- $node = $part->getTagName;
- if ($node eq "title") {
- $title = $contents;
- }
- elsif ($node eq "para") {
- if ($got_synopsis) {
- $desc = $contents;
- }
- else {
- $synopsis = $contents;
- $got_synopsis = 1;
- }
- }
- elsif ($node eq "variablelist") {
- $varlist = $contents;
- }
- }
- }
- $indent = ' ';
- $desc = wrap ($indent, $indent, split(/\n\s*\n/, $desc));
- $varlist = join ("\n", map {
- s/\t/ /g;
- /(^\s+)/;
- $_ = wrap ($indent . $1,
- $indent . $1 . $indent, $_);
- s/\t/ /g;
- $_;
- } split ("\n", $varlist));
- open (MAN, "> $name.txt");
- print MAN "\n$title\n";
- print MAN "\nDESCRIPTION:\n\n$desc\n";
- print MAN "\nSYNOPSIS:\n\n$synopsis\n";
- print MAN "\nARGUMENTS:\n\n$varlist\n"
- if not $varlist eq "";
- close MAN;
-}
Modified: trunk/scripts/parity_bit_check.exclude
===================================================================
--- trunk/scripts/parity_bit_check.exclude 2014-02-24 21:21:59 UTC (rev 13021)
+++ trunk/scripts/parity_bit_check.exclude 2014-02-24 23:26:54 UTC (rev 13022)
@@ -26,7 +26,6 @@
qsastime.xml
README.deltaT.dat
api2man.pl.in
-api2text.pl
docbook/AUTHORS
__pl_pltext.m
plplot_auxiliary.adb
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|