forked from socialize/socialize-sdk-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsphinx_doc.xml
56 lines (43 loc) · 1.9 KB
/
sphinx_doc.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?xml version="1.0" encoding="UTF-8"?>
<project name="socialize-sdk" default="sphinx">
<target name="check-paths">
<property environment="env"/>
<echo>${env.PATH}</echo>
<condition property="sphinx.available">
<or>
<available file="sphinx-build" filepath="${env.PATH}"/>
</or>
</condition>
</target>
<!-- Python is required on target system for this to work!-->
<target name="sphinx" description="Uses sphinx to generate SDK documentation" if="sphinx.available" depends="check-paths">
<delete dir="build/docs/static"/>
<delete dir="build/docs/user_guide" verbose="true"/>
<mkdir dir="build/docs/user_guide"/>
<exec executable="sphinx-build" failonerror="true" dir="${basedir}">
<arg value="-a"/>
<arg value="-E"/>
<arg value="Documentation/sphinx/source"/>
<arg value="build/docs/user_guide"/>
</exec>
<!-- Manually rename folders and references with underscore -->
<replaceregexp flags="g" match="_static" replace="static">
<fileset dir="build/docs/user_guide" includes="**/*.html **/*.js **/*.css"/>
</replaceregexp>
<replaceregexp flags="g" match="_images" replace="images">
<fileset dir="build/docs/user_guide" includes="**/*.html **/*.js **/*.css"/>
</replaceregexp>
<replaceregexp flags="g" match="_sources" replace="sources">
<fileset dir="build/docs/user_guide" includes="**/*.html **/*.js **/*.css"/>
</replaceregexp>
<move file="build/docs/user_guide/_static" tofile="build/docs/user_guide/static" verbose="true"/>
<move file="build/docs/user_guide/_images" tofile="build/docs/user_guide/images" verbose="true"/>
<move file="build/docs/user_guide/_sources" tofile="build/docs/user_guide/sources" verbose="true"/>
<copy
file="Documentation/sphinx/source/_static/nature.css"
todir="build/docs/user_guide/static"
verbose="true"
failonerror="true"
overwrite="true"/>
</target>
</project>