# List any HTML files for which there are recipes that
# should be build for "all" and deleted during cleaning.
HTMLTARGETS=index.html delta.html

# List any other files for which there are recipes that
# should be built for "all" and deleted during cleaning.
FILETARGETS=delta.web

# Phony targets.  These are built for "all" but excluded
# from deletion during cleaning.
PHONYTARGETS=

# A list of files or directories that should be ignored.
# They should not be built or recursed into.
IGNORE=Resources Include

include ${WEBBASE}/Include/Makefile.inc

# Tell Tidy to ignore proprietary attributes (needed for
# some social media integrations).
# TIDY_OPTIONS=--warn-proprietary-attributes no

# Set TIDY_TOLERATE_WARNINGS to 1 to ignore HTML Tidy warnings
# TIDY_TOLERATE_WARNINGS=1

# Set VALIDATE to false to disable Validator.Nu validation
# VALIDATOR=false

# Custom target: index.html is the same as readme.
index.html: | readme.html
	ln readme.html $@

indices: delta.web sitemap.xml.gz 

# PHONY targets always run when asked.
.PHONY: delta.web
delta.web: 
	${WEBBASE}/Include/bin/buildindex -d -r

.PHONY: delta.m4
delta.m4:
	${WEBBASE}/Include/bin/buildindex -d -S -C4

.PHONY: index-data.dat
index-data.dat:
	Include/bin/buildindex -i -I -S -o index-data.dat

.PHONY: indexpage.m4
indexpage.m4: index-data.dat
	Include/bin/buildindex -S -I -o indexpage.m4 index-data.dat ../Df/index-data.dat

.PHONY: sitemap.m4
sitemap.m4:
	Include/bin/buildindex -lDOS -o sitemap.m4

.PHONY: sitemap.xml.gz
sitemap.xml.gz:
	rm -f sitemap.xml.gz
	${WEBBASE}/Include/bin/buildindex -s
	gzip -c sitemap.xml > sitemap.xml.gz

