[project @ 1996-03-22 09:24:22 by partain]
[ghc-hetmet.git] / ghc / compiler / yaccParser / Jmakefile
1 #if IncludeTestDirsInBuild == YES
2 #define IHaveSubdirs
3 #define __ghc_parser_tests_dir tests
4 #else
5 #define __ghc_parser_tests_dir /* nothing */
6 #endif
7
8 SUBDIRS = __ghc_parser_tests_dir
9
10 /* only subdir is the test suite */
11 #define NoAllTargetForSubdirs
12 #define NoDocsTargetForSubdirs
13 #define NoInstallTargetForSubdirs
14 #define NoInstallDocsTargetForSubdirs
15 #define NoDependTargetForSubdirs
16 #define NoTagTargetForSubdirs
17
18 YACC_OPTS = -d
19 /* add to this on the command line with, e.g., EXTRA_YACC_OPTS=-v */
20
21 #if BuildDataParallelHaskell == YES
22 D_DPH = -DDPH
23 #endif
24
25 XCOMM D_DEBUG = -DDEBUG
26
27 CPP_DEFINES = $(D_DEBUG) $(D_DPH)
28
29 HSP_SRCS_C = /*main.c*/ hsparser.tab.c hslexer.c id.c atype.c ttype.c \
30          tree.c literal.c coresyn.c list.c binding.c pbinding.c hpragma.c impidt.c \
31          finfot.c util.c entidt.c syntax.c type2context.c import_dirlist.c infix.c printtree.c
32
33 HSP_OBJS_O = /*main.o*/ hsparser.tab.o hslexer.o id.o atype.o ttype.o \
34          tree.o literal.o coresyn.o list.o binding.o pbinding.o hpragma.o impidt.o \
35          finfot.o util.o entidt.o syntax.o type2context.o import_dirlist.o infix.o printtree.o
36
37 /* DPH uses some tweaked files; here are the lists again... */
38
39 #if BuildDataParallelHaskell == YES
40 DPH_HSP_SRCS_C = main.c hsparser-DPH.tab.c hslexer-DPH.c id.c atype.c ttype-DPH.c \
41          tree-DPH.c literal.c coresyn.c list.c binding.c pbinding.c hpragma.c impidt.c \
42          finfot.c util.c entidt.c syntax.c type2context.c import_dirlist.c infix.c printtree.c
43
44 DPH_HSP_OBJS_O = main.o hsparser-DPH.tab.o hslexer-DPH.o id.o atype.o ttype-DPH.o \
45          tree-DPH.o literal.o coresyn.o list.o binding.o pbinding.o hpragma.o impidt.o \
46          finfot.o util.o entidt.o syntax.o type2context.o import_dirlist.o infix.o printtree.o
47 #endif
48
49 /* this is for etags */
50 REAL_HSP_SRCS_C = main.c id.c \
51          util.c syntax.c type2context.c import_dirlist.c infix.c printtree.c
52
53 UgenNeededHere(all depend)
54
55 BuildPgmFromCFiles(hsp,main.o,$(FLEX_LIB),libhsp.a)
56 #if BuildDataParallelHaskell == YES
57 BuildPgmFromCFiles(dphsp,$(DPH_HSP_OBJS_O),$(LEX_LIB),)
58 #endif
59
60 /* Most hsp files are in libhsp.a, so we can either make
61    a standalone parser, or incorporate the files into
62    the hsc compiler directly (WDP 94/10)
63 */
64 NormalLibraryTarget(hsp,$(HSP_OBJS_O))
65
66 #if DoInstallGHCSystem == YES
67 MakeDirectories(install, $(INSTLIBDIR_GHC))
68 InstallBinaryTarget(hsp,$(INSTLIBDIR_GHC))
69 #if BuildDataParallelHaskell == YES
70 InstallBinaryTarget(dphsp,$(INSTLIBDIR_GHC))
71 #endif
72 #endif /* DoInstall... */
73
74 YaccRunWithExpectMsg(hsparser,13,2)
75
76 UgenTarget(atype)
77 UgenTarget(binding)
78 UgenTarget(coresyn)
79 UgenTarget(entidt)
80 UgenTarget(finfot)
81 UgenTarget(impidt)
82 UgenTarget(literal)
83 UgenTarget(list)
84 UgenTarget(pbinding)
85 UgenTarget(hpragma)
86 UgenTarget(tree)
87 UgenTarget(ttype)
88
89 #if BuildDataParallelHaskell == YES
90 YaccRunWithExpectMsg(hsparser-DPH,12,4)
91 UgenTarget(tree-DPH)
92 UgenTarget(ttype-DPH)
93 #endif
94
95 CDependTarget( $(HSP_SRCS_C) )
96
97 ExtraStuffToClean( y.output )
98 ExtraStuffToBeVeryClean( $(STD_VERY_CLEAN) hsparser.tab.* hsparser-DPH.tab.* hslexer.c hslexer-DPH.c )
99
100 EtagsNeededHere(tags) /* need this to do "make tags" */
101 ClearTagsFile()
102 CTagsTarget( *.y *.lex *.ugn $(REAL_HSP_SRCS_C) )
103
104
105
106
107
108
109
110
111
112