Skip to main content
summaryrefslogblamecommitdiffstats
blob: f21a10db3b4b4f871526d36b9d883af835f4f8ff (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                                                         
                                                                          


                                                                                      
                                                                                                       



                                                                                  
                                                                                              





                                                                                                                                                
                                                                                                        

                                                                                                                                                                                              
                                                                                                                        




                                                                                                                 
                                                

                                            
                                                                                                                         





















                                                                                                         
                                           






                                                                                                                       
<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright (c) 2012 Red Hat, Inc.
    All rights reserved. This program and the accompanying materials
    are made available under the terms of the Eclipse Public License v1.0
    which accompanies this distribution, and is available at
    http://www.eclipse.org/legal/epl-v10.html
   
    Contributors:
        Red Hat - initial API and implementation
 -->
<project name="org.eclipse.cdt.autotools.docs" default="all">
    <description>
            Generate Eclipse help content for the CDT autotools user guide
    </description>

	<property name="autotools.help.doc.url.base" value="http://wiki.eclipse.org"/>
	<property name="autotools.wiki.url.base" value="${autotools.help.doc.url.base}/CDT/Autotools"/>
	<property name="imageFolder" value="images"/>

	<path id="wikitext.tasks.classpath">
		<!-- Replace dir with the dir you have wikitext installed into.-->
		<fileset dir="/usr/share/eclipse/dropins/mylyn-docs-wikitext/eclipse/plugins">
			<include name="org.eclipse.mylyn.wikitext.*core*.jar" />
		</fileset>
	</path>
	<taskdef classpathref="wikitext.tasks.classpath" resource="org/eclipse/mylyn/internal/wikitext/mediawiki/core/tasks/tasks.properties" />
	<taskdef classpathref="wikitext.tasks.classpath" resource="org/eclipse/mylyn/wikitext/core/util/anttask/tasks.properties" />

	<target name="all" description="Generate Eclipse help content for the CDT Autotools user guide">
		<mediawiki-to-eclipse-help wikiBaseUrl="${autotools.help.doc.url.base}" title="Autotools Plug-in User Guide" formatoutput="true" dest="." templateExcludes="*eclipseproject*">

			<path name="CDT/Autotools/User_Guide" title="Autotools Plug-in User Guide" generateToc="false"/>
			<stylesheet url="book.css" />
			<pageAppendum>
= Updating This Document =
				
This document is maintained in a collaborative wiki.  If you wish to update or modify this document please visit 
http://wiki.eclipse.org/CDT/Autotools/User_Guide
            </pageAppendum>
		</mediawiki-to-eclipse-help>
		<replace file="CDT/Autotools/User_Guide/User-Guide.html" token="{{#eclipseproject:tools.cdt}}" value=""/>
	    <antcall target="test" />
	</target>

	<target name="test" description="verify that all of the HTML files are well-formed XML">
		<echo level="info">
Validating help content XML and HTML files: The Eclipse help system expects well-formed XML
			
If validation fails it is because either:
			
* the userguide source code is poorly formed, or
* the WikiText MediaWiki parser has a bug
			
Problems with userguide source are usually caused by improper use of HTML markup in the MediaWiki source,
or inadvertently starting a line with a space character (in MediaWiki this starts a preformatted block)
		</echo>

		<!-- 
		Don't bother with DTD validation: we only care if the files are well-formed.
		We therefore provide an empty DTD 
		-->
		<echo file="tmp/__empty.dtd" message="" />
		<xmlvalidate lenient="true">
			<fileset dir="CDT">
				<include name="**/*.html" />
			</fileset>
			<dtd publicid="-//W3C//DTD XHTML 1.0 Transitional//EN" location="${basedir}/tmp/__empty.dtd" />
		</xmlvalidate>
		<delete dir="tmp"/>
	</target>
</project>

Back to the top