[project @ 2000-06-12 16:20:31 by panne]
authorpanne <unknown>
Mon, 12 Jun 2000 16:20:31 +0000 (16:20 +0000)
committerpanne <unknown>
Mon, 12 Jun 2000 16:20:31 +0000 (16:20 +0000)
Only add -o? FOO.stdBAR when it exists. I'm not sure if this
foreach-hack is the most elegant way to go though...

ghc/tests/mk/should_compile.mk
ghc/tests/mk/should_fail.mk
ghc/tests/mk/should_run.mk

index d0b7e1f..929ced2 100644 (file)
@@ -3,7 +3,9 @@
 
 HS_SRCS = $(wildcard *.hs)
 
-SRC_RUNTEST_OPTS += -o1 $*.stdout -o2 $*.stderr -x 0
+SRC_RUNTEST_OPTS += -x 0 \
+       $(foreach i,$(wildcard $*.stdout),-o1 $(i)) \
+       $(foreach i,$(wildcard $*.stderr),-o2 $(i))
 
 %.o : %.hs
        @echo ---- Testing for successful compilation of $<
index ec39011..17b10e6 100644 (file)
@@ -3,7 +3,9 @@
 
 HS_SRCS = $(wildcard *.hs)
 
-SRC_RUNTEST_OPTS += -o1 $*.stdout -o2 $*.stderr -x 1
+SRC_RUNTEST_OPTS += -x 1 \
+       $(foreach i,$(wildcard $*.stdout),-o1 $(i)) \
+       $(foreach i,$(wildcard $*.stderr),-o2 $(i))
 
 %.o : %.hs
        @echo ---- Testing for failure to compile $<
index 7c58508..eb0336b 100644 (file)
@@ -5,7 +5,9 @@ HS_SRCS = $(wildcard *.hs)
 BINS = $(patsubst %.o,%.bin,$(HS_OBJS))
 RUNTESTS = $(filter-out $(OMITTED_RUNTESTS), $(patsubst %.bin,%.run,$(BINS)))
 
-SRC_RUNTEST_OPTS += -o1 $*.stdout -o2 $*.stderr -x 0
+SRC_RUNTEST_OPTS += -x 0 \
+       $(foreach i,$(wildcard $*.stdout),-o1 $(i)) \
+       $(foreach i,$(wildcard $*.stderr),-o2 $(i))
 
 all :: $(RUNTESTS)