Tarballs include the downloaded gl spec files, which will end up in $(srcdir). But, git-based builds will not have them at all and will need to download them from opengl.org. They'll land in in the build directory instead of $(srcdir), and so we need to allow them to be in either place.
This change checks for the files in $(srcdir), linking them to . if present. Otherwise, it downloads them from opengl.org. A suggested better solution is to have Mesa install these files somewhere. Signed-off-by: Keith Packard <[email protected]> --- hw/xwin/glx/Makefile.am | 28 ++++++++++++++++++++++------ 1 files changed, 22 insertions(+), 6 deletions(-) diff --git a/hw/xwin/glx/Makefile.am b/hw/xwin/glx/Makefile.am index e9fea50..5b9d2da 100644 --- a/hw/xwin/glx/Makefile.am +++ b/hw/xwin/glx/Makefile.am @@ -33,22 +33,38 @@ indirect.c: wgl_ext_api.h SPEC_FILES = gl.spec gl.tm wglext.spec wgl.tm gl.spec: - wget http://www.opengl.org/registry/api/gl.spec + if test -f $(srcdir)/$@; then \ + $(LN) $(srcdir)/$@ .; \ + else \ + wget http://www.opengl.org/registry/api/$@; \ + fi gl.tm: - wget http://www.opengl.org/registry/api/gl.tm + if test -f $(srcdir)/$@; then \ + $(LN) $(srcdir)/$@ .; \ + else \ + wget http://www.opengl.org/registry/api/$@; \ + fi wglext.spec: - wget http://www.opengl.org/registry/api/wglext.spec + if test -f $(srcdir)/$@; then \ + $(LN) $(srcdir)/$@ .; \ + else \ + wget http://www.opengl.org/registry/api/$@; \ + fi wgl.tm: - wget http://www.opengl.org/registry/api/wgl.tm + if test -f $(srcdir)/$@; then \ + $(LN) $(srcdir)/$@ .; \ + else \ + wget http://www.opengl.org/registry/api/$@; \ + fi generated_gl_wrappers.c: gen_gl_wrappers.py gl.spec gl.tm - $(srcdir)/gen_gl_wrappers.py --spec=$(srcdir)/gl.spec --typemap=$(srcdir)/gl.tm --dispatch-header=$(top_srcdir)/glx/dispatch.h --staticwrappers >generated_gl_wrappers.c + $(srcdir)/gen_gl_wrappers.py --spec=gl.spec --typemap=gl.tm --dispatch-header=$(top_srcdir)/glx/dispatch.h --staticwrappers >generated_gl_wrappers.c generated_wgl_wrappers.c: gen_gl_wrappers.py wglext.spec wgl.tm - $(srcdir)/gen_gl_wrappers.py --spec=$(srcdir)/wglext.spec --typemap=$(srcdir)/wgl.tm --prefix=wgl --preresolve >generated_wgl_wrappers.c + $(srcdir)/gen_gl_wrappers.py --spec=wglext.spec --typemap=wgl.tm --prefix=wgl --preresolve >generated_wgl_wrappers.c wglext.h: wget http://www.opengl.org/registry/api/wglext.h -- 1.7.2.3 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
