summaryrefslogtreecommitdiff
path: root/specs/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'specs/scripts')
-rw-r--r--specs/scripts/.gitignore1
-rw-r--r--specs/scripts/Makefile17
-rwxr-xr-xspecs/scripts/eglenum.sh3
3 files changed, 18 insertions, 3 deletions
diff --git a/specs/scripts/.gitignore b/specs/scripts/.gitignore
index 1dbc0cfa..5e2dae1c 100644
--- a/specs/scripts/.gitignore
+++ b/specs/scripts/.gitignore
@@ -4,4 +4,5 @@
*api.py
glparams.py
wglenum.py
+eglenum.py
!Makefile
diff --git a/specs/scripts/Makefile b/specs/scripts/Makefile
index 2ea20661..339de1ef 100644
--- a/specs/scripts/Makefile
+++ b/specs/scripts/Makefile
@@ -1,8 +1,12 @@
all: \
download \
- glapi.py glxapi.py wglapi.py \
- glparams.py wglenum.py
+ glapi.py \
+ glparams.py \
+ glxapi.py \
+ wglapi.py \
+ wglenum.py \
+ eglenum.py
download: \
enum.spec \
@@ -18,7 +22,8 @@ download: \
wglenumext.spec \
wgl.spec \
wglext.spec \
- wgl.tm
+ wgl.tm \
+ eglenum.spec
%.spec:
wget -N http://www.opengl.org/registry/api/$@
@@ -26,6 +31,9 @@ download: \
%.tm:
wget -N http://www.opengl.org/registry/api/$@
+eglenum.spec:
+ wget -N http://www.khronos.org/registry/egl/api/$@
+
glapi.py: glspec.py gl.tm gl.spec
python glspec.py gl gl.tm gl.spec > $@
@@ -41,6 +49,9 @@ glparams.py: glparams.sed enum.spec sort.sh
wglenum.py: wglenum.sh wglenumext.spec
./wglenum.sh wglenumext.spec > $@
+eglenum.py: eglenum.sh eglenum.spec
+ ./eglenum.sh eglenum.spec > $@
+
clean:
rm -f \
glapi.py glxapi.py wglapi.py \
diff --git a/specs/scripts/eglenum.sh b/specs/scripts/eglenum.sh
new file mode 100755
index 00000000..9727412a
--- /dev/null
+++ b/specs/scripts/eglenum.sh
@@ -0,0 +1,3 @@
+sed -n -e 's/^\s\+\(EGL_\)\?\(\S\+\)\s*=\s*\(0x3\w\w\w\)\s*\(#.*\)\?$/\3 \2/p' "$@" \
+| sort -u \
+| sed -e 's/\(\S\+\)\s\+\(\S\+\)/ "EGL_\2",\t\t# \1/'