Skip to content

Commit e7c423c

Browse files
committed
build: fixes for makfile to work with local autobuild of doc
I am autobuilding docs on every file change. This takes a while because I unconditionally deleted the entire html output directory. Now I use an environment var to control deletion of html. This allows incremental rebuilds with must faster cycle time when I break the docs. Because I no longer delete the output directory had to: change mkdir call so it does not error if directory exists delete robots.txt to mae sphinx not complain about the file in the html dir.
1 parent cf7e17d commit e7c423c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

website/www/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ help:
1313
# fix that in postprocess
1414
# also sed index.html to properly format meta og:... entries.
1515
html: doc_links ## make standalone HTML files
16-
rm -rf html
16+
if [ -z "${KEEP_HTML}" ]; then rm -rf html; fi
17+
rm -f html/robots.txt # otherwise sphinx errors
1718
mkdir -p $(TMP)/doctrees $(HTML)
1819
sphinx-build -n -W -b html -d $(TMP)/doctrees . $(HTML)
1920
# install searchtools.js into search page.
@@ -23,7 +24,7 @@ html: doc_links ## make standalone HTML files
2324
sed -i -e '/<meta/s/og\\:/og:/' \
2425
-e '/<meta/s/name="og:/property="og:/' html/index.html
2526
cp robots.txt html/robots.txt
26-
mkdir html/signatures && cp signatures/*.asc html/signatures
27+
mkdir -p html/signatures && cp signatures/*.asc html/signatures
2728
cp --no-clobber -r docs/html_extra/. html/docs/.
2829
cp htaccess html/.htaccess
2930
@echo; \

0 commit comments

Comments
 (0)