diff --git a/Makefile.in b/Makefile.in index a2efb887d..10531bae6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -54,6 +54,9 @@ POD2TEXT = pod2text MKINSTALLDIRS = $(SHELL) $(srcdir)/src/mkinstalldirs PERL = @PERL@ +# Version (for docs/guide/conf.py) +PACKAGE_VERSION_NUMBER = @PACKAGE_VERSION_NUMBER@ + # Destination prefix for RPMs DESTDIR = diff --git a/docs/_static/css/vlt_sphinx.css b/docs/_static/css/vlt_sphinx.css new file mode 100644 index 000000000..ab5e13b76 --- /dev/null +++ b/docs/_static/css/vlt_sphinx.css @@ -0,0 +1,4 @@ +/*Verilator blue #008fd7; set in html*/ +.wy-side-nav-search > div.version { + color: #111; +} diff --git a/docs/guide/conf.py b/docs/guide/conf.py index 1a94aa6b1..465fd151d 100644 --- a/docs/guide/conf.py +++ b/docs/guide/conf.py @@ -20,14 +20,16 @@ import sphinx_rtd_theme def get_vlt_version(): - filename = "../../src/config_rev.h" + filename = "../../Makefile" with open(filename) as fh: for line in fh: - match = re.search(r'= "([a-z0-9.]+)', line) + match = re.search(r"PACKAGE_VERSION_NUMBER *= *([a-z0-9.]+)", line) if match: return match.group(1) return "unknown" +def setup(app): + app.add_css_file('css/vlt_sphinx.css') # ---------------------------------------------------------------------- # -- Project information @@ -63,7 +65,7 @@ extensions = [] # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = [ - '_build', 'Thumbs.db', '.DS_Store', 'internals.rst', 'xml.rst' + '_build', 'Thumbs.db', '.DS_Store', 'internals.rst', 'xml.rst', 'gen/ex_*' ] # Warn about refs