From 2672e90414c5fce00647595028aec74da8e2ad6d Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Sun, 11 Feb 2024 14:37:30 +0100 Subject: [PATCH] Add explicit dependency on mapcalc.tab.h and use a .META file to tell make that both .c and .h are created by one call to allow 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 patch was done while working on reproducible builds for openSUSE. --- raster/r.mapcalc/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/raster/r.mapcalc/Makefile b/raster/r.mapcalc/Makefile index e427ebfbe98..6720d53f5cd 100644 --- a/raster/r.mapcalc/Makefile +++ b/raster/r.mapcalc/Makefile @@ -20,7 +20,11 @@ default: multi $(BIN)/$(PGM2)$(EXE): LIBES = $(LIBES2) $(BIN)/$(PGM3)$(EXE): LIBES = $(LIBES3) -$(OBJDIR)/mapcalc.yy.o: mapcalc.tab.h +$(OBJDIR)/*.o: mapcalc.tab.META +$(OBJDIR)/mapcalc.yy.o: mapcalc.tab.META + +mapcalc.tab.META: mapcalc.tab.c mapcalc.tab.h + touch mapcalc.tab.META .SECONDARY: mapcalc.tab.c mapcalc.tab.h mapcalc.output