From b1d92b79b65633ba4d0e37953deab5e0e1ea4159 Mon Sep 17 00:00:00 2001 From: GriffinR Date: Tue, 15 Oct 2024 22:20:43 -0400 Subject: [PATCH] Fix event_constants recipe running twice --- map_data_rules.mk | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/map_data_rules.mk b/map_data_rules.mk index ab68f2036..3244d6e8d 100644 --- a/map_data_rules.mk +++ b/map_data_rules.mk @@ -36,6 +36,9 @@ $(LAYOUTS_OUTDIR)/layouts.inc $(LAYOUTS_OUTDIR)/layouts_table.inc $(INCLUDECONST # Generate files that depends on data that's distributed across the map.json files. # There's a lot of map.json files, so we print an abbreviated output with echo. -$(INCLUDECONSTS_OUTDIR)/map_event_ids.h $(DATA_SRC_SUBDIR)/heal_locations.h: $(MAP_JSONS) +# We're also not using a pattern rule, and we only want this to run once for both targets, +# so we use a separate target 'event_constants'. +$(INCLUDECONSTS_OUTDIR)/map_event_ids.h $(DATA_SRC_SUBDIR)/heal_locations.h: .event_constants ; +.event_constants: $(MAP_JSONS) @$(MAPJSON) event_constants firered $^ $(INCLUDECONSTS_OUTDIR)/map_event_ids.h $(DATA_SRC_SUBDIR)/heal_locations.h @echo "$(MAPJSON) event_constants firered $(INCLUDECONSTS_OUTDIR)/map_event_ids.h $(DATA_SRC_SUBDIR)/heal_locations.h"