changeset 8280:f5007c91ba18

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.
author John Rouillard <rouilj@ieee.org>
date Wed, 15 Jan 2025 22:22:32 -0500
parents 80105cd30368
children 78b1e283afcd
files website/www/Makefile
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/website/www/Makefile	Mon Jan 13 12:48:31 2025 -0500
+++ b/website/www/Makefile	Wed Jan 15 22:22:32 2025 -0500
@@ -13,7 +13,8 @@
 # fix that in postprocess
 # also sed index.html to properly format meta og:... entries.
 html: doc_links  ## make standalone HTML files
-	rm -rf html
+	if [ -z "${KEEP_HTML}" ]; then rm -rf html; fi
+	rm -f html/robots.txt  # otherwise sphinx errors
 	mkdir -p $(TMP)/doctrees $(HTML)
 	sphinx-build -n -W -b html -d $(TMP)/doctrees . $(HTML)
         # install searchtools.js into search page.
@@ -23,7 +24,7 @@
 	sed -i -e '/<meta/s/og\\:/og:/' \
              -e '/<meta/s/name="og:/property="og:/' html/index.html
 	cp robots.txt html/robots.txt
-	mkdir html/signatures && cp signatures/*.asc html/signatures
+	mkdir -p html/signatures && cp signatures/*.asc html/signatures
 	cp --no-clobber -r docs/html_extra/. html/docs/.
 	cp htaccess html/.htaccess
 	@echo; \

Roundup Issue Tracker: http://roundup-tracker.org/