generate.py 748 B

1234567891011121314151617181920212223242526272829303132
  1. #!/usr/bin/python
  2. # Copyright David Abrahams 2004. Use, modification and distribution is
  3. # subject to the Boost Software License, Version 1.0. (See accompanying
  4. # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. #
  6. # Generate html, TeX, and PDF versions of all the source files
  7. #
  8. import os
  9. import sys
  10. from syscmd import syscmd
  11. from sources import sources
  12. if 0:
  13. for s in sources:
  14. syscmd('boosthtml %s' % s)
  15. else:
  16. extensions = ('html', 'pdf')
  17. if len(sys.argv) > 1:
  18. extensions = sys.argv[1:]
  19. all = [ '%s.%s' % (os.path.splitext(s)[0],ext)
  20. for ext in extensions
  21. for s in sources
  22. ]
  23. print 'make %s' % ' '.join(all)
  24. syscmd('make %s' % ' '.join(all))