some parallel Make glitches noticed

observed: parallel build attempts of makedefs that trampled over
one another.

attempted workaround: Add a dependency as per Pat R's suggestion.

observed: Concurrent header file movement collisions were sometimes
causing file busy errors and build failures.

workaround: Eliminate tile.h header file movement from the
Makefile build so that the collisions won't occur with that
particular file. Leave the header file tile.h in win/share as it
is in the distribution and just adjust the include path in the
rule for the specific files that use it.

observed: tiletxt.c created on-the-fly from Makefile echo statements
sometimes resulted in garbled and duplicate content in it when
parallel makes were involved, and that caused a build failure.

workaround: Instead of creating a tiletxt.c on-the-fly via echo
statements in the Makefile, simplify things and use that
same #include "tilemap.c" approach but make it an actual file
in the distribution. That makes it available for other platforms
too.
This commit is contained in:
nhmall
2022-03-13 11:06:45 -04:00
parent 2bb26da9fa
commit 2234cc256d
5 changed files with 27 additions and 29 deletions
+4 -1
View File
@@ -121,7 +121,7 @@ all: $(ALLDEP)
$(GAME): lua_support
( cd src ; $(MAKE) $(GAME) )
lua_support: $(TOPLUALIB) include/nhlua.h
lua_support: include/nhlua.h
@true
$(LUATOP)/liblua.a: $(LUAHEADERS)/lua.h
( cd $(LUATOP) \
@@ -129,6 +129,9 @@ $(LUATOP)/liblua.a: $(LUAHEADERS)/lua.h
lib/lua/liblua.a: $(LUATOP)/liblua.a
@( if test -d lib/lua ; then true ; else mkdir -p lib/lua ; fi )
cp $(LUATOP)/liblua.a $@
#include/nhlua.h: $(TOPLUALIB)
# ( cd src ; $(MAKE) LUAHEADERS="$(LUAHEADERS)" ../include/nhlua.h )
include/nhlua.h: $(TOPLUALIB)
echo '/* nhlua.h - generated by top Makefile */' > $@
@echo '#include "../$(LUAHEADERS)/lua.h"' >> $@