[project @ 1996-04-30 17:34:02 by partain]
[ghc-hetmet.git] / ghc / compiler / Jmakefile
index 1d16758..c54b9b5 100644 (file)
@@ -59,9 +59,7 @@ NATIVEGEN_DIR=$(TOP_PWD)/$(CURRENT_DIR)/nativeGen
 parser/U_constr.hs     \
 parser/U_binding.hs    \
 parser/U_pbinding.hs   \
-parser/U_coresyn.hs    \
 parser/U_entidt.hs     \
-parser/U_hpragma.hs    \
 parser/U_list.hs       \
 parser/U_literal.hs    \
 parser/U_maybe.hs      \
@@ -76,7 +74,6 @@ parser/U_ttype.hs
 parser/UgenUtil.lhs    \
 parser/UgenAll.lhs     \
 reader/ReadPrefix.lhs  \
-reader/ReadPragmas.lhs \
 \
 reader/PrefixSyn.lhs   \
 reader/PrefixToHs.lhs  \
@@ -95,17 +92,17 @@ hsSyn/HsTypes.lhs \
 hsSyn/HsSyn.lhs
 
 #define NOT_SO_BASICSRCS_LHS   \
-basicTypes/Unique.lhs          \
-basicTypes/UniqSupply.lhs      \
-basicTypes/ProtoName.lhs       \
-basicTypes/Name.lhs            \
-basicTypes/NameTypes.lhs       \
-basicTypes/SrcLoc.lhs          \
+basicTypes/FieldLabel.lhs      \
 basicTypes/Id.lhs              \
 basicTypes/IdInfo.lhs          \
 basicTypes/IdUtils.lhs         \
-basicTypes/PragmaInfo.lhs      \
 basicTypes/Literal.lhs         \
+basicTypes/Name.lhs            \
+basicTypes/PprEnv.lhs          \
+basicTypes/PragmaInfo.lhs      \
+basicTypes/SrcLoc.lhs          \
+basicTypes/UniqSupply.lhs      \
+basicTypes/Unique.lhs          \
 \
 types/Class.lhs                        \
 types/Kind.lhs                 \
@@ -117,20 +114,20 @@ types/Type.lhs                    \
 \
 specialise/SpecEnv.lhs
 
+#define RENAMERSRCS_HS \
+rename/ParseIface.hs
 
 #define RENAMERSRCS_LHS \
-rename/RnPass1.lhs \
-rename/RnPass2.lhs \
-rename/RnPass3.lhs \
-rename/RnPass4.lhs \
+rename/ParseUtils.lhs \
 rename/RnHsSyn.lhs \
-rename/RnUtils.lhs \
-rename/RnMonad12.lhs \
-rename/RnMonad3.lhs \
-rename/RnMonad4.lhs \
-rename/RnBinds4.lhs \
-rename/RnExpr4.lhs \
-rename/Rename.lhs
+rename/RnMonad.lhs \
+rename/Rename.lhs \
+rename/RnNames.lhs \
+rename/RnSource.lhs \
+rename/RnBinds.lhs \
+rename/RnExpr.lhs \
+rename/RnIfaces.lhs \
+rename/RnUtils.lhs
 
 #define TCSRCS_LHS \
 typecheck/TcHsSyn.lhs \
@@ -157,7 +154,6 @@ typecheck/TcPat.lhs \
 typecheck/TcSimplify.lhs \
 typecheck/TcTyClsDecls.lhs \
 typecheck/TcTyDecls.lhs \
-typecheck/Typecheck.lhs \
 typecheck/Unify.lhs
 
 /*
@@ -181,6 +177,22 @@ deSugar/DsUtils.lhs \
 coreSyn/CoreLift.lhs \
 coreSyn/CoreLint.lhs
 
+#if GhcWithDeforester != YES
+#define __omit_deforester_flag -DOMIT_DEFORESTER=1
+#define DEFORESTER_SRCS_LHS /*none*/
+#else
+#define __omit_deforester_flag /*nope*/
+#define DEFORESTER_SRCS_LHS \
+deforest/DefSyn.lhs \
+deforest/Core2Def.lhs \
+deforest/Def2Core.lhs \
+deforest/Deforest.lhs \
+deforest/DefUtils.lhs \
+deforest/DefExpr.lhs \
+deforest/Cyclic.lhs \
+deforest/TreelessForm.lhs
+#endif /* GhcWithDeforester */
+
 #define SIMPL_SRCS_LHS \
 coreSyn/AnnCoreSyn.lhs \
 coreSyn/FreeVars.lhs \
