@@ -100,8 +100,19 @@ distclean: sub-distclean this-distclean
100100.PHONY : this-config this-build this-only this-test-suite this-test-suite-stdlib this-distclean this-clean
101101
102102this-config :: __always__
103- if command -v coqc > /dev/null && (coqc --version | grep -q ' 8.18\|8.19\|8.20' ) ; then \
104- sed -i.bak HB/structures.v -e ' s/From Corelib/From Coq/' ; \
103+ @command -v coqc > /dev/null || exit 1
104+ @if [ -e config.stamp -a " ` coqc --print-version` " = " ` cat config.stamp 2> /dev/null` " ] ; then \
105+ echo ' already configured' ; \
106+ else\
107+ coqc --print-version > config.stamp; \
108+ echo ' configuring for ' ` coqc --print-version` ; \
109+ if (coqc --version | grep -q ' 8.18\|8.19\|8.20' ) ; then \
110+ echo ' *****************************************************************' ; \
111+ echo ' old coq version detected, double check the diff before committing' ; \
112+ echo ' *****************************************************************' ; \
113+ sed -i.bak ` find . -name \* .v` -e ' s/From Corelib/From Coq/' ; \
114+ sed -i.bak ` find . -name \* .v` -e ' s/IntDef/ZArith/' ; \
115+ fi ; \
105116 fi
106117
107118this-build :: this-config Makefile.coq
@@ -117,6 +128,7 @@ this-test-suite-stdlib:: build Makefile.test-suite-stdlib.coq
117128 +$(COQMAKE_TESTSUITE_STDLIB )
118129
119130this-distclean :: this-clean
131+ rm -f config.stamp
120132 rm -f Makefile.coq Makefile.coq.conf
121133 rm -f Makefile.test-suite.coq Makefile.test-suite.coq.conf
122134 rm -f Makefile.test-suite-stdlib.coq Makefile.test-suite-stdlib.coq.conf
0 commit comments