• Ross Burton's avatar
    Fix build race in Makefile · 767e0316
    Ross Burton authored
    The current rule for the binaries is:
    glew.bin: glew.lib bin bin/$(GLEWINFO.BIN) bin/$(VISUALINFO.BIN)
    In parallel builds, all of those targets happen at the same time. This
    means that 'bin' can happen *after* 'bin/$(GLEWINFO.BIN)', which is a
    problem as the 'bin' target's responsibility is to create the directory
    that the other target writes into.
    Solve this by not having a separate 'create directory' target which is
    fundamentally racy, and simply mkdir in each target which writes into it.
Makefile 11.6 KB