@@ -215,31 +227,14 @@ stranal/SaAbsInt.lhs \
 stranal/WwLib.lhs \
 stranal/WorkWrap.lhs \
 \
-profiling/SCCauto.lhs \
-profiling/SCCfinal.lhs \
-profiling/CostCentre.lhs
-
-#if GhcWithDeforester != YES
-#define __omit_deforester_flag -DOMIT_DEFORESTER=1
-#define DEFORESTER_SRCS_LHS /*none*/
-#else
-#define __omit_deforester_flag /*nope*/
-#define DEFORESTER_SRCS_LHS \
-deforest/DefSyn.lhs \
-deforest/Core2Def.lhs \
-deforest/Def2Core.lhs \
-deforest/Deforest.lhs \
-deforest/DefUtils.lhs \
-deforest/DefExpr.lhs \
-deforest/Cyclic.lhs \
-deforest/TreelessForm.lhs
-#endif /* GhcWithDeforester */
+profiling/SCCauto.lhs DEFORESTER_SRCS_LHS
 
-#define BACKSRCS_LHS \
+#define STG_SRCS_LHS \
 stgSyn/CoreToStg.lhs \
 stgSyn/StgSyn.lhs \
 stgSyn/StgUtils.lhs \
 stgSyn/StgLint.lhs \
+profiling/SCCfinal.lhs \
 \
 simplStg/SatStgRhs.lhs \
 simplStg/LambdaLift.lhs \
@@ -248,8 +243,9 @@ simplStg/UpdAnal.lhs \
 simplStg/StgStats.lhs \
 simplStg/StgSATMonad.lhs \
 simplStg/StgSAT.lhs \
-simplStg/SimplStg.lhs \
-\
+simplStg/SimplStg.lhs
+
+#define BACKSRCS_LHS \
 absCSyn/AbsCUtils.lhs \
 absCSyn/AbsCSyn.lhs \
 absCSyn/CLabel.lhs \
@@ -284,36 +280,21 @@ codeGen/CgUpdate.lhs
 # define NATIVEGEN_SRCS_LHS /*none*/
 #else
 # define __omit_ncg_maybe /*none*/
-# if i386_TARGET_ARCH
-# define __machdep_nativegen_lhs \
-nativeGen/I386Desc.lhs \
-nativeGen/I386Code.lhs \
-nativeGen/I386Gen.lhs
-# endif
-# if sparc_TARGET_ARCH
-# define __machdep_nativegen_lhs \
-nativeGen/SparcDesc.lhs \
-nativeGen/SparcCode.lhs \
-nativeGen/SparcGen.lhs
-# endif
-# if alpha_TARGET_ARCH
-# define __machdep_nativegen_lhs \
-nativeGen/AlphaDesc.lhs \
-nativeGen/AlphaCode.lhs \
-nativeGen/AlphaGen.lhs
-# endif
 
 # define NATIVEGEN_SRCS_LHS \
 nativeGen/AbsCStixGen.lhs \
 nativeGen/AsmCodeGen.lhs \
 nativeGen/AsmRegAlloc.lhs \
-nativeGen/MachDesc.lhs \
+nativeGen/MachCode.lhs \
+nativeGen/MachMisc.lhs \
+nativeGen/MachRegs.lhs \
+nativeGen/PprMach.lhs \
+nativeGen/RegAllocInfo.lhs \
 nativeGen/Stix.lhs \
 nativeGen/StixInfo.lhs \
 nativeGen/StixInteger.lhs \
 nativeGen/StixPrim.lhs \
-nativeGen/StixMacro.lhs \
-__machdep_nativegen_lhs /*arch-specific ones */
+nativeGen/StixMacro.lhs
 #endif
 
 #define UTILSRCS_LHS \
@@ -337,14 +318,10 @@ utils/Unpretty.lhs \
 utils/Util.lhs
 
 #define MAIN_SRCS_LHS \
