#
#
LF=logfile

all: html

html: html/index.html

html/index.html: *.xml skami.list skamirc.list
	mkdir -p html ../html # to make sure the html-directories do exist
	xmlto html -o html about.xml
	# cleanup the mess
	date > $(LF) # start new log file
	htmlfiles=`ls html/*.html` ; \
	for hf in $$htmlfiles ; do \
	  echo $$hf >> $(LF) ; \
	  tidy $$hf > ../$$hf 2>> $(LF) ; \
	  touch ../$$hf ; \
	done
	@# The 'touch' above is to reset the exit code from 'tidy',
	@#  due a warning it is not zero.

skami.list: ../../skami
	echo "<![CDATA[" > skami.list  # to stop parsing
	cat ../../skami >> skami.list
	echo   "]]>"    >> skami.list  # to start parsing

skamirc.list: ../../skamirc
	echo "<![CDATA["   > skamirc.list
	cat ../../skamirc >> skamirc.list
	echo    "]]>"     >> skamirc.list

# `make install' is not here, but can be used from here
install:
	( cd .. ; make $@ )

clean:
	rm -fr html $(LF)
	rm -f *.list

#
# end of htdocs/src/Makefile
