Skip to content

Commit

Permalink
build: rename sphinx_build.py to sphinx.py
Browse files Browse the repository at this point in the history
Change-Id: Ieea421a7a9c0d8710aee8be6dabaf6e90f1720fc
  • Loading branch information
Pesa committed Mar 13, 2024
1 parent 0e7f734 commit 0d89d41
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
11 changes: 5 additions & 6 deletions .waf-tools/doxygen.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ def doxygen(bld):
bld(features="doxygen", doxyfile='Doxyfile', ...)
"""

from fnmatch import fnmatchcase
import os, os.path, re, stat
from waflib import Task, Utils, Node, Logs, Errors, Build
import os, os.path, re
from waflib import Task, Utils, Node
from waflib.TaskGen import feature

DOXY_STR = '"${DOXYGEN}" - '
Expand Down Expand Up @@ -204,8 +203,8 @@ def configure(conf):
conf.find_program('doxygen', var='DOXYGEN', mandatory=False)
conf.find_program('tar', var='TAR', mandatory=False)

# doxygen docs
# doxygen command
from waflib.Build import BuildContext
class doxy(BuildContext):
cmd = "doxygen"
fun = "doxygen"
cmd = 'doxygen'
fun = 'doxygen'
13 changes: 8 additions & 5 deletions .waf-tools/sphinx_build.py → .waf-tools/sphinx.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# inspired by code by Hans-Martin von Gaudecker, 2012

"""Support for Sphinx documentation"""

import os
from waflib import Node, Task, TaskGen, Utils

Expand Down Expand Up @@ -34,8 +36,8 @@ def sig_hook(self, node):
node.sig=Utils.h_file(node.abspath())


@TaskGen.feature("sphinx")
@TaskGen.before_method("process_source")
@TaskGen.feature('sphinx')
@TaskGen.before_method('process_source')
def apply_sphinx(self):
"""Set up the task generator with a Sphinx instance and create a task."""

Expand Down Expand Up @@ -80,11 +82,12 @@ def apply_sphinx(self):


def configure(conf):
"""Check if sphinx-build program is available."""
conf.find_program('sphinx-build', var='SPHINX_BUILD', mandatory=False)


# sphinx docs
# sphinx command
from waflib.Build import BuildContext
class sphinx(BuildContext):
cmd = "sphinx"
fun = "sphinx"
cmd = 'sphinx'
fun = 'sphinx'
4 changes: 2 additions & 2 deletions wscript
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def options(opt):
opt.load(['default-compiler-flags', 'pch',
'coverage', 'sanitizers', 'boost',
'dependency-checker', 'unix-socket', 'websocket',
'doxygen', 'sphinx_build'],
'doxygen', 'sphinx'],
tooldir=['.waf-tools'])

optgrp = opt.add_option_group('NFD Options')
Expand Down Expand Up @@ -85,7 +85,7 @@ def configure(conf):
conf.load(['compiler_cxx', 'gnu_dirs',
'default-compiler-flags', 'pch',
'boost', 'dependency-checker', 'websocket',
'doxygen', 'sphinx_build'])
'doxygen', 'sphinx'])

conf.env.WITH_TESTS = conf.options.with_tests
conf.env.WITH_OTHER_TESTS = conf.options.with_other_tests
Expand Down

0 comments on commit 0d89d41

Please sign in to comment.