-main/MainMonad.lhs \
 main/CmdLineOpts.lhs \
 main/ErrUtils.lhs \
-main/Main.lhs
-
-/* 
 main/MkIface.lhs \
-*/
+main/Main.lhs
 
 #define VBASICSRCS_LHS \
 prelude/PrelMods.lhs \
@@ -365,24 +342,23 @@ profiling/CostCentre.lhs \
 simplCore/BinderInfo.lhs \
 simplCore/MagicUFs.lhs
 
-ALLSRCS_HS = READERSRCS_HS
+ALLSRCS_HS = READERSRCS_HS RENAMERSRCS_HS
 ALLSRCS_LHS = /* all pieces of the compiler */ \
-VBASICSRCS_LHS \
-NOT_SO_BASICSRCS_LHS \
-UTILSRCS_LHS \
-MAIN_SRCS_LHS \
-READERSRCS_LHS \
-RENAMERSRCS_LHS \
-TCSRCS_LHS \
-DSSRCS_LHS
+VBASICSRCS_LHS         \
+NOT_SO_BASICSRCS_LHS   \
+UTILSRCS_LHS           \
+MAIN_SRCS_LHS          \
+READERSRCS_LHS                 \
+RENAMERSRCS_LHS                \
+TCSRCS_LHS             \
+DSSRCS_LHS             \
+SIMPL_SRCS_LHS                 \
+STG_SRCS_LHS           \
+BACKSRCS_LHS NATIVEGEN_SRCS_LHS
 
 /*
-SIMPL_SRCS_LHS
-BACKSRCS_LHS
+\
 */
-
-/* 
-NATIVEGEN_SRCS_LHS DEFORESTER_SRCS_LHS */
 /* NB: all the ones that may be empty (e.g., NATIVEGEN_SRCS_LHS)
        need to be on the last line.
 */
@@ -406,13 +382,6 @@ ALLINTS=$(ALLSRCS_LHS:.lhs=.hi) $(ALLSRCS_HS:.hs=.hi)
 #define __version_sensitive_flags -fomit-reexported-instances
 #endif
 
-#if GhcWithRegisterised == NO
-    /* doing a raw boot from .hc files, presumably */
-#define __unreg_opts_maybe -O -unregisterised
-#else
-#define __unreg_opts_maybe /*none*/
-#endif
-
 /* avoid use of AllProjectsHcOpts; then put in HcMaxHeapFlag "by hand" */
 #undef  AllProjectsHcOpts
 #define AllProjectsHcOpts /**/
@@ -420,10 +389,9 @@ ALLINTS=$(ALLSRCS_LHS:.lhs=.hi) $(ALLSRCS_HS:.hs=.hi)
 HC_OPTS = -cpp HcMaxHeapFlag -fhaskell-1.3 -fglasgow-exts -DCOMPILING_GHC \
        -fomit-derived-read \
        -I. -i$(SUBDIR_LIST) \
-       use_DDEBUG __version_sensitive_flags __unreg_opts_maybe __omit_ncg_maybe
+       use_DDEBUG __version_sensitive_flags __omit_ncg_maybe __omit_deforester_flag
 
 #undef __version_sensitive_flags
-#undef __unreg_opts_maybe
 #undef __omit_ncg_maybe
 #undef __omit_deforester_flag
 
@@ -506,18 +474,22 @@ HaskellCompileWithExtraFlags_Recursive(module,isuf,o,-c,extra_flags)
 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
-basicTypes/NameLoop.hi : basicTypes/NameLoop.lhi
-       $(GHC_UNLIT) basicTypes/NameLoop.lhi basicTypes/NameLoop.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
-reader/RdrLoop.hi : reader/RdrLoop.lhi
-       $(GHC_UNLIT) reader/RdrLoop.lhi reader/RdrLoop.hi
 rename/RnLoop.hi : rename/RnLoop.lhi
        $(GHC_UNLIT) rename/RnLoop.lhi rename/RnLoop.hi
 simplCore/SmplLoop.hi : simplCore/SmplLoop.lhi
@@ -529,6 +501,11 @@ typecheck/TcLoop.hi : typecheck/TcLoop.lhi
 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
