aboutsummaryrefslogtreecommitdiff
path: root/lib/jsoncpp/doc/sconscript
diff options
context:
space:
mode:
authortheuni <theuni-nospam-@xbmc.org>2011-01-24 16:05:21 -0500
committertheuni <theuni-nospam-@xbmc.org>2011-01-24 16:05:21 -0500
commitc51b1189e3d5353e842991f5859ddcea0f73e426 (patch)
treeef2cb8a6184699aa614f3655dca4ce661cdc108e /lib/jsoncpp/doc/sconscript
parentbe61ebdc9e897fe40c6f371111724de79ddee8d5 (diff)
Merged cptspiff's code-reshuffle branch.
Squashed commit due to build breakage during code-reshuffle history. Conflicts: xbmc/Util.cpp xbmc/cdrip/CDDARipper.cpp xbmc/filesystem/Directory.cpp xbmc/filesystem/File.cpp
Diffstat (limited to 'lib/jsoncpp/doc/sconscript')
-rw-r--r--lib/jsoncpp/doc/sconscript61
1 files changed, 61 insertions, 0 deletions
diff --git a/lib/jsoncpp/doc/sconscript b/lib/jsoncpp/doc/sconscript
new file mode 100644
index 0000000000..7b78a21d80
--- /dev/null
+++ b/lib/jsoncpp/doc/sconscript
@@ -0,0 +1,61 @@
+Import( 'env' )
+import os.path
+
+if 'doxygen' in env['TOOLS']:
+ doc_topdir = str(env['ROOTBUILD_DIR'])
+ html_dir = 'jsoncpp-api-doc'
+
+ doxygen_inputs = env.Glob( includes = '*.dox', dir = '#doc' ) \
+ + env.Glob( includes = '*.h', dir = '#include/json/' ) \
+ + env.Glob( includes = ('*.dox','*.h','*.inl','*.cpp'),
+ dir = '#src/lib_json' )
+## for p in doxygen_inputs:
+## print p.abspath
+
+ top_dir = env.Dir('#').abspath
+ include_top_dir = env.Dir('#include').abspath
+ env['DOXYFILE_DICT'] = { 'PROJECT_NAME': 'JsonCpp',
+ 'PROJECT_NUMBER': env['JSONCPP_VERSION'],
+ 'STRIP_FROM_PATH': top_dir,
+ 'STRIP_FROM_INC_PATH': include_top_dir,
+ 'HTML_OUTPUT': html_dir,
+ 'HTML_HEADER': env.File('#doc/header.html').abspath,
+ 'HTML_FOOTER': env.File('#doc/footer.html').abspath,
+ 'INCLUDE_PATH': include_top_dir,
+ 'PREDEFINED': 'JSONCPP_DOC_EXCLUDE_IMPLEMENTATION JSON_VALUE_USE_INTERNAL_MAP'
+ }
+ env['DOXYFILE_FILE'] = 'doxyfile.in'
+ doxfile_nodes = env.Doxyfile( os.path.join( doc_topdir, 'doxyfile' ), doxygen_inputs )
+ html_doc_path = os.path.join( doc_topdir, html_dir )
+ doc_nodes = env.Doxygen( source = doxfile_nodes,
+ target = os.path.join( html_doc_path, 'index.html' ) )
+ alias_doc_cmd = env.Alias('doc', doc_nodes )
+ env.Alias('doc', env.Install( html_doc_path, '#README.txt' ) )
+ if 'TarGz' in env['BUILDERS']:
+ targz_path = os.path.join( env['DIST_DIR'], '%s.tar.gz' % html_dir )
+ zip_doc_cmd = env.TarGz( targz_path, [env.Dir(html_doc_path)],
+ TARGZ_BASEDIR = env['ROOTBUILD_DIR'] )
+ env.Depends( zip_doc_cmd, alias_doc_cmd )
+ env.Alias( 'doc-dist', zip_doc_cmd )
+##
+## doxyfile = env.SubstInFile( '#doc/doxyfile', 'doxyfile.in',
+## SUBST_DICT = {
+## '%JSONCPP_VERSION%' : env['JSONCPP_VERSION'],
+## '%TOPDIR%' : env.Dir('#').abspath,
+## '%DOC_TOPDIR%' : str(doc_topdir) } )
+## doc_cmd = env.Doxygen( doxyfile )
+## alias_doc_cmd = env.Alias('doc', doc_cmd )
+## env.AlwaysBuild(alias_doc_cmd)
+##
+## for dir in doc_cmd:
+## env.Alias('doc', env.Install( '#' + dir.path, '#README.txt' ) )
+## filename = os.path.split(dir.path)[1]
+## targz_path = os.path.join( env['DIST_DIR'], '%s.tar.gz' % filename )
+## zip_doc_cmd = env.TarGz( targz_path, [env.Dir(dir)],
+## TARGZ_BASEDIR = doc_topdir )
+## env.Depends( zip_doc_cmd, alias_doc_cmd )
+## env.Alias( 'doc-dist', zip_doc_cmd )
+##
+## # When doxyfile gets updated, I get errors on the first pass.
+## # I have to run scons twice. Something is wrong with the dependencies
+## # here, but I avoid it by running "scons doc/doxyfile" first.