diff --git a/Makefile b/Makefile index 4e6781727aa5d9f5290e249575c87c2d192b6dd5..c34e4dd4bfc1c7b04787e10e0352e69b558f3d7a 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +ifeq "$(COQBIN)" "" + COQBIN=$(dir $(shell which coqtop))/ +endif + # Forward most targets to Coq makefile (with some trick to make this phony) %: Makefile.coq phony +@make -f Makefile.coq $@ @@ -15,7 +19,7 @@ clean: Makefile.coq # Create Coq Makefile. POSIX awk can't do in-place editing, but coq_makefile wants the real # filename, so we do some file gymnastics. Makefile.coq: _CoqProject Makefile awk.Makefile - coq_makefile -f _CoqProject -o Makefile.coq + $(COQBIN)/coq_makefile -f _CoqProject -o Makefile.coq mv Makefile.coq Makefile.coq.tmp && awk -f awk.Makefile Makefile.coq.tmp > Makefile.coq && rm Makefile.coq.tmp # Install build-dependencies