make_qbk.py 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. # Use, modification and distribution is subject to the Boost Software License,
  8. # Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  9. # http://www.boost.org/LICENSE_1_0.txt)9
  10. # ============================================================================
  11. import os, sys, shutil
  12. cmd = "doxygen_xml2qbk"
  13. cmd = cmd + " --xml xml/%s.xml"
  14. cmd = cmd + " --start_include boost/"
  15. cmd = cmd + " --output_style alt"
  16. cmd = cmd + " > generated/%s.qbk"
  17. def run_command(command):
  18. if os.system(command) != 0:
  19. raise Exception("Error running %s" % command)
  20. def remove_all_files(dir_relpath):
  21. if os.path.exists(dir_relpath):
  22. dir_abspath = os.path.join(os.getcwd(), dir_relpath)
  23. print("Boost.Geometry is cleaning Doxygen files in %s" % dir_abspath)
  24. shutil.rmtree(dir_abspath, ignore_errors=True)
  25. remove_all_files("xml/")
  26. run_command("doxygen Doxyfile")
  27. run_command(cmd % ("classboost_1_1geometry_1_1index_1_1rtree", "rtree"))
  28. run_command(cmd % ("group__rtree__functions", "rtree_functions"))
  29. run_command(cmd % ("structboost_1_1geometry_1_1index_1_1linear", "rtree_linear"))
  30. run_command(cmd % ("structboost_1_1geometry_1_1index_1_1quadratic", "rtree_quadratic"))
  31. run_command(cmd % ("structboost_1_1geometry_1_1index_1_1rstar", "rtree_rstar"))
  32. run_command(cmd % ("classboost_1_1geometry_1_1index_1_1dynamic__linear", "rtree_dynamic_linear"))
  33. run_command(cmd % ("classboost_1_1geometry_1_1index_1_1dynamic__quadratic", "rtree_dynamic_quadratic"))
  34. run_command(cmd % ("classboost_1_1geometry_1_1index_1_1dynamic__rstar", "rtree_dynamic_rstar"))
  35. run_command(cmd % ("structboost_1_1geometry_1_1index_1_1indexable", "indexable"))
  36. run_command(cmd % ("structboost_1_1geometry_1_1index_1_1equal__to", "equal_to"))
  37. run_command(cmd % ("group__predicates", "predicates"))
  38. #run_command(cmd % ("group__nearest__relations", "nearest_relations"))
  39. run_command(cmd % ("group__adaptors", "adaptors"))
  40. run_command(cmd % ("group__inserters", "inserters"))
  41. # Clean up generated intermediate files
  42. if "--release-build" in sys.argv:
  43. remove_all_files("xml/")
  44. remove_all_files("html_by_doxygen/")
  45. #run_command("b2")