• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /usr/bin/env python
2# -*- coding: utf-8 -*-
3# ===========================================================================
4#  Copyright (c) 2011-2012 Barend Gehrels, Amsterdam, the Netherlands.
5#  Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland.
6#
7# This file was modified by Oracle on 2020.
8# Modifications copyright (c) 2020, Oracle and/or its affiliates.
9# Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle
10#
11#  Use, modification and distribution is subject to the Boost Software License,
12#  Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
13#  http://www.boost.org/LICENSE_1_0.txt)9
14# ============================================================================
15
16import os, sys, shutil
17
18cmd = "doxygen_xml2qbk"
19cmd = cmd + " --xml xml/%s.xml"
20cmd = cmd + " --start_include boost/"
21cmd = cmd + " --output_style alt"
22cmd = cmd + " --alt_max_synopsis_length 59"
23cmd = cmd + " > generated/%s.qbk"
24
25def run_command(command):
26    if os.system(command) != 0:
27        raise Exception("Error running %s" % command)
28
29def remove_all_files(dir_relpath):
30    if os.path.exists(dir_relpath):
31        dir_abspath = os.path.join(os.getcwd(), dir_relpath)
32        print("Boost.Geometry is cleaning Doxygen files in %s" % dir_abspath)
33        shutil.rmtree(dir_abspath, ignore_errors=True)
34
35remove_all_files("xml/")
36
37run_command("doxygen Doxyfile")
38run_command(cmd % ("classboost_1_1geometry_1_1index_1_1rtree", "rtree"))
39run_command(cmd % ("group__rtree__functions", "rtree_functions"))
40
41run_command(cmd % ("structboost_1_1geometry_1_1index_1_1linear", "rtree_linear"))
42run_command(cmd % ("structboost_1_1geometry_1_1index_1_1quadratic", "rtree_quadratic"))
43run_command(cmd % ("structboost_1_1geometry_1_1index_1_1rstar", "rtree_rstar"))
44run_command(cmd % ("classboost_1_1geometry_1_1index_1_1dynamic__linear", "rtree_dynamic_linear"))
45run_command(cmd % ("classboost_1_1geometry_1_1index_1_1dynamic__quadratic", "rtree_dynamic_quadratic"))
46run_command(cmd % ("classboost_1_1geometry_1_1index_1_1dynamic__rstar", "rtree_dynamic_rstar"))
47
48run_command(cmd % ("structboost_1_1geometry_1_1index_1_1indexable", "indexable"))
49run_command(cmd % ("structboost_1_1geometry_1_1index_1_1equal__to", "equal_to"))
50
51run_command(cmd % ("group__predicates", "predicates"))
52#run_command(cmd % ("group__nearest__relations", "nearest_relations"))
53run_command(cmd % ("group__adaptors", "adaptors"))
54run_command(cmd % ("group__inserters", "inserters"))
55
56# Clean up generated intermediate files
57if "--release-build" in sys.argv:
58    remove_all_files("xml/")
59    remove_all_files("html_by_doxygen/")
60
61#run_command("b2")
62