Changeset 21c1a44 in rtems-docs
- Timestamp:
- 11/02/18 03:05:51 (5 years ago)
- Branches:
- 5, master
- Children:
- 8b67c91
- Parents:
- bb13624
- git-author:
- Chris Johns <chrisj@…> (11/02/18 03:05:51)
- git-committer:
- Chris Johns <chrisj@…> (11/03/18 05:36:32)
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
README.txt
rbb13624 r21c1a44 115 115 # pkg install npm 116 116 # npm install -g inliner 117 118 Plant UML: 119 120 Install NPM as shown in Single HTML then: 121 122 # npm install -g node-plantuml 123 124 Ditaa: 125 126 # pkg install ditaa 117 127 118 128 CentOS 6 and 7 … … 152 162 You may have to add that repository to your configuration. 153 163 154 155 164 # yum install npm 156 165 # npm install -g inliner 166 167 Plant UML: 168 169 Install NPM as shown in Single HTML then: 170 171 # npm install -g node-plantuml 157 172 158 173 Spell check: -
common/waf.py
rbb13624 r21c1a44 258 258 ctx.find_program("inliner", var = "BIN_INLINER", mandatory = False) 259 259 if not ctx.env.BIN_INLINER: 260 ctx.fatal("Node inliner is required install with 'npm install -g inliner' " +260 ctx.fatal("Node.js inliner is required install with 'npm install -g inliner' " + 261 261 "(https://github.com/remy/inliner)") 262 263 ctx.envBUILD_PLANTUML = 'no' 264 if ctx.options.plantuml: 265 check_plantuml = not ctx.env.BIN_PUML 266 if check_plantuml: 267 ctx.env.BUILD_PLANTUML = 'yes' 268 ctx.find_program("puml", var = "BIN_PUML", mandatory = False) 269 if not ctx.env.BIN_PUML: 270 ctx.fatal("Node.js puml is required install with 'npm install -g node-plantuml' " + 271 "(https://www.npmjs.com/package/node-plantuml)") 272 273 ctx.envBUILD_DITAA = 'no' 274 if ctx.options.ditaa: 275 # 276 # We use DITAA via PlantUML 277 # 278 if not ctx.env.BIN_PUML: 279 ctx.find_program("puml", var = "BIN_PUML", mandatory = False) 280 if not ctx.env.BIN_PUML: 281 ctx.fatal("DITAA uses PlantUML; " + 282 "Node.js puml is required install with 'npm install -g node-plantuml' " + 283 "(https://www.npmjs.com/package/node-plantuml)") 284 check_ditaa = not ctx.env.BIN_DITAA 285 if check_ditaa: 286 ctx.env.BUILD_DITAA = 'yes' 287 ctx.find_program("ditaa", var = "BIN_DITAA", mandatory = False) 288 if not ctx.env.BIN_DITAA: 289 ctx.fatal("DITAA not found, plase install") 262 290 263 291 def doc_pdf(ctx, source_dir, conf_dir, extra_source): … … 354 382 quiet = True) 355 383 384 def images_plantuml(ctx, source_dir, conf_dir, ext): 385 # 386 # Use a run command to handle stdout and stderr output from puml. 387 # 388 def run(task): 389 src = task.inputs[0].abspath() 390 tgt = task.outputs[0].abspath() 391 cmd = '%s generate %s -o %s' % (task.env.BIN_PUML[0], src, tgt) 392 so = open(tgt + '.out', 'w') 393 r = task.exec_command(cmd, stdout = so, stderr = so) 394 so.close() 395 return r 396 397 for src in ctx.path.ant_glob('**/*' + ext): 398 tgt = src.abspath()[: - len(ext)] + '.png' 399 ctx( 400 rule = run, 401 inliner = ctx.env.BIN_PUML, 402 source = src, 403 target = tgt, 404 install_path = None 405 ) 406 407 356 408 def cmd_build(ctx, extra_source = []): 357 409 conf_dir = ctx.path.get_src() … … 365 417 366 418 doc_html(ctx, source_dir, conf_dir, extra_source) 419 420 def cmd_build_images(ctx): 421 conf_dir = ctx.path.get_src() 422 source_dir = ctx.path.get_src() 423 if ctx.env.BUILD_PLANTUML == 'yes': 424 images_plantuml(ctx, source_dir, conf_dir, '.puml') 425 if ctx.env.BUILD_DITAA == 'yes': 426 images_plantuml(ctx, source_dir, conf_dir, '.ditaa') 367 427 368 428 def cmd_options(ctx): … … 383 443 default = False, 384 444 help = "Build Single HTML file, requires Node Inliner") 445 ctx.add_option('--plantuml', 446 action = 'store_true', 447 default = False, 448 help = "Build PlantUML images from source, need puml from npm") 449 ctx.add_option('--ditaa', 450 action = 'store_true', 451 default = False, 452 help = "Build DITAA images using PlantUML from source, need ditaa and puml") 385 453 386 454 def cmd_options_path(ctx): -
wscript
rbb13624 r21c1a44 54 54 55 55 def build(ctx): 56 # 57 # Generate any PlantUML images if enabled. 58 # 59 ctx.recurse('images') 60 ctx.add_group('images') 61 56 62 for b in building: 57 63 ctx.recurse(b)
Note: See TracChangeset
for help on using the changeset viewer.