From 392950c8d1d5231760099b489954f48309b9f640 Mon Sep 17 00:00:00 2001 From: Jamie Pate Date: Wed, 1 Jun 2022 12:31:08 -0700 Subject: [PATCH] Fix dependencies for godot-cpp bindings Use an order-only prerequisite on api.json to prevent make from re-running scons for the godot-cpp bindings --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0dbcd88..50c9605 100644 --- a/Makefile +++ b/Makefile @@ -188,7 +188,11 @@ API_CLASSES+= $(__GODOT_CPP_GEN_CLASSES) GODOT_CPP_GEN_CPP=$(API_CLASSES:%=godot-cpp/src/gen/%.cpp) GODOT_CPP_GEN_OBJS=$(API_CLASSES:%=godot-cpp/src/gen/%.o) # reset -I fixes the terminal which gets bunged up by this step... -$(GODOT_CPP_GEN_CPP) $(GODOT_CPP_OBJS) $(GODOT_CPP_GEN_DIR)&: $(GODOT_CPP_API_JSON) +# api.json is an order only prerequisite because the scons script doesn't take it's date +# into account when generating these artifacts which causes make to re-run it for each one when they +# don't get updated to a newer date than api.json +# You will have to clean the submodule to re-build these artifacts. +$(GODOT_CPP_GEN_CPP) $(GODOT_CPP_OBJS) $(GODOT_CPP_GEN_DIR)&: | $(GODOT_CPP_API_JSON) cd godot-cpp; set -e; \ scons generate_bindings=yes platform=$(PLATFORM) use_mingw=yes -j$$(nproc) > /dev/null || (echo 'SCONS FAIL'; false)