From 7bcd38ce24745468910e3b6db15a1b321e8779d7 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Thu, 15 Feb 2024 09:07:47 +0100 Subject: [PATCH] r.mapcalc: Add explicit dependency on mapcalc.tab.h (#3415) Add explicit dependency on mapcalc.tab.c to tell make that both .c and .h are needed This allows for reproducible builds. Without this change, r.mapcalc and r3.mapcalc would be rebuilt a 2nd time in a make -j1 run with slightly varied order of mapcalc.yy.o and mapcalc.tab.o This might help improve #3406 This patch was done while working on reproducible builds for openSUSE. --- raster/r.mapcalc/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/raster/r.mapcalc/Makefile b/raster/r.mapcalc/Makefile index e427ebfbe98..c73077f490d 100644 --- a/raster/r.mapcalc/Makefile +++ b/raster/r.mapcalc/Makefile @@ -20,7 +20,9 @@ default: multi $(BIN)/$(PGM2)$(EXE): LIBES = $(LIBES2) $(BIN)/$(PGM3)$(EXE): LIBES = $(LIBES3) -$(OBJDIR)/mapcalc.yy.o: mapcalc.tab.h +$(OBJDIR)/*.o: mapcalc.tab.h mapcalc.tab.c +$(OBJDIR)/mapcalc.yy.o: mapcalc.tab.h mapcalc.tab.c + .SECONDARY: mapcalc.tab.c mapcalc.tab.h mapcalc.output