From c96e57862e40ee2e993f30f5cf442e7a0c723608 Mon Sep 17 00:00:00 2001
From: Tej Chajed <tchajed@mit.edu>
Date: Tue, 8 Sep 2020 10:26:43 -0500
Subject: [PATCH] Use simple variables in Makefile

var=foo is a "recursive variable assignment", which is expanded on every
use (including re-running shell commands). What we really want is
var:=foo, which is expanded at definition time.
---
 Makefile.coq.local | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile.coq.local b/Makefile.coq.local
index 9ceafe4c7..70d89dcd4 100644
--- a/Makefile.coq.local
+++ b/Makefile.coq.local
@@ -2,15 +2,15 @@
 real-all: $(if $(NO_TEST),,test)
 
 # the test suite
-TESTFILES=$(wildcard tests/*.v)
-NORMALIZER=test-normalizer.sed
+TESTFILES:=$(wildcard tests/*.v)
+NORMALIZER:=test-normalizer.sed
 
 test: $(TESTFILES:.v=.vo)
 .PHONY: test
 
 COQ_TEST=$(COQTOP) $(COQDEBUG) -batch -test-mode
-COQ_OLD=$(shell echo "$(COQ_VERSION)" | egrep "^8\.(7|8|9)\b" -q && echo 1)
-COQ_MINOR_VERSION=$(shell echo "$(COQ_VERSION)" | egrep '^[0-9]+\.[0-9]+\b' -o)
+COQ_OLD:=$(shell echo "$(COQ_VERSION)" | egrep "^8\.(7|8|9)\b" -q && echo 1)
+COQ_MINOR_VERSION:=$(shell echo "$(COQ_VERSION)" | egrep '^[0-9]+\.[0-9]+\b' -o)
 
 tests/.coqdeps.d: $(TESTFILES)
 	$(SHOW)'COQDEP TESTFILES'
-- 
GitLab