.PHONY: all

all: webgl2.idl

webgl2.idl: index.html Makefile
	echo "// AUTOGENERATED FILE -- DO NOT EDIT -- SEE Makefile" > webgl2.idl
	echo "//" >> webgl2.idl
	echo "// WebGL IDL definitions scraped from the Khronos specification:" >> webgl2.idl
	echo "// https://www.khronos.org/registry/webgl/specs/latest/" >> webgl2.idl
	echo "//" >> webgl2.idl
	echo "// This IDL depends on the typed array specification defined at:" >> webgl2.idl
	echo "// https://www.khronos.org/registry/typedarray/specs/latest/typedarrays.idl" >> webgl2.idl
	echo "" >> webgl2.idl
	PYTHONPATH=../../../resources/html5lib/src python extract-idl.py index.html >> webgl2.idl
