]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/mpl/doc/src/build.py
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / mpl / doc / src / build.py
1 # Copyright (c) Aleksey Gurtovoy 2008-2009
2 #
3 # Distributed under the Boost Software License, Version 1.0.
4 # (See accompanying file LICENSE_1_0.txt or copy at
5 # http://www.boost.org/LICENSE_1_0.txt)
6
7 import shutil
8 import os
9
10
11 def build( src_dir, build_dir ):
12
13 src = os.path.join( build_dir, 'refmanual.gen' )
14
15 def cleanup():
16 if os.path.exists( src ):
17 os.unlink( src )
18
19 if os.path.exists( build_dir ):
20 shutil.rmtree( build_dir )
21
22 def generate_html():
23 os.mkdir( build_dir )
24 os.chdir( build_dir )
25 os.system( 'python %s %s' % ( os.path.join( src_dir, 'refmanual.py' ), build_dir ) )
26 os.system( 'rst2htmlrefdoc.py --traceback -g -d -t --no-frames --dont-copy-stylesheet --stylesheet-path=style.css %s refmanual.html' % src )
27
28 cleanup()
29 generate_html()
30
31
32 build(
33 os.path.join( os.getcwd(), 'refmanual' )
34 , os.path.join( os.getcwd(), '_build' )
35 )