Christopher Dunn | e0d7224 | 2007-06-14 17:58:59 +0000 | [diff] [blame] | 1 | Import( 'env' ) |
| 2 | import os.path |
| 3 | |
| 4 | if 'doxygen' in env['TOOLS']: |
| 5 | doc_topdir = env['ROOTBUILD_DIR'] |
| 6 | doxyfile = env.SubstInFile( '#doc/doxyfile', 'doxyfile.in', |
| 7 | SUBST_DICT = { |
| 8 | '%JSONCPP_VERSION%' : env['JSONCPP_VERSION'], |
| 9 | '%TOPDIR%' : env.Dir('#').abspath, |
| 10 | '%DOC_TOPDIR%' : str(doc_topdir) } ) |
| 11 | doc_cmd = env.Doxygen( doxyfile ) |
| 12 | alias_doc_cmd = env.Alias('doc', doc_cmd ) |
| 13 | env.AlwaysBuild(alias_doc_cmd) |
| 14 | |
| 15 | for dir in doc_cmd: |
| 16 | env.Alias('doc', env.Install( '#' + dir.path, '#README.txt' ) ) |
| 17 | filename = os.path.split(dir.path)[1] |
| 18 | targz_path = os.path.join( env['DIST_DIR'], '%s.tar.gz' % filename ) |
| 19 | zip_doc_cmd = env.TarGz( targz_path, [env.Dir(dir)], |
| 20 | TARGZ_BASEDIR = doc_topdir ) |
| 21 | env.Depends( zip_doc_cmd, alias_doc_cmd ) |
| 22 | env.Alias( 'doc-dist', zip_doc_cmd ) |
Christopher Dunn | de10f45 | 2007-06-14 22:03:11 +0000 | [diff] [blame^] | 23 | |
| 24 | # When doxyfile gets updated, I get errors on the first pass. |
| 25 | # I have to run scons twice. Something is wrong with the dependencies |
| 26 | # here, but I avoid it by running "scons doc/doxyfile" first. |