~ubuntu-branches/debian/sid/boost1.49/sid

« back to all changes in this revision

Viewing changes to libs/mpl/doc/src/build.py

  • Committer: Package Import Robot
  • Author(s): Steve M. Robbins
  • Date: 2012-02-26 00:31:44 UTC
  • Revision ID: package-import@ubuntu.com-20120226003144-eaytp12cbf6ubpms
Tags: upstream-1.49.0
ImportĀ upstreamĀ versionĀ 1.49.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
    )