diff --git a/.gitignore b/.gitignore index a661d9143eef2ef8f23f1460c0de50732015ba38..1cc22fd6bd76a52389240d22d9d0635e2c06a91f 100644 --- a/.gitignore +++ b/.gitignore @@ -10,5 +10,6 @@ *.bak .coq-native/ build-dep/ -Makefile.coq* +Makefile.coq +Makefile.coq.conf *.crashcoqide diff --git a/Makefile.coq.local b/Makefile.coq.local new file mode 100644 index 0000000000000000000000000000000000000000..b261de990be8a8d16d2d8e690b4bb18809ad8696 --- /dev/null +++ b/Makefile.coq.local @@ -0,0 +1,5 @@ +uninstall:: + @# This makes sure we also delete stale files in the destination directory + $(HIDE)df="$(COQLIBINSTALL)/`$(COQMKFILE) -destination-of "theories/base.v" $(COQLIBS)`" &&\ + echo "RM in $$df" &&\ + if [ -d "$$df" ]; then find "$$df" \( -name "*.vo" -o -name "*.v" -o -name "*.glob" -o \( -type d -empty \) \) -print -delete; fi diff --git a/awk.Makefile b/awk.Makefile index 09ded0aa64f3a85ee4a55668d21ee17bb9a362f0..74f7d5705b7b0aa240eb66fd0f3645beb064b1ab 100644 --- a/awk.Makefile +++ b/awk.Makefile @@ -11,7 +11,8 @@ # Patch the uninstall target to work properly, and to also uninstall stale files. # Also see <https://coq.inria.fr/bugs/show_bug.cgi?id=4907>. -/^uninstall:/ { +# This (and the section above) can be removed once we no longer support Coq 8.6. +/^uninstall: / { print "uninstall:"; print "\tif [ -d \"$(DSTROOT)\"$(COQLIBINSTALL)/"PROJECT"/ ]; then find \"$(DSTROOT)\"$(COQLIBINSTALL)/"PROJECT"/ \\( -name \"*.vo\" -o -name \"*.v\" -o -name \"*.glob\" -o \\( -type d -empty \\) \\) -print -delete; fi"; getline;