*/
SuffixRules_flexish()
SuffixRule_c_o()
-LitSuffixRule(.lprl,.prl) /* for makeSymbolList.prl */
+
+.SUFFIXES: .lhi
+.lhi.hi:
+ $(RM) $@
+ $(GHC_UNLIT) $< $@
+ @chmod 444 $@
/* assume ALL source is in subdirectories one level below
they don't have Jmakefiles; this Jmakefile controls everything
*/
SUBDIR_LIST = \ /* here they are, colon separated (for mkdependHS) */
-utils:basicTypes:types:hsSyn:prelude:envs:rename:typecheck:deSugar:coreSyn:specialise:simplCore:stranal:stgSyn:simplStg:codeGen:nativeGen:absCSyn:main:reader:profiling:deforest:parser
+utils:basicTypes:types:hsSyn:prelude:rename:typecheck:deSugar:coreSyn:specialise:simplCore:stranal:stgSyn:simplStg:codeGen:nativeGen:absCSyn:main:reader:profiling:deforest:parser
#ifdef MainIncludeDir
MAIN_INCLUDE_DIR=MainIncludeDir
stranal/SaLib.lhs \
stranal/SaAbsInt.lhs \
stranal/WwLib.lhs \
-stranal/WorkWrap.lhs \
-\
-profiling/SCCauto.lhs DEFORESTER_SRCS_LHS
+stranal/WorkWrap.lhs DEFORESTER_SRCS_LHS
#define STG_SRCS_LHS \
stgSyn/CoreToStg.lhs \
STG_SRCS_LHS \
BACKSRCS_LHS NATIVEGEN_SRCS_LHS
+#if GhcBuilderVersion >= 200
+# define loop_hi(f) CAT3(f,_1_3,.hi)
+#else
+# define loop_hi(f) CAT2(f,.hi)
+#endif
+
+DELOOP_HIs = \
+loop_hi(utils/Ubiq) \
+loop_hi(absCSyn/AbsCLoop) \
+loop_hi(basicTypes/IdLoop) \
+loop_hi(codeGen/CgLoop1) \
+loop_hi(codeGen/CgLoop2) \
+loop_hi(deSugar/DsLoop) \
+loop_hi(hsSyn/HsLoop) \
+loop_hi(nativeGen/NcgLoop) \
+loop_hi(prelude/PrelLoop) \
+loop_hi(rename/RnLoop) \
+loop_hi(simplCore/SmplLoop) \
+loop_hi(typecheck/TcMLoop) \
+loop_hi(typecheck/TcLoop) \
+loop_hi(types/TyLoop)
+
/*
\
*/
#endif
#if GhcWithHscOptimised == YES
-#define __version_sensitive_flags -DUSE_ATTACK_PRAGMAS -fshow-pragma-name-errs -fomit-reexported-instances -fshow-import-specs
+# if GhcBuilderVersion >= 200
+# define __version_sensitive_flags -O -fshow-import-specs
+# else
+# define __version_sensitive_flags -O -fshow-import-specs -fomit-derived-read -fomit-reexported-instances
+# endif
#else
-#define __version_sensitive_flags -fomit-reexported-instances
+# if GhcBuilderVersion >= 200
+# define __version_sensitive_flags /*none*/
+# else
+# define __version_sensitive_flags -fomit-derived-read -fomit-reexported-instances
+# endif
#endif
/* avoid use of AllProjectsHcOpts; then put in HcMaxHeapFlag "by hand" */
#define AllProjectsHcOpts /**/
HC_OPTS = -cpp HcMaxHeapFlag -fhaskell-1.3 -fglasgow-exts -DCOMPILING_GHC \
- -fomit-derived-read \
- -I. -i$(SUBDIR_LIST) \
+ -Rghc-timing -I. -i$(SUBDIR_LIST) \
use_DDEBUG __version_sensitive_flags __omit_ncg_maybe __omit_deforester_flag
#undef __version_sensitive_flags
BuildPgmFromHaskellModules(hsc,$(ALLOBJS) parser/hsclink.o parser/hschooks.o,,libhsp.a)
+parser/hschooks.o : parser/hschooks.c
+ $(RM) $@
+ $(HC) -c -o $@ $(HCFLAGS) parser/hschooks.c
+
#if DoInstallGHCSystem == YES
MakeDirectories(install, $(INSTLIBDIR_GHC))
InstallBinaryTarget(hsc,$(INSTLIBDIR_GHC))
/* OK, here we go: */
-utils/Ubiq.hi : utils/Ubiq.lhi
- $(GHC_UNLIT) utils/Ubiq.lhi utils/Ubiq.hi
-
-absCSyn/AbsCLoop.hi : absCSyn/AbsCLoop.lhi
- $(GHC_UNLIT) absCSyn/AbsCLoop.lhi absCSyn/AbsCLoop.hi
-basicTypes/IdLoop.hi : basicTypes/IdLoop.lhi
- $(GHC_UNLIT) basicTypes/IdLoop.lhi basicTypes/IdLoop.hi
-codeGen/CgLoop1.hi : codeGen/CgLoop1.lhi
- $(GHC_UNLIT) codeGen/CgLoop1.lhi codeGen/CgLoop1.hi
-codeGen/CgLoop2.hi : codeGen/CgLoop2.lhi
- $(GHC_UNLIT) codeGen/CgLoop2.lhi codeGen/CgLoop2.hi
-deSugar/DsLoop.hi : deSugar/DsLoop.lhi
- $(GHC_UNLIT) deSugar/DsLoop.lhi deSugar/DsLoop.hi
-hsSyn/HsLoop.hi : hsSyn/HsLoop.lhi
- $(GHC_UNLIT) hsSyn/HsLoop.lhi hsSyn/HsLoop.hi
-nativeGen/NcgLoop.hi : nativeGen/NcgLoop.lhi
- $(GHC_UNLIT) nativeGen/NcgLoop.lhi nativeGen/NcgLoop.hi
-prelude/PrelLoop.hi : prelude/PrelLoop.lhi
- $(GHC_UNLIT) prelude/PrelLoop.lhi prelude/PrelLoop.hi
-rename/RnLoop.hi : rename/RnLoop.lhi
- $(GHC_UNLIT) rename/RnLoop.lhi rename/RnLoop.hi
-simplCore/SmplLoop.hi : simplCore/SmplLoop.lhi
- $(GHC_UNLIT) simplCore/SmplLoop.lhi simplCore/SmplLoop.hi
-typecheck/TcMLoop.hi : typecheck/TcMLoop.lhi
- $(GHC_UNLIT) typecheck/TcMLoop.lhi typecheck/TcMLoop.hi
-typecheck/TcLoop.hi : typecheck/TcLoop.lhi
- $(GHC_UNLIT) typecheck/TcLoop.lhi typecheck/TcLoop.hi
-types/TyLoop.hi : types/TyLoop.lhi
- $(GHC_UNLIT) types/TyLoop.lhi types/TyLoop.hi
-
rename/ParseIface.hs : rename/ParseIface.y
$(RM) rename/ParseIface.hs rename/ParseIface.hinfo
- happy -g -i rename/ParseIface.hinfo rename/ParseIface.y
+ happy -g rename/ParseIface.y
@chmod 444 rename/ParseIface.hs
compile(absCSyn/AbsCUtils,lhs,)
compile(hsSyn/HsBinds,lhs,)
compile(hsSyn/HsCore,lhs,)
compile(hsSyn/HsDecls,lhs,)
-compile(hsSyn/HsExpr,lhs,)
+compile(hsSyn/HsExpr,lhs,if_ghc(-K2m))
compile(hsSyn/HsImpExp,lhs,)
compile(hsSyn/HsLit,lhs,)
compile(hsSyn/HsMatches,lhs,)
compile(nativeGen/MachCode,lhs,-I$(NATIVEGEN_DIR))
compile(nativeGen/MachMisc,lhs,-I$(NATIVEGEN_DIR))
compile(nativeGen/MachRegs,lhs,-I$(NATIVEGEN_DIR))
-compile(nativeGen/PprMach,lhs,-I$(NATIVEGEN_DIR))
+compile(nativeGen/PprMach,lhs,-I$(NATIVEGEN_DIR) if_ghc(-K2m))
compile(nativeGen/RegAllocInfo,lhs,-I$(NATIVEGEN_DIR))
compile(nativeGen/Stix,lhs,)
compile(nativeGen/StixInfo,lhs,)
compile(prelude/TysPrim,lhs,)
compile(prelude/TysWiredIn,lhs,)
-compile(profiling/SCCauto,lhs,)
compile(profiling/SCCfinal,lhs,)
compile(profiling/CostCentre,lhs,)
compile(reader/ReadPrefix,lhs,if_ghc(-fvia-C -I$(COMPINFO_DIR) -Iparser '-#include"hspincl.h"'))
compile(reader/RdrHsSyn,lhs,)
-compile(rename/ParseIface,hs,)
+compile(rename/ParseIface,hs,-Onot) /* sigh */
compile(rename/ParseUtils,lhs,)
compile(rename/RnHsSyn,lhs,)
-compile(rename/RnMonad,lhs,)
+compile(rename/RnMonad,lhs,if_ghc(-fvia-C))
compile(rename/Rename,lhs,)
compile(rename/RnNames,lhs,)
-compile(rename/RnSource,lhs,)
+compile(rename/RnSource,lhs,-H12m)
compile(rename/RnBinds,lhs,)
compile(rename/RnExpr,lhs,)
compile(rename/RnIfaces,lhs,)
compile(deforest/TreelessForm,lhs,)
#endif
-compile(specialise/Specialise,lhs,)
+compile(specialise/Specialise,lhs,-H12m if_ghc(-Onot)) /* -Onot for compile-space reasons */
compile(specialise/SpecEnv,lhs,)
compile(specialise/SpecUtils,lhs,)
compile(typecheck/TcInstUtil,lhs,)
compile(typecheck/TcMatches,lhs,)
compile(typecheck/TcModule,lhs,)
-compile(typecheck/TcMonad,lhs,)
+compile(typecheck/TcMonad,lhs,if_ghc(-fvia-C))
compile(typecheck/TcKind,lhs,)
compile(typecheck/TcType,lhs,)
compile(typecheck/TcEnv,lhs,)
compile(typecheck/TcMonoType,lhs,)
compile(typecheck/TcPat,lhs,)
-compile(typecheck/TcPragmas,lhs,)
+/*compile(typecheck/TcPragmas,lhs,)*/
compile(typecheck/TcSimplify,lhs,)
compile(typecheck/TcTyClsDecls,lhs,)
compile(typecheck/TcTyDecls,lhs,)
compile(types/Class,lhs,)
compile(types/Kind,lhs,)
-compile(types/PprType,lhs,)
+compile(types/PprType,lhs,if_ghc26(-Onot)) /* avoid a 0.26 bug */
compile(types/TyCon,lhs,)
compile(types/TyVar,lhs,)
compile(types/Usage,lhs,)
/* *** parser ************************************************* */
YACC_OPTS = -d
-CC_OPTS = -Iparser -I. -I$(COMPINFO_DIR) -DUGEN_DEBUG=1 /*-DHSP_DEBUG=1*/ -g
+CC_OPTS = -Iparser -I. -I$(COMPINFO_DIR) /*-DUGEN_DEBUG=1*/ /*-DHSP_DEBUG=1*/
/* add to these on the command line with, e.g., EXTRA_YACC_OPTS=-v */
-XCOMM D_DEBUG = -DDEBUG
-
CPP_DEFINES = $(D_DEBUG)
HSP_SRCS_C = parser/constr.c \
NormalLibraryTarget(hsp,$(HSP_OBJS_O))
/* We need the hsp program for hstags to work! */
-BuildPgmFromCFiles(hsp,parser/printtree.o parser/main.o,,libhsp.a)
+/* BuildPgmFromCFiles(hsp,parser/printtree.o parser/main.o,,libhsp.a) */
#if DoInstallGHCSystem == YES
-MakeDirectories(install, $(INSTLIBDIR_GHC))
-InstallBinaryTarget(hsp,$(INSTLIBDIR_GHC))
+/* MakeDirectories(install, $(INSTLIBDIR_GHC)) */
+/* InstallBinaryTarget(hsp,$(INSTLIBDIR_GHC)) */
#endif /* DoInstall... */
-YaccRunWithExpectMsg(parser/hsparser,14,0)
-
-UgenTarget(parser/constr)
-UgenTarget(parser/binding)
-UgenTarget(parser/pbinding)
-UgenTarget(parser/entidt)
-UgenTarget(parser/list)
-UgenTarget(parser/literal)
-UgenTarget(parser/maybe)
-UgenTarget(parser/either)
-UgenTarget(parser/qid)
-UgenTarget(parser/tree)
-UgenTarget(parser/ttype)
+YaccRunWithExpectMsg(parser/hsparser,12,0)
+
+parser/hslexer.o : parser/hslexer.c parser/hsparser.tab.h
+ $(RM) $@
+ $(CC) $(CFLAGS) -c $<
+ @if [ \( $(@D) != '.' \) -a \( $(@D) != './' \) ] ; then echo mv $(@F) $@ ; mv $(@F) $@ ; else exit 0 ; fi
+
+UgenTarget(parser,constr)
+UgenTarget(parser,binding)
+UgenTarget(parser,pbinding)
+UgenTarget(parser,entidt)
+UgenTarget(parser,list)
+UgenTarget(parser,literal)
+UgenTarget(parser,maybe)
+UgenTarget(parser,either)
+UgenTarget(parser,qid)
+UgenTarget(parser,tree)
+UgenTarget(parser,ttype)
UGENS_C = parser/constr.c \
parser/binding.c \
DEPSRCS = $(ALLSRCS_LHS) $(ALLSRCS_HS)
+#if GhcBuilderVersion < 200
+/* this will go away soon enough... (once 1.3 is settled in) */
+MKDEPENDHS = mkdependHS-1.2
+#endif
+
#if GhcWithHscBuiltViaC == NO
MKDEPENDHS_OPTS= -I$(MAIN_INCLUDE_DIR) -I$(COMPINFO_DIR) -x HsVersions.h
#else /* booting from .hc */
#if HaskellCompilerType != HC_USE_HC_FILES
/* otherwise, the dependencies jeopardize our .hc files --
which are all we have! */
+depend :: $(DELOOP_HIs)
HaskellDependTarget( $(DEPSRCS) )
#endif