[project @ 2000-12-12 13:57:40 by simonmar]
authorsimonmar <unknown>
Tue, 12 Dec 2000 13:57:40 +0000 (13:57 +0000)
committersimonmar <unknown>
Tue, 12 Dec 2000 13:57:40 +0000 (13:57 +0000)
Allow for compiling to .hc only (substitute for now-defunct -noC option)

ghc/tests/mk/should_compile.mk

index 3fdcc62..5d9b1ef 100644 (file)
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# $Id: should_compile.mk,v 1.4 2000/11/03 16:23:38 simonmar Exp $
+# $Id: should_compile.mk,v 1.5 2000/12/12 13:57:40 simonmar Exp $
 # template for should_compile tests.
 
 HS_SRCS = $(wildcard *.hs)
@@ -12,7 +12,15 @@ SRC_RUNTEST_OPTS += -x 0 \
        @echo ---- Testing for successful compilation of $<
        $(RUNTEST) $(HC) $(RUNTEST_OPTS) -- $(HC_OPTS) -c $< -o $@
 
+%.hc : %.hs
+       @echo ---- Testing for successful compilation of $<
+       $(RUNTEST) $(HC) $(RUNTEST_OPTS) -- $(HC_OPTS) -C $< -o $@
+
+ifeq "$(HCOnly)" "YES"
+all :: $(HS_HCS)
+else
 all :: $(HS_OBJS)
+endif
 
 # Most single-module tests are declared to be module ShouldCompile, so we
 # can clean the .hi files in one go: