aboutsummaryrefslogtreecommitdiffstats
path: root/make/config/jogl/make-glextension-depignore.sh
blob: 98db66a844a19dfc5e2ad9d8266ee5e4e12068e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash

thisdir=`pwd`
registry=/data/docs/ComputerIT/3D_AV_GFX/gl/registry/specs
classdirpos=9
dirdep=$thisdir/tmp_glext_dep

gl3ignores=$thisdir/gl-if-gl3-ignores.cfg
gl4ignores=$thisdir/gl-if-gl4-ignores.cfg

rm -rf $dirdep
mkdir -p $dirdep

cd $registry

# We allow OpenGL 3.0 within GL2
grep -RIl "^[ \t]*OpenGL 3\.[1234] is required" . > $dirdep/ext-req-3_x.txt
grep -RIl "^[ \t]*OpenGL 3\.[1234] and GLSL .* are required" . >> $dirdep/ext-req-3_x.txt
grep -RIl "^[ \t]*OpenGL 4\.. is required" . > $dirdep/ext-req-4_x.txt
grep -RIl "^[ \t]*OpenGL 4\.. and GLSL .* are required" . >> $dirdep/ext-req-4_x.txt

cd $thisdir

function dump_ignore_ext() {
    infile=$1
    for i in `cat $infile` ; do 
        class=`echo $i | awk -F '/' ' { print \$2 } ' `
        extname="GL_"$class"_"`basename $i .txt`
        echo IgnoreExtension $extname
    done
}

function dump_ignore_header() {
    echo "#"
    echo "# Generated Configuration File"
    echo "# Use make-glextension-depignore.sh to update!"
    echo "#"
    echo
}

function dump_ignore_ext_gl3() {
    echo "#"
    echo "# OpenGL 3.x dependencies"
    echo "#"
    echo "# We allow GL_VERSION_3_0 within GL2"
    echo "IgnoreExtension GL_VERSION_3_1"
    echo "IgnoreExtension GL_VERSION_3_2"
    echo "IgnoreExtension GL_VERSION_3_3"
    echo "IgnoreExtension GL_VERSION_3_4"
    dump_ignore_ext $dirdep/ext-req-3_x.txt
    echo
}

function dump_ignore_ext_gl4() {
    echo "#"
    echo "# OpenGL 4.x dependencies"
    echo "#"
    echo "IgnoreExtension GL_VERSION_4_0"
    echo "IgnoreExtension GL_VERSION_4_1"
    echo "IgnoreExtension GL_VERSION_4_2"
    dump_ignore_ext $dirdep/ext-req-4_x.txt
    echo
}

dump_ignore_header > $gl3ignores
dump_ignore_ext_gl3 >> $gl3ignores

dump_ignore_header > $gl4ignores
dump_ignore_ext_gl4 >> $gl4ignores