Fix parallel build of the generated source code.

Make didn't know that our rule generated all 3 things, so it would
generate 3 times, and in parallel you'd end up writing over each
other.
macos/v1.5.9
Eric Anholt 11 years ago
parent faad44cc0a
commit 48297bb543
  1. 16
      src/Makefile.am

@ -55,13 +55,17 @@ GENERATED_GLX_INCLUDES = \
$(builddir)/../include/epoxy/glx_generated_vtable_defines.h \ $(builddir)/../include/epoxy/glx_generated_vtable_defines.h \
$() $()
GENERATED_GL_SOURCE = $(builddir)/gl_generated_dispatch.c
GENERATED_GL = \ GENERATED_GL = \
$(builddir)/gl_generated_dispatch.c \ $(GENERATED_GL_SOURCE) \
$(GENERATED_GL_INCLUDES) \ $(GENERATED_GL_INCLUDES) \
$() $()
GENERATED_GLX_SOURCE = $(builddir)/glx_generated_dispatch.c
GENERATED_GLX = \ GENERATED_GLX = \
$(builddir)/glx_generated_dispatch.c \ $(GENERATED_GLX_SOURCE) \
$(GENERATED_GLX_INCLUDES) \ $(GENERATED_GLX_INCLUDES) \
$() $()
@ -77,8 +81,12 @@ libepoxy_la_SOURCES = \
$(BUILT_SOURCES) $(BUILT_SOURCES)
$() $()
$(GENERATED_GL): gen_dispatch.py ../registry/gl.xml # These are generated alongside the .c file.
$(GENERATED_GL_INCLUDES): $(GENERATED_GL_SOURCE)
$(GENERATED_GLX_INCLUDES): $(GENERATED_GLX_SOURCE)
$(GENERATED_GL_SOURCE): gen_dispatch.py ../registry/gl.xml
$(AM_V_GEN)$(PYTHON) gen_dispatch.py --dir $(top_builddir) ../registry/gl.xml $(AM_V_GEN)$(PYTHON) gen_dispatch.py --dir $(top_builddir) ../registry/gl.xml
$(GENERATED_GLX): gen_dispatch.py ../registry/glx.xml $(GENERATED_GLX_SOURCE): gen_dispatch.py ../registry/glx.xml
$(AM_V_GEN)$(PYTHON) gen_dispatch.py --dir $(top_builddir) ../registry/glx.xml $(AM_V_GEN)$(PYTHON) gen_dispatch.py --dir $(top_builddir) ../registry/glx.xml

Loading…
Cancel
Save