Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. #!/bin/make
  2. #
  3. # Create the WebIDL for core DOM and HTML spec directly from
  4. #  downloaded specifications. The resulting IDL is pretty close but
  5. #  carries the example text etc. and should be manually cleaned up and
  6. #  tagged with the retrival date and source URL
  7. #
  8. # needs debin packages: curl w3m tidy html-xml-utils
  9. #
  10. # Copyright 2012 Vincent Sanders
  11. # MIT licenced
  12.  
  13. .PHONY:all clean
  14.  
  15. all: dom.idl html.idl
  16.  
  17. .INTERMEDIATE:dom-spec.html dom-spec.xml dom-idl.html html-spec.html html-spec.xml html-idl.html
  18.  
  19.  
  20. dom-spec.html:
  21.         curl -s http://dom.spec.whatwg.org/ -o $@
  22.  
  23. html-spec.html:
  24.         curl -s http://www.whatwg.org/specs/web-apps/current-work/ -o $@
  25.  
  26. %-spec.xml: %-spec.html
  27.         -tidy -q -f $@.errors --new-blocklevel-tags header,hgroup,figure -o $@ -asxml $<
  28.  
  29. %-idl.html: %-spec.xml
  30.         hxselect pre.idl < $< > $@
  31.  
  32. %.idl: %-idl.html
  33.         cat $< | w3m -dump -T text/html >$@
  34.  
  35.  
  36.  
  37. clean:
  38.         ${RM} dom.idl html.idl dom-spec.html dom-spec.xml dom-idl.html html-spec.html html-spec.xml html-idl.html
  39.