diff options
author | Eric Anholt <eric@anholt.net> | 2013-10-24 10:35:00 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2013-11-14 11:10:56 -0800 |
commit | 48297bb543a718e5f488f03c5564248e5a56f9f7 (patch) | |
tree | 810e52c8b1f3e7779c8a9fca0fdc37509ca7ddb1 | |
parent | faad44cc0a51976a5ddcca6b049f91dae6cc666c (diff) |
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.
-rw-r--r-- | src/Makefile.am | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 6719397..3e20eef 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -55,13 +55,17 @@ GENERATED_GLX_INCLUDES = \ $(builddir)/../include/epoxy/glx_generated_vtable_defines.h \ $() +GENERATED_GL_SOURCE = $(builddir)/gl_generated_dispatch.c + GENERATED_GL = \ - $(builddir)/gl_generated_dispatch.c \ + $(GENERATED_GL_SOURCE) \ $(GENERATED_GL_INCLUDES) \ $() +GENERATED_GLX_SOURCE = $(builddir)/glx_generated_dispatch.c + GENERATED_GLX = \ - $(builddir)/glx_generated_dispatch.c \ + $(GENERATED_GLX_SOURCE) \ $(GENERATED_GLX_INCLUDES) \ $() @@ -77,8 +81,12 @@ libepoxy_la_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 -$(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 |