From: panne Date: Mon, 12 Jun 2000 16:20:31 +0000 (+0000) Subject: [project @ 2000-06-12 16:20:31 by panne] X-Git-Tag: Approximately_9120_patches~4278 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=93add29b30dc2710ae8e0ed101bd9b5a30d2d612;p=ghc-hetmet.git [project @ 2000-06-12 16:20:31 by panne] Only add -o? FOO.stdBAR when it exists. I'm not sure if this foreach-hack is the most elegant way to go though... --- diff --git a/ghc/tests/mk/should_compile.mk b/ghc/tests/mk/should_compile.mk index d0b7e1f..929ced2 100644 --- a/ghc/tests/mk/should_compile.mk +++ b/ghc/tests/mk/should_compile.mk @@ -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 $< diff --git a/ghc/tests/mk/should_fail.mk b/ghc/tests/mk/should_fail.mk index ec39011..17b10e6 100644 --- a/ghc/tests/mk/should_fail.mk +++ b/ghc/tests/mk/should_fail.mk @@ -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 $< diff --git a/ghc/tests/mk/should_run.mk b/ghc/tests/mk/should_run.mk index 7c58508..eb0336b 100644 --- a/ghc/tests/mk/should_run.mk +++ b/ghc/tests/mk/should_run.mk @@ -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)