+       @chmod 444 rename/ParseIface.hs
+
 compile(absCSyn/AbsCUtils,lhs,)
 compile(absCSyn/CStrings,lhs,)
 compile(absCSyn/CLabel,lhs,)
@@ -549,14 +526,14 @@ compile(hsSyn/HsPragmas,lhs,)
 compile(hsSyn/HsTypes,lhs,)
 compile(hsSyn/HsSyn,lhs,if_ghc(-fno-omit-reexported-instances))
 
+compile(basicTypes/FieldLabel,lhs,)
 compile(basicTypes/Id,lhs,)
 compile(basicTypes/IdInfo,lhs,-K2m)
 compile(basicTypes/IdUtils,lhs,)
 compile(basicTypes/Literal,lhs,)
 compile(basicTypes/Name,lhs,)
-compile(basicTypes/NameTypes,lhs,)
+compile(basicTypes/PprEnv,lhs,)
 compile(basicTypes/PragmaInfo,lhs,)
-compile(basicTypes/ProtoName,lhs,)
 compile(basicTypes/SrcLoc,lhs,)
 compile(basicTypes/UniqSupply,lhs,)
 compile(basicTypes/Unique,lhs,)
@@ -605,34 +582,22 @@ compile(deSugar/MatchLit,lhs,)
 compile(main/CmdLineOpts,lhs,if_ghc(-fvia-C))
 compile(main/ErrUtils,lhs,)
 compile(main/Main,lhs,if_ghc(-fvia-C))
-compile(main/MainMonad,lhs,)
 compile(main/MkIface,lhs,)
 
 #if GhcWithNativeCodeGen == YES
 compile(nativeGen/AbsCStixGen,lhs,)
 compile(nativeGen/AsmCodeGen,lhs,-I$(COMPINFO_DIR))
 compile(nativeGen/AsmRegAlloc,lhs,-I$(COMPINFO_DIR))
-compile(nativeGen/MachDesc,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/RegAllocInfo,lhs,-I$(NATIVEGEN_DIR))
 compile(nativeGen/Stix,lhs,)
-compile(nativeGen/StixInfo,lhs,-I$(NATIVEGEN_DIR))
+compile(nativeGen/StixInfo,lhs,)
 compile(nativeGen/StixInteger,lhs,)
-compile(nativeGen/StixMacro,lhs,-I$(NATIVEGEN_DIR))
+compile(nativeGen/StixMacro,lhs,)
 compile(nativeGen/StixPrim,lhs,)
-# if i386_TARGET_ARCH
-compile(nativeGen/I386Desc,lhs,)
-compile(nativeGen/I386Code,lhs,-I$(NATIVEGEN_DIR) if_ghc(-monly-4-regs))
-compile(nativeGen/I386Gen,lhs,)
-# endif
-# if sparc_TARGET_ARCH
-compile(nativeGen/SparcDesc,lhs,)
-compile(nativeGen/SparcCode,lhs,-I$(NATIVEGEN_DIR))
-compile(nativeGen/SparcGen,lhs,)
-# endif
-# if alpha_TARGET_ARCH
-compile(nativeGen/AlphaDesc,lhs,)
-compile(nativeGen/AlphaCode,lhs,-I$(NATIVEGEN_DIR))
-compile(nativeGen/AlphaGen,lhs,)
-# endif
 #endif
 
 compile(prelude/PrelInfo,lhs,)
@@ -650,21 +615,19 @@ compile(profiling/CostCentre,lhs,)
 compile(reader/PrefixSyn,lhs,)
 compile(reader/PrefixToHs,lhs,)
 compile(reader/ReadPrefix,lhs,if_ghc(-fvia-C -I$(COMPINFO_DIR) -Iparser '-#include"hspincl.h"'))
-compile(reader/ReadPragmas,lhs,)
 compile(reader/RdrHsSyn,lhs,)
 
+compile(rename/ParseIface,hs,)
+compile(rename/ParseUtils,lhs,)
+compile(rename/RnHsSyn,lhs,)
+compile(rename/RnMonad,lhs,)
 compile(rename/Rename,lhs,)
