# Makefile for html test suite
# $Id: Makefile,v 1.4 2014/02/24 23:00:58 sysbot Exp $
#

NSGMLS = nsgmls
DECL = html.decl
DOCTYPE = doctype.sgml

CASES = \
	*.html \
	ncsa/*.html \
	misc/*.html \
	forms/*.html \
	cern/*.html \
	latex/*.html \
	implementors-guide/*.html

test: documents instances

documents:
	for h in $(CASES); do \
		grep -i '^<!doctype' $$h >/dev/null&& \
			(echo $$h; \
			$(NSGMLS) -m catalog -s -e $(DECL) $$h;) \
	done; exit 0

instances:
	for h in $(CASES); do \
		grep -i '^<!doctype' $$h >/dev/null || \
			(echo $$h; \
			$(NSGMLS) -m catalog -s -e $(DECL) $(DOCTYPE) $$h ) \
	done; exit 0

