Fix ohi-sanity-check when we have ways other than v and dyn enabled
authorIan Lynagh <ian@well-typed.com>
Sun, 17 Mar 2013 15:42:20 +0000 (15:42 +0000)
committerIan Lynagh <ian@well-typed.com>
Sun, 17 Mar 2013 15:42:20 +0000 (15:42 +0000)
It thought that /all/ ways should create the dyn o/hi files, but only
the v way does.

rules/hs-suffix-way-rules-srcdir.mk

index 466b631..eff4954 100644 (file)
@@ -73,7 +73,11 @@ else
 # We don't look for the .hi file if this is for a program, as if the
 # Main module is in foo.hs then we get foo.o but Main.hi
 define ohi-sanity-check
-       @for f in $4.$($3_osuf) $(if $($1_$2_PROG),,$4.$($3_hisuf)) $(if $(findstring YES,$($1_$2_DYNAMIC_TOO)),$4.$(dyn_osuf) $4.$(dyn_hisuf)); do \
+       @for f in $4.$($3_osuf) \
+                 $(if $($1_$2_PROG),,$4.$($3_hisuf)) \
+                 $(if $(findstring v,$3), \
+                     $(if $(findstring YES,$($1_$2_DYNAMIC_TOO)), \
+                         $4.$(dyn_osuf) $4.$(dyn_hisuf))); do \
            if [ ! -f $$f ]; then \
                echo "Panic! $$f not created."; \
                exit 1; \