.PHONY: all
all:
	for file in `ls | grep -v \\.html$$`; do \
		if [ x"$$file" = xMakefile ]; then continue; fi; \
		echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">' 			 > $$file.html; \
		echo "<html>"						 			>> $$file.html; \
		echo "<head><title>$$( head -n1 $$file | recode ..html )</title></head>"        >> $$file.html; \
		echo "<body><pre>$$( sed '1d' < $$file | recode ..html )</pre></body>"          >> $$file.html; \
		echo "</html>"                                                                  >> $$file.html; \
	done

vulnerablevim.html: advisory
	echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">' 			   > vulnerablevim.html
	echo "<html>"						 			  >> vulnerablevim.html
	echo "<head><title>$$( head -n1 advisory | recode ..html )</title></head>"        >> vulnerablevim.html
	echo "<body><pre>$$( sed -n '/^1/,$$p' < advisory | recode ..html )</pre></body>" >> vulnerablevim.html
	echo "</html>"                                                                    >> vulnerablevim.html
