summaryrefslogtreecommitdiff
path: root/coq
diff options
context:
space:
mode:
Diffstat (limited to 'coq')
-rwxr-xr-xcoq12
1 files changed, 11 insertions, 1 deletions
diff --git a/coq b/coq
index 19edb9a..97d4ca6 100755
--- a/coq
+++ b/coq
@@ -1,7 +1,17 @@
#!/bin/sh
# Start coqide with the right -I options
+# Use the Makefile to rebuild dependencies if needed
+# Recompile the modified file after coqide editing
ARCH=`sed -n -e 's/^ARCH=//p' Makefile.config`
VARIANT=`sed -n -e 's/^VARIANT=//p' Makefile.config`
-coqide -I lib -I common -I $ARCH/$VARIANT -I $ARCH -I backend -I cfrontend $1 && make ${1}o
+make -q ${1}o || {
+ make -n ${1}o | grep -v "\\b${1}\\b" | \
+ (while read cmd; do
+ $cmd || exit 2
+ done)
+}
+
+coqide -I lib -I common -I $ARCH/$VARIANT -I $ARCH -I backend -I cfrontend $1 \
+&& make ${1}o