Skip to content

Commit

Permalink
Add explicit dependency on mapcalc.tab.h
Browse files Browse the repository at this point in the history
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 might help improve OSGeo#3406

This patch was done while working on reproducible builds for openSUSE.
  • Loading branch information
bmwiedemann committed Feb 12, 2024
1 parent 4824d28 commit 4834521
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion raster/r.mapcalc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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: $(OBJDIR)/mapcalc.tab.META
$(OBJDIR)/mapcalc.yy.o: $(OBJDIR)/mapcalc.tab.META

$(OBJDIR)/mapcalc.tab.META: mapcalc.tab.c mapcalc.tab.h
touch $(OBJDIR)/mapcalc.tab.META

.SECONDARY: mapcalc.tab.c mapcalc.tab.h mapcalc.output

Expand Down

0 comments on commit 4834521

Please sign in to comment.