From 4572549f1d6955cea0aaf000ea10975a4b42421f Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Tue, 5 Dec 2017 01:34:54 +0100 Subject: [PATCH] Reformat HTML with Tidy --- posix.mak | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/posix.mak b/posix.mak index ccec65ca8f..1063c5300b 100644 --- a/posix.mak +++ b/posix.mak @@ -235,7 +235,7 @@ ALL_FILES = $(ALL_FILES_BUT_SITEMAP) $(DOC_OUTPUT_DIR)/sitemap.html # Rulez ################################################################################ -all : docs html +all : docs html tidy docs-release: dmd-release druntime-release phobos-release apidocs-release docs-prerelease: dmd-prerelease druntime-prerelease phobos-prerelease apidocs-prerelease @@ -671,4 +671,20 @@ changelog/${NEXT_VERSION}.dd: | ${STABLE_DMD} ../tools ../installer pending_changelog: changelog/${NEXT_VERSION}.dd html @echo "Please open file:///$(shell pwd)/web/changelog/${NEXT_VERSION}_pre.html in your browser" +################################################################################ +# HTML5 Tidy +################################################################################ + +TIDY=$G/tidy/build/cmake/tidy + +$G/tidy/.cloned: + git clone --depth 1 https://github.com/htacg/tidy-html5 $G/tidy + echo 1 > $@ + +$(TIDY): $G/tidy/.cloned + (cd $G/tidy/build/cmake && echo "y" | ./build-me.sh) + +tidy: $(TIDY) docs html + $(TIDY) -m $$(find web -type f -name "*.html") + .DELETE_ON_ERROR: # GNU Make directive (delete output files on error)