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 $<
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 $<
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)