Signed-off-by: andy pugh <andy@bodgesoc.org>
docs: support top-level html file

When asciidoc builds .html files from .txt files, it needs to be told the
location of the .css and .js files that the .html files are going to
reference.

We used to do this in a way that worked fine for .html files in
subdirectories, but did not work for "top-level" .html files, ie files
living directly in docs/html, generated from .txt files living directly
in docs/src.

We never knew this because we dont generate any top-level .html files
using asciidoc.

There were two problems:

1. It would miss-compute the relative path for top-level html files, and
use "../" instead of nothing.

2. When given a stylesdir or scriptsdir attribute, asciidoc builds the
path as "$DIR/$FILE", which is usually sensible.  But asciidoc doesn't
check for an empty $DIR, and mistakenly uses "/$FILE" if given an empty
$DIR.

This commit fixes the path computation to work in all cases, and changes
the asciidoc arguments so stylesdir and scriptsdir are only supplied if
they're non-empty.

This makes (future) top-level .html files build correctly, and doesn't
break existing .html files that live in subdirs.

Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
Merge remote-tracking branch 'origin/2.6' into 2.7