From be48c668a6c24c5c3d7b8a749719b508e855ced3 Mon Sep 17 00:00:00 2001 From: Dan Klein Date: Mon, 10 Aug 2015 18:05:45 +0300 Subject: added control plane build method --- wscript | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'wscript') diff --git a/wscript b/wscript index b4fe280c..127ec2e1 100755 --- a/wscript +++ b/wscript @@ -10,6 +10,8 @@ VERSION='0.0.1' APPNAME='wafdocs' import os, re, shutil +import shlex +import subprocess top = '.' @@ -117,6 +119,19 @@ def do_visio(bld): for x in bld.path.ant_glob('visio\\*.vsd'): tg = bld(rule='${VIS} -i ${SRC} -o ${TGT} ', source=x, target=x.change_ext('.png')) +def build_cp_docs (trex_src_dir, dest_dir = "_build", builder = "html"): + build_doc_cmd = shlex.split("/usr/local/bin/sphinx-build -b {bld} {src} {dst}".format( + bld= builder, + src= ".", + dst= dest_dir) + ) + bld_path = os.path.abspath( os.path.join(trex_src_dir, 'automation', 'trex_control_plane', 'doc') ) + ret_val = subprocess.call(build_doc_cmd, cwd = bld_path) + if ret_val: + raise RuntimeError("Build operation of control plain docs failed with return value {ret}".format(ret= ret_val)) + return + + def build(bld): bld(rule=my_copy, target='symbols.lang') -- cgit