Skip to content

Commit

Permalink
Fix dependencies for godot-cpp bindings
Browse files Browse the repository at this point in the history
Use an order-only prerequisite on api.json to prevent make from
re-running scons for the godot-cpp bindings
  • Loading branch information
jamie-pate committed Jun 1, 2022
1 parent f18ea33 commit 392950c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 392950c

Please sign in to comment.