Tmp hacks to allow source-unchangedness to work in one-shot compilation.
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.102 2000/10/30 09:52:14 simonpj Exp $
+# $Id: Makefile,v 1.103 2000/10/30 11:18:14 sewardj Exp $
TOP = ..
include $(TOP)/mk/boilerplate.mk
TOP = ..
include $(TOP)/mk/boilerplate.mk
#-----------------------------------------------------------------------------
# Linking
#-----------------------------------------------------------------------------
# Linking
-SRC_LD_OPTS += -no-link-chk
+SRC_LD_OPTS += -no-link-chk -ldl
ifneq "$(GhcWithHscBuiltViaC)" "YES"
ifeq "$(GhcReportCompiles)" "YES"
ifneq "$(GhcWithHscBuiltViaC)" "YES"
ifeq "$(GhcReportCompiles)" "YES"
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
--- $Id: DriverPipeline.hs,v 1.10 2000/10/27 13:50:25 sewardj Exp $
+-- $Id: DriverPipeline.hs,v 1.11 2000/10/30 11:18:14 sewardj Exp $
-- only do this if we're eventually going to generate a .o file.
-- (ToDo: do when generating .hc files too?)
--
-- only do this if we're eventually going to generate a .o file.
-- (ToDo: do when generating .hc files too?)
--
- -- Setting source_unchanged to "-fsource_unchanged" means that M.o seems
+ -- Setting source_unchanged to "-fsource-unchanged" means that M.o seems
-- to be up to date wrt M.hs; so no need to recompile unless imports have
-- changed (which the compiler itself figures out).
-- Setting source_unchanged to "" tells the compiler that M.o is out of
-- to be up to date wrt M.hs; so no need to recompile unless imports have
-- changed (which the compiler itself figures out).
-- Setting source_unchanged to "" tells the compiler that M.o is out of
-- run the compiler!
pcs <- initPersistentCompilerState
result <- hscMain dyn_flags{ hscOutName = output_fn }
-- run the compiler!
pcs <- initPersistentCompilerState
result <- hscMain dyn_flags{ hscOutName = output_fn }
+ (source_unchanged == "-fsource-unchanged")
summary
Nothing -- no iface
emptyModuleEnv -- HomeSymbolTable
summary
Nothing -- no iface
emptyModuleEnv -- HomeSymbolTable
-- run the compiler
hsc_result <- hscMain dyn_flags{ hscOutName = output_fn }
-- run the compiler
hsc_result <- hscMain dyn_flags{ hscOutName = output_fn }
+ (panic "compile:source_unchanged")
summary old_iface hst hit pcs
case hsc_result of {
summary old_iface hst hit pcs
case hsc_result of {
+ -> Bool -- source unchanged?
-> ModSummary -- summary, including source filename
-> Maybe ModIface -- old interface, if available
-> HomeSymbolTable -- for home module ModDetails
-> ModSummary -- summary, including source filename
-> Maybe ModIface -- old interface, if available
-> HomeSymbolTable -- for home module ModDetails
-> PersistentCompilerState -- IN: persistent compiler state
-> IO HscResult
-> PersistentCompilerState -- IN: persistent compiler state
-> IO HscResult
-hscMain dflags summary maybe_old_iface hst hit pcs
+hscMain dflags source_unchanged summary maybe_old_iface hst hit pcs
= do {
-- ????? source_unchanged :: Bool -- extracted from summary?
= do {
-- ????? source_unchanged :: Bool -- extracted from summary?
- let source_unchanged = trace "WARNING: source_unchanged?!" False
- ;
+ --let source_unchanged = trace "WARNING: source_unchanged?!" False
+ --;
putStrLn "checking old iface ...";
(pcs_ch, check_errs, (recomp_reqd, maybe_checked_iface))
<- checkOldIface dflags hit hst pcs (ms_mod summary)
putStrLn "checking old iface ...";
(pcs_ch, check_errs, (recomp_reqd, maybe_checked_iface))
<- checkOldIface dflags hit hst pcs (ms_mod summary)