-compile(rename/RnPass1,lhs,)
-compile(rename/RnPass2,lhs,)
-compile(rename/RnPass3,lhs,)
-compile(rename/RnPass4,lhs,)
+compile(rename/RnNames,lhs,)
+compile(rename/RnSource,lhs,)
+compile(rename/RnBinds,lhs,)
+compile(rename/RnExpr,lhs,)
+compile(rename/RnIfaces,lhs,)
 compile(rename/RnUtils,lhs,)
-compile(rename/RnHsSyn,lhs,)
-compile(rename/RnBinds4,lhs,)
-compile(rename/RnExpr4,lhs,)
-compile(rename/RnMonad12,lhs,)
-compile(rename/RnMonad3,lhs,)
-compile(rename/RnMonad4,lhs,)
 
 compile(simplCore/BinderInfo,lhs,)
 compile(simplCore/ConFold,lhs,)
@@ -749,7 +712,6 @@ compile(typecheck/TcPragmas,lhs,)
 compile(typecheck/TcSimplify,lhs,)
 compile(typecheck/TcTyClsDecls,lhs,)
 compile(typecheck/TcTyDecls,lhs,)
-compile(typecheck/Typecheck,lhs,)
 compile(typecheck/Unify,lhs,)
 
 compile(types/Class,lhs,)
@@ -796,13 +758,10 @@ CPP_DEFINES = $(D_DEBUG)
 HSP_SRCS_C =    parser/constr.c                \
                parser/binding.c        \
                parser/pbinding.c       \
-               parser/coresyn.c        \
                parser/entidt.c         \
-               parser/hpragma.c        \
                parser/hslexer.c        \
                parser/hsparser.tab.c   \
                parser/id.c             \
-               parser/import_dirlist.c \
                parser/infix.c          \
                parser/list.c           \
                parser/literal.c        \
@@ -818,13 +777,10 @@ HSP_SRCS_C =    parser/constr.c           \
 HSP_OBJS_O =    parser/constr.o                \
                parser/binding.o        \
                parser/pbinding.o       \
-               parser/coresyn.o        \
                parser/entidt.o         \
-               parser/hpragma.o        \
                parser/hslexer.o        \
                parser/hsparser.tab.o   \
                parser/id.o             \
-               parser/import_dirlist.o \
                parser/infix.o          \
                parser/list.o           \
                parser/literal.o        \
@@ -845,7 +801,6 @@ REAL_HSP_SRCS_C = parser/main.c     \
                parser/util.c           \
                parser/syntax.c         \
                parser/type2context.c   \
-               parser/import_dirlist.c \
                parser/infix.c          \
                parser/printtree.c
 
@@ -865,14 +820,12 @@ MakeDirectories(install, $(INSTLIBDIR_GHC))
 InstallBinaryTarget(hsp,$(INSTLIBDIR_GHC))
 #endif /* DoInstall... */
 
-YaccRunWithExpectMsg(parser/hsparser,16,0)
+YaccRunWithExpectMsg(parser/hsparser,14,0)
 
 UgenTarget(parser/constr)
 UgenTarget(parser/binding)
 UgenTarget(parser/pbinding)
-UgenTarget(parser/coresyn)
 UgenTarget(parser/entidt)
-UgenTarget(parser/hpragma)
 UgenTarget(parser/list)
 UgenTarget(parser/literal)
 UgenTarget(parser/maybe)
@@ -884,14 +837,12 @@ UgenTarget(parser/ttype)
 UGENS_C = parser/constr.c      \
        parser/binding.c        \
        parser/pbinding.c       \
-       parser/coresyn.c        \
        parser/entidt.c         \
        parser/literal.c        \
        parser/list.c           \
        parser/maybe.c          \
        parser/either.c         \
        parser/qid.c            \
-       parser/hpragma.c        \
        parser/tree.c           \
        parser/ttype.c
 
@@ -906,9 +857,7 @@ compile(parser/UgenUtil,lhs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
 compile(parser/U_constr,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
 compile(parser/U_binding,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
 compile(parser/U_pbinding,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
-compile(parser/U_coresyn,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
 compile(parser/U_entidt,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
-compile(parser/U_hpragma,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
 compile(parser/U_list,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
 compile(parser/U_literal,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')
 compile(parser/U_maybe,hs,$(PARSER_HS_OPTS) '-#include"hspincl.h"')