Commit 6c32ee85 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Add TEST_HC_OPTS to every Makefile invocation of TEST_HC

In the testsuite there are numerous Makefiles that invoke $(TEST_HC).
But, unlike the tests invoked directly by the harness, they didn't pass
-dno-debug-output, or $(EXTRA_HC_OPTS).

This patch goes part-way towards the goal of making the two consistent:

* Almost all invocations in the Makefiles now go
    '$(TEST_HC)' $(TEST_HC_OPTS)

* In test.mk we initialise
     TEST_HC_OPTS = -dno-debug-output $(EXTRA_HC_OPTS)

Still to come (I don't know how to do these)

* The invocations of TEST_HC via cabal are not treated
  (eg cabal01, cabal04), and they should be

* TEST_HC_OPTS should probably be initialised the same way
  as the Python script computes the flags to pass to the
  TEST_HC that it calls directly
parent 16fb7aeb
...@@ -25,6 +25,10 @@ COMPILER = ghc ...@@ -25,6 +25,10 @@ COMPILER = ghc
CONFIGDIR = $(TOP)/config CONFIGDIR = $(TOP)/config
CONFIG = $(CONFIGDIR)/$(COMPILER) CONFIG = $(CONFIGDIR)/$(COMPILER)
# TEST_HC_OPTS is passed to every invocation of TEST_HC
# in nested Makefiles
TEST_HC_OPTS = -dno-debug-output $(EXTRA_HC_OPTS)
RUNTEST_OPTS = RUNTEST_OPTS =
$(eval $(call get-ghc-rts-field,WORDSIZE,Word size)) $(eval $(call get-ghc-rts-field,WORDSIZE,Word size))
......
...@@ -75,7 +75,7 @@ ghcpkg04 : ...@@ -75,7 +75,7 @@ ghcpkg04 :
$(LOCAL_GHC_PKG04) update --force test5.pkg >/dev/null 2>&1 $(LOCAL_GHC_PKG04) update --force test5.pkg >/dev/null 2>&1
$(LOCAL_GHC_PKG04) expose testpkg-1.2.3.4 >/dev/null 2>&1 $(LOCAL_GHC_PKG04) expose testpkg-1.2.3.4 >/dev/null 2>&1
@: # testpkg-1.2.3.4 and newtestpkg-2.0 are both exposed now @: # testpkg-1.2.3.4 and newtestpkg-2.0 are both exposed now
'$(TEST_HC)' -package-conf $(PKGCONF04) -c ghcpkg04.hs || true '$(TEST_HC)' $(TEST_HC_OPTS) -package-conf $(PKGCONF04) -c ghcpkg04.hs || true
# Test stacking of package.confs (also #2441) # Test stacking of package.confs (also #2441)
PKGCONF05a=local05a.package.conf PKGCONF05a=local05a.package.conf
...@@ -121,7 +121,7 @@ LOCAL_GHC_PKG1750 = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONF1750) ...@@ -121,7 +121,7 @@ LOCAL_GHC_PKG1750 = '$(GHC_PKG)' --no-user-package-conf -f $(PKGCONF1750)
# the patch "Change the command-line semantics for query commands" to # the patch "Change the command-line semantics for query commands" to
# ghc-pkg # ghc-pkg
echo "main = return ()" >1750.hs echo "main = return ()" >1750.hs
'$(TEST_HC)' -package-conf $(PKGCONF1750) -package 1750A 1750.hs || true '$(TEST_HC)' $(TEST_HC_OPTS) -package-conf $(PKGCONF1750) -package 1750A 1750.hs || true
PKGCONFSHADOW1=localshadow1.package.conf PKGCONFSHADOW1=localshadow1.package.conf
PKGCONFSHADOW2=localshadow2.package.conf PKGCONFSHADOW2=localshadow2.package.conf
...@@ -150,18 +150,18 @@ shadow: ...@@ -150,18 +150,18 @@ shadow:
# shadowdep-1-XXX to be unavailable: # shadowdep-1-XXX to be unavailable:
# #
@echo "should FAIL:" @echo "should FAIL:"
'$(TEST_HC)' -package-conf $(PKGCONFSHADOW1) -package-conf $(PKGCONFSHADOW2) -package shadowdep -c shadow.hs -fno-code || true '$(TEST_HC)' $(TEST_HC_OPTS) -package-conf $(PKGCONFSHADOW1) -package-conf $(PKGCONFSHADOW2) -package shadowdep -c shadow.hs -fno-code || true
# #
# Reversing the order of the package.conf files should fix the problem: # Reversing the order of the package.conf files should fix the problem:
# #
@echo "should SUCCEED:" @echo "should SUCCEED:"
'$(TEST_HC)' -package-conf $(PKGCONFSHADOW2) -package-conf $(PKGCONFSHADOW1) -package shadowdep -c shadow.hs -fno-code || true '$(TEST_HC)' $(TEST_HC_OPTS) -package-conf $(PKGCONFSHADOW2) -package-conf $(PKGCONFSHADOW1) -package shadowdep -c shadow.hs -fno-code || true
# #
# We can also fix the problem by using an explicit -package-id flag to # We can also fix the problem by using an explicit -package-id flag to
# specify a package we really want to use: # specify a package we really want to use:
# #
@echo "should SUCCEED:" @echo "should SUCCEED:"
'$(TEST_HC)' -package-conf $(PKGCONFSHADOW1) -package-conf $(PKGCONFSHADOW2) -package-id shadowdep-1-XXX -c shadow.hs -fno-code '$(TEST_HC)' $(TEST_HC_OPTS) -package-conf $(PKGCONFSHADOW1) -package-conf $(PKGCONFSHADOW2) -package-id shadowdep-1-XXX -c shadow.hs -fno-code
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
......
...@@ -3,5 +3,5 @@ include $(TOP)/mk/boilerplate.mk ...@@ -3,5 +3,5 @@ include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk include $(TOP)/mk/test.mk
2578: 2578:
'$(TEST_HC)' --make 2578 -fforce-recomp -v0 '$(TEST_HC)' $(TEST_HC_OPTS) --make 2578 -fforce-recomp -v0
...@@ -3,4 +3,4 @@ include $(TOP)/mk/boilerplate.mk ...@@ -3,4 +3,4 @@ include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk include $(TOP)/mk/test.mk
conc059_setup : conc059_setup :
'$(TEST_HC)' -c conc059.hs '$(TEST_HC)' $(TEST_HC_OPTS) -c conc059.hs
...@@ -4,5 +4,5 @@ include $(TOP)/mk/test.mk ...@@ -4,5 +4,5 @@ include $(TOP)/mk/test.mk
drvfail016: drvfail016:
$(RM) -f drvfail016.hi-boot drvfail016.o-boot $(RM) -f drvfail016.hi-boot drvfail016.o-boot
'$(TEST_HC)' -XGeneralizedNewtypeDeriving -c drvfail016.hs-boot; echo $$? '$(TEST_HC)' $(TEST_HC_OPTS) -XGeneralizedNewtypeDeriving -c drvfail016.hs-boot; echo $$?
...@@ -30,7 +30,7 @@ prep: ...@@ -30,7 +30,7 @@ prep:
cd p1 && ./setup build -v0 cd p1 && ./setup build -v0
prep.%: prep.%:
cd $* && "$(TEST_HC)" -v0 --make -o setup Setup.hs cd $* && "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make -o setup Setup.hs
cd $* && ./setup configure -v0 --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=../$(LOCAL_PKGCONF) cd $* && ./setup configure -v0 --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=../$(LOCAL_PKGCONF)
cd $* && ./setup build -v0 cd $* && ./setup build -v0
cd $* && ./setup register -v0 --inplace cd $* && ./setup register -v0 --inplace
......
...@@ -5,11 +5,11 @@ include $(TOP)/mk/test.mk ...@@ -5,11 +5,11 @@ include $(TOP)/mk/test.mk
# Test recompilation bug #1959, which failed in 6.8.1 (and earlier) # Test recompilation bug #1959, which failed in 6.8.1 (and earlier)
compile :: compile ::
'$(TEST_HC)' -c -O E.hs '$(TEST_HC)' $(TEST_HC_OPTS) -c -O E.hs
'$(TEST_HC)' -c -O D.hs '$(TEST_HC)' $(TEST_HC_OPTS) -c -O D.hs
'$(TEST_HC)' -c -O -funfolding-use-threshold=0 C.hs '$(TEST_HC)' $(TEST_HC_OPTS) -c -O -funfolding-use-threshold=0 C.hs
'$(TEST_HC)' -c -O B.hs '$(TEST_HC)' $(TEST_HC_OPTS) -c -O B.hs
'$(TEST_HC)' E.o D.o C.o B.o -o prog '$(TEST_HC)' $(TEST_HC_OPTS) E.o D.o C.o B.o -o prog
clean :: clean ::
rm -f *.o *.hi E.hs rm -f *.o *.hi E.hs
......
...@@ -20,7 +20,7 @@ OBJSUFFIX = .o ...@@ -20,7 +20,7 @@ OBJSUFFIX = .o
test011: test011:
$(RM) A011.hi $(RM) A011.hi
$(RM) A011$(OBJSUFFIX) $(RM) A011$(OBJSUFFIX)
"$(TEST_HC)" -c A011.hs "$(TEST_HC)" $(TEST_HC_OPTS) $(TEST_HC_OPTS) -c A011.hs
test -f A011.hi test -f A011.hi
test -f A011$(OBJSUFFIX) test -f A011$(OBJSUFFIX)
...@@ -28,14 +28,14 @@ test011: ...@@ -28,14 +28,14 @@ test011:
test012: test012:
$(RM) A012.hi $(RM) A012.hi
$(RM) A012$(OBJSUFFIX)oo $(RM) A012$(OBJSUFFIX)oo
"$(TEST_HC)" -c A012.hs -o A012$(OBJSUFFIX)oo "$(TEST_HC)" $(TEST_HC_OPTS) -c A012.hs -o A012$(OBJSUFFIX)oo
test -f A012$(OBJSUFFIX)oo test -f A012$(OBJSUFFIX)oo
# test -ohi # test -ohi
test013: test013:
$(RM) A013.xhi $(RM) A013.xhi
$(RM) A013$(OBJSUFFIX) $(RM) A013$(OBJSUFFIX)
"$(TEST_HC)" -c A013.hs -ohi A013.xhi "$(TEST_HC)" $(TEST_HC_OPTS) -c A013.hs -ohi A013.xhi
test -f A013.xhi test -f A013.xhi
# test -odir # test -odir
...@@ -43,7 +43,7 @@ test014: ...@@ -43,7 +43,7 @@ test014:
$(RM) -f A014.hi $(RM) -f A014.hi
$(RM) -rf obj014 $(RM) -rf obj014
mkdir obj014 mkdir obj014
"$(TEST_HC)" -c A014.hs -odir obj014 "$(TEST_HC)" $(TEST_HC_OPTS) -c A014.hs -odir obj014
test -f obj014/A014$(OBJSUFFIX) test -f obj014/A014$(OBJSUFFIX)
test -f A014.hi test -f A014.hi
...@@ -52,20 +52,20 @@ test015: ...@@ -52,20 +52,20 @@ test015:
$(RM) -f A015$(OBJSUFFIX) $(RM) -f A015$(OBJSUFFIX)
$(RM) -rf hi015 $(RM) -rf hi015
mkdir hi015 mkdir hi015
"$(TEST_HC)" -c A015.hs -hidir hi015 "$(TEST_HC)" $(TEST_HC_OPTS) -c A015.hs -hidir hi015
test -f A015$(OBJSUFFIX) test -f A015$(OBJSUFFIX)
test -f hi015/A015.hi test -f hi015/A015.hi
# test stub generation # test stub generation
test016: test016:
$(RM) F016.hi F016$(OBJSUFFIX) F016_stub.h $(RM) F016.hi F016$(OBJSUFFIX) F016_stub.h
"$(TEST_HC)" -c F016.hs "$(TEST_HC)" $(TEST_HC_OPTS) -c F016.hs
test -f F016_stub.h test -f F016_stub.h
# test -stubdir (filename differs from module name) # test -stubdir (filename differs from module name)
test017: test017:
$(RM) F017.hi F017$(OBJSUFFIX) $(RM) F017.hi F017$(OBJSUFFIX)
"$(TEST_HC)" -c F017.hs -stubdir stub017 "$(TEST_HC)" $(TEST_HC_OPTS) -c F017.hs -stubdir stub017
test -f stub017/TestStub017_stub.h test -f stub017/TestStub017_stub.h
# test -odir with stubs (filename differs from module name) # test -odir with stubs (filename differs from module name)
...@@ -73,18 +73,18 @@ test018: ...@@ -73,18 +73,18 @@ test018:
$(RM) -f F018.hi F018$(OBJSUFFIX) F018_stub.h $(RM) -f F018.hi F018$(OBJSUFFIX) F018_stub.h
$(RM) -rf obj018 $(RM) -rf obj018
mkdir obj018 mkdir obj018
"$(TEST_HC)" -c F018.hs -odir obj018 "$(TEST_HC)" $(TEST_HC_OPTS) -c F018.hs -odir obj018
# test for bug #3093 # test for bug #3093
test018a: test018a:
$(RM) -f F018a.hi F018a_stub.h *.obj.018 $(RM) -f F018a.hi F018a_stub.h *.obj.018
"$(TEST_HC)" -c F018a.hs -osuf obj.018 "$(TEST_HC)" $(TEST_HC_OPTS) -c F018a.hs -osuf obj.018
test -f F018a.obj.018 test -f F018a.obj.018
# test -outputdir # test -outputdir
test019: test019:
$(RM) -rf out019 $(RM) -rf out019
"$(TEST_HC)" -c F019.hs -outputdir out019 "$(TEST_HC)" $(TEST_HC_OPTS) -c F019.hs -outputdir out019
test -f out019/TestStub019.hi test -f out019/TestStub019.hi
test -f out019/TestStub019_stub.h test -f out019/TestStub019_stub.h
...@@ -94,7 +94,7 @@ test019: ...@@ -94,7 +94,7 @@ test019:
test021: test021:
$(RM) B021/C.hi $(RM) B021/C.hi
$(RM) B021/C$(OBJSUFFIX) $(RM) B021/C$(OBJSUFFIX)
"$(TEST_HC)" -c B021/C.hs "$(TEST_HC)" $(TEST_HC_OPTS) -c B021/C.hs
test -f B021/C.hi test -f B021/C.hi
test -f B021/C$(OBJSUFFIX) test -f B021/C$(OBJSUFFIX)
...@@ -102,14 +102,14 @@ test021: ...@@ -102,14 +102,14 @@ test021:
test022: test022:
$(RM) B022/C.hi $(RM) B022/C.hi
$(RM) B022/C$(OBJSUFFIX)oo $(RM) B022/C$(OBJSUFFIX)oo
"$(TEST_HC)" -c B022/C.hs -o B022/C$(OBJSUFFIX)oo "$(TEST_HC)" $(TEST_HC_OPTS) -c B022/C.hs -o B022/C$(OBJSUFFIX)oo
test -f B022/C$(OBJSUFFIX)oo test -f B022/C$(OBJSUFFIX)oo
# test -ohi # test -ohi
test023: test023:
$(RM) B023/C.xhi $(RM) B023/C.xhi
$(RM) B023/C$(OBJSUFFIX) $(RM) B023/C$(OBJSUFFIX)
"$(TEST_HC)" -c B023/C.hs -ohi B023/C.xhi "$(TEST_HC)" $(TEST_HC_OPTS) -c B023/C.hs -ohi B023/C.xhi
test -f B023/C.xhi test -f B023/C.xhi
# test -odir # test -odir
...@@ -117,7 +117,7 @@ test024: ...@@ -117,7 +117,7 @@ test024:
$(RM) -f B024/C.hi $(RM) -f B024/C.hi
$(RM) -rf obj024 $(RM) -rf obj024
mkdir obj024 mkdir obj024
"$(TEST_HC)" -c B024/C.hs -odir obj024 "$(TEST_HC)" $(TEST_HC_OPTS) -c B024/C.hs -odir obj024
test -f obj024/B024/C$(OBJSUFFIX) test -f obj024/B024/C$(OBJSUFFIX)
# test -odir with non-Haskell compilation # test -odir with non-Haskell compilation
...@@ -127,7 +127,7 @@ test024a: ...@@ -127,7 +127,7 @@ test024a:
mkdir B024a mkdir B024a
mkdir obj024a mkdir obj024a
echo >B024a/stub.c echo >B024a/stub.c
"$(TEST_HC)" -c B024a/stub.c -odir obj024a "$(TEST_HC)" $(TEST_HC_OPTS) -c B024a/stub.c -odir obj024a
test -f obj024a/B024a/stub$(OBJSUFFIX) test -f obj024a/B024a/stub$(OBJSUFFIX)
# test -hidir # test -hidir
...@@ -135,14 +135,14 @@ test025: ...@@ -135,14 +135,14 @@ test025:
$(RM) -rf hi025 $(RM) -rf hi025
mkdir hi025 mkdir hi025
$(RM) B025/C$(OBJSUFFIX) $(RM) B025/C$(OBJSUFFIX)
"$(TEST_HC)" -c B025/C.hs -hidir hi025 "$(TEST_HC)" $(TEST_HC_OPTS) -c B025/C.hs -hidir hi025
test -f hi025/B025/C.hi test -f hi025/B025/C.hi
# This is a hierarchical module that lives in a subdirectory. # This is a hierarchical module that lives in a subdirectory.
test026: test026:
$(RM) d026/P/Q.hi $(RM) d026/P/Q.hi
$(RM) d026/P/Q$(OBJSUFFIX) $(RM) d026/P/Q$(OBJSUFFIX)
"$(TEST_HC)" -c d026/P/Q.hs "$(TEST_HC)" $(TEST_HC_OPTS) -c d026/P/Q.hs
test -f d026/P/Q.hi test -f d026/P/Q.hi
test -f d026/P/Q$(OBJSUFFIX) test -f d026/P/Q$(OBJSUFFIX)
...@@ -150,7 +150,7 @@ test026: ...@@ -150,7 +150,7 @@ test026:
# -fvia-C, because we want to check that the .hc file can #include the stub.h # -fvia-C, because we want to check that the .hc file can #include the stub.h
test027: test027:
$(RM) B027/F.hi B027/F$(OBJSUFFIX) B027/F_stub.h $(RM) B027/F.hi B027/F$(OBJSUFFIX) B027/F_stub.h
"$(TEST_HC)" -c B027/F.hs -fno-warn-deprecated-flags -fvia-C "$(TEST_HC)" $(TEST_HC_OPTS) -c B027/F.hs -fno-warn-deprecated-flags -fvia-C
test -f B027/F_stub.h test -f B027/F_stub.h
# test -stubdir # test -stubdir
...@@ -158,7 +158,7 @@ test027: ...@@ -158,7 +158,7 @@ test027:
test028: test028:
$(RM) B028/F.hi B028/F$(OBJSUFFIX) $(RM) B028/F.hi B028/F$(OBJSUFFIX)
$(RM) stub028/B028/F_stub.h $(RM) stub028/B028/F_stub.h
"$(TEST_HC)" -c B028/F.hs -stubdir stub028 -fno-warn-deprecated-flags -fvia-C "$(TEST_HC)" $(TEST_HC_OPTS) -c B028/F.hs -stubdir stub028 -fno-warn-deprecated-flags -fvia-C
test -f stub028/B028/F_stub.h test -f stub028/B028/F_stub.h
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
...@@ -167,7 +167,7 @@ test028: ...@@ -167,7 +167,7 @@ test028:
test031: test031:
$(RM) A031.hi $(RM) A031.hi
$(RM) A031$(OBJSUFFIX) $(RM) A031$(OBJSUFFIX)
"$(TEST_HC)" -v0 --make A031.hs "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make A031.hs
test -f A031.hi test -f A031.hi
test -f A031$(OBJSUFFIX) test -f A031$(OBJSUFFIX)
...@@ -176,7 +176,7 @@ test032: ...@@ -176,7 +176,7 @@ test032:
$(RM) A032.hi $(RM) A032.hi
$(RM) -rf obj032 $(RM) -rf obj032
mkdir obj032 mkdir obj032
"$(TEST_HC)" -v0 --make A032.hs -odir obj032 "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make A032.hs -odir obj032
test -f obj032/A032$(OBJSUFFIX) test -f obj032/A032$(OBJSUFFIX)
# test -hidir # test -hidir
...@@ -184,19 +184,19 @@ test033: ...@@ -184,19 +184,19 @@ test033:
$(RM) -rf hi033 $(RM) -rf hi033
$(RM) A033$(OBJSUFFIX) $(RM) A033$(OBJSUFFIX)
mkdir hi033 mkdir hi033
"$(TEST_HC)" -v0 --make A033.hs -hidir hi033 "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make A033.hs -hidir hi033
test -f hi033/A033.hi test -f hi033/A033.hi
# test stub generation # test stub generation
test034: test034:
$(RM) F034.hi F034$(OBJSUFFIX) F034_stub.h $(RM) F034.hi F034$(OBJSUFFIX) F034_stub.h
"$(TEST_HC)" -v0 --make F034.hs "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make F034.hs
test -f F034_stub.h test -f F034_stub.h
# test -stubdir (filename differs from module name) # test -stubdir (filename differs from module name)
test035: test035:
$(RM) F035.hi F$(OBJSUFFIX) stub035/Stubs_stub.h $(RM) F035.hi F$(OBJSUFFIX) stub035/Stubs_stub.h
"$(TEST_HC)" -v0 --make F035.hs -stubdir stub035 "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make F035.hs -stubdir stub035
test -f stub035/TestStub035_stub.h test -f stub035/TestStub035_stub.h
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
...@@ -205,7 +205,7 @@ test035: ...@@ -205,7 +205,7 @@ test035:
test041: test041:
$(RM) B041/C.hi $(RM) B041/C.hi
$(RM) B041/C$(OBJSUFFIX) $(RM) B041/C$(OBJSUFFIX)
"$(TEST_HC)" -v0 --make B041/C.hs "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make B041/C.hs
test -f B041/C.hi test -f B041/C.hi
test -f B041/C$(OBJSUFFIX) test -f B041/C$(OBJSUFFIX)
...@@ -214,7 +214,7 @@ test042: ...@@ -214,7 +214,7 @@ test042:
$(RM) -rf obj042 $(RM) -rf obj042
mkdir obj042 mkdir obj042
$(RM) B042/C.hi $(RM) B042/C.hi
"$(TEST_HC)" -v0 --make B042/C.hs -odir obj042 "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make B042/C.hs -odir obj042
test -f obj042/B042/C$(OBJSUFFIX) test -f obj042/B042/C$(OBJSUFFIX)
# test -hidir # test -hidir
...@@ -222,20 +222,20 @@ test043: ...@@ -222,20 +222,20 @@ test043:
$(RM) -f B043/C$(OBJSUFFIX) $(RM) -f B043/C$(OBJSUFFIX)
$(RM) -rf hi043 $(RM) -rf hi043
mkdir hi043 mkdir hi043
"$(TEST_HC)" -v0 --make B043/C.hs -hidir hi043 "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make B043/C.hs -hidir hi043
test -f hi043/B043/C.hi test -f hi043/B043/C.hi
# test stub generation # test stub generation
test044: test044:
$(RM) B044/F.hi B044/F$(OBJSUFFIX) B044/F_stub.h $(RM) B044/F.hi B044/F$(OBJSUFFIX) B044/F_stub.h
"$(TEST_HC)" -v0 --make B044/F.hs "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make B044/F.hs
test -f B044/F_stub.h test -f B044/F_stub.h
# test -stubdir # test -stubdir
test045: test045:
$(RM) B045/F.hi B045/F$(OBJSUFFIX) $(RM) B045/F.hi B045/F$(OBJSUFFIX)
$(RM) stub045/B045/F_stub.h $(RM) stub045/B045/F_stub.h
"$(TEST_HC)" -v0 --make B045/F.hs -stubdir stub045 "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make B045/F.hs -stubdir stub045
test -f stub045/B045/F_stub.h test -f stub045/B045/F_stub.h
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
...@@ -246,7 +246,7 @@ test051: ...@@ -246,7 +246,7 @@ test051:
$(RM) d051_2/R/S$(OBJSUFFIX) $(RM) d051_2/R/S$(OBJSUFFIX)
$(RM) d051_1/P/Q.hi $(RM) d051_1/P/Q.hi
$(RM) d051_1/P/Q$(OBJSUFFIX) $(RM) d051_1/P/Q$(OBJSUFFIX)
"$(TEST_HC)" -v0 --make -id051_1 -id051_2 R.S "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make -id051_1 -id051_2 R.S
test -f d051_2/R/S.hi test -f d051_2/R/S.hi
test -f d051_2/R/S$(OBJSUFFIX) test -f d051_2/R/S$(OBJSUFFIX)
test -f d051_1/P/Q.hi test -f d051_1/P/Q.hi
...@@ -258,7 +258,7 @@ test052: ...@@ -258,7 +258,7 @@ test052:
$(RM) d052_1/P/Q.hi $(RM) d052_1/P/Q.hi
$(RM) -rf obj052 $(RM) -rf obj052
mkdir obj052 mkdir obj052
"$(TEST_HC)" -v0 --make -id052_1 -id052_2 -odir obj052 R.S "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make -id052_1 -id052_2 -odir obj052 R.S
test -f d052_2/R/S.hi test -f d052_2/R/S.hi
test -f obj052/R/S$(OBJSUFFIX) test -f obj052/R/S$(OBJSUFFIX)
test -f d052_1/P/Q.hi test -f d052_1/P/Q.hi
...@@ -270,7 +270,7 @@ test053: ...@@ -270,7 +270,7 @@ test053:
$(RM) d053_2/R/S$(OBJSUFFIX) $(RM) d053_2/R/S$(OBJSUFFIX)
$(RM) hi053/P/Q.hi $(RM) hi053/P/Q.hi
$(RM) d053_1/P/Q$(OBJSUFFIX) $(RM) d053_1/P/Q$(OBJSUFFIX)
"$(TEST_HC)" -v0 --make -id053_1 -id053_2 -hidir hi053 R.S "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make -id053_1 -id053_2 -hidir hi053 R.S
test -f hi053/R/S.hi test -f hi053/R/S.hi
test -f d053_2/R/S$(OBJSUFFIX) test -f d053_2/R/S$(OBJSUFFIX)
test -f hi053/P/Q.hi test -f hi053/P/Q.hi
...@@ -282,44 +282,44 @@ test053: ...@@ -282,44 +282,44 @@ test053:
# Test that -keep-s-files works with --make and -fvia-C # Test that -keep-s-files works with --make and -fvia-C
test061a: test061a:
$(RM) A061a.hi A061a$(OBJSUFFIX) A061a.s $(RM) A061a.hi A061a$(OBJSUFFIX) A061a.s
"$(TEST_HC)" -v0 --make -keep-s-files -fno-warn-deprecated-flags -fvia-C A061a.hs "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make -keep-s-files -fno-warn-deprecated-flags -fvia-C A061a.hs
test -f A061a.s test -f A061a.s
# Test that -keep-s-files works without --make # Test that -keep-s-files works without --make
test061b: test061b:
$(RM) A061b.hi A061b$(OBJSUFFIX) A061b.s $(RM) A061b.hi A061b$(OBJSUFFIX) A061b.s
"$(TEST_HC)" -c -keep-s-files -fno-warn-deprecated-flags -fvia-C A061b.hs "$(TEST_HC)" $(TEST_HC_OPTS) -c -keep-s-files -fno-warn-deprecated-flags -fvia-C A061b.hs
test -f A061b.s test -f A061b.s
# Test that -main-is works with --make # Test that -main-is works with --make
test062a: test062a:
$(RM) Hello062a.hs Hello062a.hi Hello062a$(OBJSUFFIX) Hello062a.hc hello062a $(RM) Hello062a.hs Hello062a.hi Hello062a$(OBJSUFFIX) Hello062a.hc hello062a
echo "module Hello062a where { hello062a = putStrLn \"ok\" }" >Hello062a.hs echo "module Hello062a where { hello062a = putStrLn \"ok\" }" >Hello062a.hs
"$(TEST_HC)" -v0 --make -main-is Hello062a.hello062a Hello062a -o hello062a "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make -main-is Hello062a.hello062a Hello062a -o hello062a
./hello062a ./hello062a
test062b: test062b:
$(RM) Hello062b.hs Hello062b.hi Hello062b$(OBJSUFFIX) Hello062b.hc hello062b $(RM) Hello062b.hs Hello062b.hi Hello062b$(OBJSUFFIX) Hello062b.hc hello062b
echo "module Hello062b where { main = putStrLn \"ok\" }" >Hello062b.hs echo "module Hello062b where { main = putStrLn \"ok\" }" >Hello062b.hs
"$(TEST_HC)" -v0 --make -main-is Hello062b Hello062b -o hello062b "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make -main-is Hello062b Hello062b -o hello062b
./hello062b ./hello062b
test062c: test062c:
$(RM) Hello062c.hs Hello062c.hi Hello062c$(OBJSUFFIX) Hello062c.hc hello062c $(RM) Hello062c.hs Hello062c.hi Hello062c$(OBJSUFFIX) Hello062c.hc hello062c
echo "module Main (hello062c) where { hello062c = putStrLn \"ok\" }" >Hello062c.hs echo "module Main (hello062c) where { hello062c = putStrLn \"ok\" }" >Hello062c.hs
"$(TEST_HC)" -v0 --make -main-is hello062c Hello062c.hs -o hello062c "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make -main-is hello062c Hello062c.hs -o hello062c
./hello062c ./hello062c
test062d: test062d:
$(RM) -rf B062d $(RM) -rf B062d
$(RM) hello062d $(RM) hello062d
mkdir B062d mkdir B062d
echo "module B062d.Hello062d (hello062d) where { hello062d = putStrLn \"ok\" }" >B062d/Hello062d.hs echo "module B062d.Hello062d (hello062d) where { hello062d = putStrLn \"ok\" }" >B062d/Hello062d.hs
"$(TEST_HC)" -v0 --make -main-is B062d.Hello062d.hello062d B062d/Hello062d.hs -o hello062d "$(TEST_HC)" $(TEST_HC_OPTS) -v0 --make -main-is B062d.Hello062d.hello062d B062d/Hello062d.hs -o hello062d
./hello062d ./hello062d