Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add "hackingdoc" as proper action and remove non-working --hackingdoc…
… option
- Loading branch information
Showing
1 changed file
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -343,9 +343,6 @@ def options(opt): | |
help='documentation root', dest='docdir') | ||
opt.add_option('--libdir', type='string', default='', | ||
help='object code libraries', dest='libdir') | ||
# Actions | ||
opt.add_option('--hackingdoc', action='store_true', default=False, | ||
help='generate HTML documentation from HACKING file', dest='hackingdoc') | ||
|
||
|
||
def build(bld): | ||
|
@@ -690,6 +687,17 @@ def apidoc(ctx): | |
os.chdir('..') | ||
|
||
|
||
def hackingdoc(ctx): | ||
"""generate HACKING documentation""" | ||
os.chdir('doc') | ||
Logs.pprint('CYAN', 'Generating HACKING documentation') | ||
cmd = _find_rst2html(ctx) | ||
ret = ctx.exec_command('%s -stg --stylesheet=geany.css %s %s' % (cmd, '../HACKING', 'hacking.html')) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
eht16
Author
Member
|
||
if ret != 0: | ||
raise WafError('Generating HACKING documentation failed') | ||
os.chdir('..') | ||
|
||
|
||
def _find_program(ctx, cmd, **kw): | ||
def noop(*args): | ||
pass | ||
|
Won't these
../HACKING
andgeany.css
paths cause problems without out-of-tree builds? I don't know if waf even supports that, but if so, I think this might break it. If it has a paths like$top_srcdir
and$srcdir
in Autotools, it could maybe use like: