[project @ 1996-07-19 18:36:04 by partain]
[ghc-hetmet.git] / ghc / compiler / Jmakefile
index 766582e..7bc091c 100644 (file)
@@ -37,7 +37,7 @@ SuffixRule_c_o()
 */
 
 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
@@ -365,21 +365,21 @@ BACKSRCS_LHS NATIVEGEN_SRCS_LHS
 #  define loop_hi(f) CAT2(f,.hi)
 #endif
 
-DELOOP_HIs =           \
-utils/Ubiq.hi          \
-absCSyn/AbsCLoop.hi    \
-basicTypes/IdLoop.hi   \
-codeGen/CgLoop1.hi     \
-codeGen/CgLoop2.hi     \
-deSugar/DsLoop.hi      \
-hsSyn/HsLoop.hi                \
-nativeGen/NcgLoop.hi   \
-prelude/PrelLoop.hi    \
-rename/RnLoop.hi       \
-simplCore/SmplLoop.hi  \
-typecheck/TcMLoop.hi   \
-typecheck/TcLoop.hi    \
-types/TyLoop.hi
+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)
 
 /*
 \
@@ -402,9 +402,17 @@ ALLINTS=$(ALLSRCS_LHS:.lhs=.hi) $(ALLSRCS_HS:.hs=.hi)
 #endif
 
 #if GhcWithHscOptimised == YES
-#define __version_sensitive_flags -O /*-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" */
@@ -412,8 +420,7 @@ ALLINTS=$(ALLSRCS_LHS:.lhs=.hi) $(ALLSRCS_HS:.hs=.hi)
 #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
@@ -441,6 +448,10 @@ HC = $(GHC) /* uses the driver herein */
 
 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))
@@ -498,7 +509,7 @@ HaskellCompileWithExtraFlags_Recursive(module,isuf,o,-c,extra_flags)
 
 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,)
@@ -512,7 +523,7 @@ compile(absCSyn/AbsCSyn,lhs,if_ghc(-fno-omit-reexported-instances))
 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,)
@@ -586,7 +597,7 @@ compile(nativeGen/AsmRegAlloc,lhs,-I$(COMPINFO_DIR))
 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,)
@@ -617,7 +628,7 @@ compile(rename/RnHsSyn,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,)
@@ -702,7 +713,7 @@ 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,)
@@ -741,12 +752,10 @@ objs:: $(ALLOBJS)
 /* *** 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                \
@@ -807,7 +816,7 @@ UgenNeededHere(all depend)
 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))
@@ -874,6 +883,11 @@ compile(parser/U_ttype,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
 
 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 */