- From: Michael Smith via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 10 Jun 2008 10:49:14 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/pubnotes In directory hutz:/tmp/cvs-serv12044 Modified Files: Makefile Added Files: .cvsignore Log Message: add targets for doing validation and link checking --- NEW FILE: .cvsignore --- CHECKLOG Index: Makefile =================================================================== RCS file: /sources/public/html5/pubnotes/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile 9 Jun 2008 18:56:51 -0000 1.5 +++ Makefile 10 Jun 2008 10:49:12 -0000 1.6 @@ -5,10 +5,30 @@ XSLTSTYLESHEET=specgen.xsl CVS2CL=cvs2cl CVS2CLFLAGS=-r +CURL=curl +CURLFLAGS=-s -all: Overview.html +VNU=http://validator.nu +VNUFLAGS=-F level=error -F out=gnu -F parser=xmldtd -F schema=http://svn.versiondude.net/whattf/validator/trunk/schema/xhtml10/xhtml-strict.rnc -F laxtype=yes -c: ChangeLog +CHECKLINK=checklink +CHECKLINKFLAGS=-q -b + +TEE=tee +TEEFLAGS=-a + +GREP=egrep +GREPFLAGS= + +CUT=cut +CUTFLAGS= + +WGET=wget +WGETFLAGS=--spider -nv + +all: Overview.html CHECKLOG + +c: all ChangeLog ChangeLog: Overview.html $(CVS2CL) $(CVS2CLFLAGS) @@ -18,3 +38,16 @@ summary.html: ../html4-differences/Overview.src.html $(PARSE) $(PARSEFLAGS) $< > $@ + +CHECKLOG: Overview.html + echo "checking $(realpath $<)" >> $@ + echo "Performing validation..." >> $@ + $(CURL) $(CURLFLAGS) $(VNUFLAGS) -F doc=@$< $(VNU) && echo "Document is valid." >> $@ + $(CHECKLINK) $(CHECKLINKFLAGS) $< | $(TEE) $(TEEFLAGS) $@ + for file in $$($(GREP) $(GREPFLAGS) "^http" $@ | $(CUT) $(CUTFLAGS) -f1); do \ + ($(WGET) $(WGETFLAGS) "$$file" 2>&1 && echo "File exists: $$file") \ + | $(TEE) $(TEEFLAGS) $@; \ + done + +clean: + $(RM) CHECKLOG
Received on Tuesday, 10 June 2008 10:49:47 UTC