|
From: <ai...@us...> - 2008-10-25 01:17:04
|
Revision: 8962
http://plplot.svn.sourceforge.net/plplot/?rev=8962&view=rev
Author: airwin
Date: 2008-10-25 01:16:59 +0000 (Sat, 25 Oct 2008)
Log Message:
-----------
Build our (historical) release announcements using rules configured by our
CMake-based build system rather than the Makefile approach that was used
before. This DocBook-based method of generating our release announcements
is worth reviving. This is the first step in that revival which is to make
it easy to do the build of the historical release announcements using our
CMake-based build system.
Modified Paths:
--------------
trunk/www/CMakeLists.txt
trunk/www/announce/README
Added Paths:
-----------
trunk/www/announce/CMakeLists.txt
Modified: trunk/www/CMakeLists.txt
===================================================================
--- trunk/www/CMakeLists.txt 2008-10-25 01:11:52 UTC (rev 8961)
+++ trunk/www/CMakeLists.txt 2008-10-25 01:16:59 UTC (rev 8962)
@@ -19,8 +19,25 @@
# along with PLplot; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+# Configure documentation file sizes.
configure_file(
-${CMAKE_CURRENT_SOURCE_DIR}/documentation.php.in
-${CMAKE_CURRENT_BINARY_DIR}/documentation.php @ONLY
-)
+ ${CMAKE_CURRENT_SOURCE_DIR}/documentation.php.in
+ ${CMAKE_CURRENT_BINARY_DIR}/documentation.php @ONLY
+ )
+
+# Configure style files
add_subdirectory(css)
+
+# Set up Makefile rules to generate announcements and validate their DocBook-XML source.
+add_subdirectory(announce)
+
+set(PHP_FILES
+ ${CMAKE_CURRENT_SOURCE_DIR}/corefunctions.php
+ ${CMAKE_CURRENT_SOURCE_DIR}/credits.php
+ ${CMAKE_CURRENT_SOURCE_DIR}/development.php
+ ${CMAKE_CURRENT_SOURCE_DIR}/download.php
+ ${CMAKE_CURRENT_SOURCE_DIR}/examples.php
+ ${CMAKE_CURRENT_SOURCE_DIR}/index.php
+ ${CMAKE_CURRENT_SOURCE_DIR}/template.php
+ ${CMAKE_CURRENT_BINARY_DIR}/documentation.php
+ )
Added: trunk/www/announce/CMakeLists.txt
===================================================================
--- trunk/www/announce/CMakeLists.txt (rev 0)
+++ trunk/www/announce/CMakeLists.txt 2008-10-25 01:16:59 UTC (rev 8962)
@@ -0,0 +1,81 @@
+# www/announce/CMakeLists.txt for PLplot
+###
+### Process this file with cmake to produce Makefile
+###
+# Copyright (C) 2008 Alan W. Irwin
+#
+# This file is part of PLplot.
+#
+# PLplot is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library General Public License as published
+# by the Free Software Foundation; version 2 of the License.
+#
+# PLplot is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU Library General Public License
+# along with PLplot; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# Create rules to generate announcments that are in DocBook-XML form.
+
+set(URL http://plplot.sf.net)
+set(XML_DCL /usr/share/sgml/declaration/xml.dcl)
+set(PWD "${CMAKE_BINARY_DIR}/www")
+
+
+set(generated_RELEASE_LIST
+ 5.3.0
+ 5.3.1
+ )
+
+set(generated_announcements_target_LIST)
+set(validation_target_LIST)
+foreach(generated_RELEASE ${generated_RELEASE_LIST})
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/announce-plplot-${generated_RELEASE}.html
+ COMMAND xmlto -m ${CMAKE_CURRENT_SOURCE_DIR}/html.xsl xhtml-nochunks ${CMAKE_CURRENT_SOURCE_DIR}/announce-plplot-${generated_RELEASE}.xml
+ DEPENDS
+ ${CMAKE_CURRENT_SOURCE_DIR}/html.xsl
+ ${CMAKE_CURRENT_SOURCE_DIR}/announce-plplot-${generated_RELEASE}.xml
+ )
+
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/announce-plplot-${generated_RELEASE}.xhtml
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_BINARY_DIR}/announce-plplot-${generated_RELEASE}.html ${CMAKE_CURRENT_BINARY_DIR}/announce-plplot-${generated_RELEASE}.xhtml
+ DEPENDS
+ ${CMAKE_CURRENT_BINARY_DIR}/announce-plplot-${generated_RELEASE}.html
+ )
+
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/announce-plplot-${generated_RELEASE}.txt
+ COMMAND lynx -force_html -dump -width=80 ${CMAKE_CURRENT_BINARY_DIR}/announce-plplot-${generated_RELEASE}.xhtml | sed \"s,file://localhost${PWD},${URL},\" > ${CMAKE_CURRENT_BINARY_DIR}/announce-plplot-${generated_RELEASE}.txt
+ DEPENDS
+ ${CMAKE_CURRENT_BINARY_DIR}/announce-plplot-${generated_RELEASE}.xhtml
+ )
+ list(
+ APPEND generated_announcements_target_LIST
+ ${CMAKE_CURRENT_BINARY_DIR}/announce-plplot-${generated_RELEASE}.txt
+ )
+
+ add_custom_target(
+ validate_announcement-${generated_RELEASE}
+ COMMAND onsgmls ${XML_DCL} ${CMAKE_CURRENT_SOURCE_DIR}/announce-plplot-${generated_RELEASE}.xml > /dev/null
+ )
+ list(
+ APPEND
+ validation_target_LIST
+ validate_announcement-${generated_RELEASE}
+ )
+
+endforeach(generated_RELEASE ${generated_RELEASE_LIST})
+
+add_custom_target(
+ generate_announcements
+ DEPENDS ${generated_announcements_target_LIST}
+ )
+
+add_custom_target(validate_announcements)
+add_dependencies(validate_announcements ${validation_target_LIST})
Property changes on: trunk/www/announce/CMakeLists.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: trunk/www/announce/README
===================================================================
--- trunk/www/announce/README 2008-10-25 01:11:52 UTC (rev 8961)
+++ trunk/www/announce/README 2008-10-25 01:16:59 UTC (rev 8962)
@@ -5,28 +5,48 @@
PLplot release announcements starting at version > 5.2.1. It contains also
the stylesheets and the Makefile for building the output files.
-XHTML, PDF, and text versions can be obtained from a XML source. The
-Makefile has generic (pattern) rules to build the output formats. For
-instance, if one has a source file called announce.xml, then the following
-command:
+XHTML, PDF, and text versions can be obtained from XML source. The
+CMake-based build system provides MakeFile rules to build the *.xhtml and
+*.txt forms of our release announcements from the *.xml files which are the
+DocBook-XML source. The generated Makefile rules were developed on Debian
+and have not been tested for portability although they should work on other
+Linux distros if you have the right packages installed.
- make SOURCES=announce
+The programs and respective (Debian) packages needed are:
-will build the files announce.xhtml, announce.pdf, and announce.txt.
-Notice that the value of the SOURCES variable is the name of the input file
-with the extension ".xml" stripped off. This also works:
+ xmlto xmlto
+ lynx lynx-cur
+ onsgmls opensp
- make announce.txt
+ -- Rafael Laboissiere <rla...@us...>, Fri Oct 24 10:05:00 CEST 2003
-There are also "clean" and "validate" make targets. The "validate" target
-runs an XML validation program.
+The idea of generating our release announcements from DocBook was abandoned
+after 5.3.1 when Rafael stepped down as release manager, but I feel it is
+worthwhile to reinstate this good idea again. Therefore, I have
+reimplemented all validation and build rules using our CMake-based build
+system rather than the old special Makefile that Rafael used.
-The Makefile uses specific constructs of GNU make and is unlikely to be
-widely portable. The programs and respective (Debian) packages needed are:
+The current list of announcement versions is 5.3.0 and 5.3.1. To add
+another one (say for 5.9.1),
- xmlto xmlto_0.0.14
- links elinks_0.4.2
- onsgmls opensp_1.5release
+* cd to www/announce, and add 5.9.1 to the list of versions in
+CMakeLists.txt.
- -- Rafael Laboissiere <rla...@us...>, Fri Oct 24 10:05:00 CEST 2003
+* copy the last announcement to the current one:
+cp announce-plplot-5.3.1.xml announce-plplot-5.9.1.xml
+* edit that current version appropriately:
+
+* validate all source files (including the present one):
+make validate_announcements
+
+* and generate all announcements (including the present one):
+make generate_announcements
+
+Once satisfied with the current announcement, add the current announcement
+source (in this case announce-plplot-5.9.1.xml) to our svn repository.
+
+Actually installing the complete list of static and generated announcements
+on our website is handled by www/CMakeLists.txt.
+
+-- Alan W. Irwin 2008-10-24
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|