1 #if IncludeTestDirsInBuild == YES
3 #define __ghc_parser_tests_dir tests
5 #define __ghc_parser_tests_dir /* nothing */
8 SUBDIRS = __ghc_parser_tests_dir
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
19 /* add to this on the command line with, e.g., EXTRA_YACC_OPTS=-v */
21 #if BuildDataParallelHaskell == YES
25 XCOMM D_DEBUG = -DDEBUG
27 CPP_DEFINES = $(D_DEBUG) $(D_DPH)
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
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
37 /* DPH uses some tweaked files; here are the lists again... */
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
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
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
53 UgenNeededHere(all depend)
55 BuildPgmFromCFiles(hsp,main.o,$(FLEX_LIB),libhsp.a)
56 #if BuildDataParallelHaskell == YES
57 BuildPgmFromCFiles(dphsp,$(DPH_HSP_OBJS_O),$(LEX_LIB),)
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)
64 NormalLibraryTarget(hsp,$(HSP_OBJS_O))
66 #if DoInstallGHCSystem == YES
67 MakeDirectories(install, $(INSTLIBDIR_GHC))
68 InstallBinaryTarget(hsp,$(INSTLIBDIR_GHC))
69 #if BuildDataParallelHaskell == YES
70 InstallBinaryTarget(dphsp,$(INSTLIBDIR_GHC))
72 #endif /* DoInstall... */
74 YaccRunWithExpectMsg(hsparser,13,2)
89 #if BuildDataParallelHaskell == YES
90 YaccRunWithExpectMsg(hsparser-DPH,12,4)
95 CDependTarget( $(HSP_SRCS_C) )
97 ExtraStuffToClean( y.output )
98 ExtraStuffToBeVeryClean( $(STD_VERY_CLEAN) hsparser.tab.* hsparser-DPH.tab.* hslexer.c hslexer-DPH.c )
100 EtagsNeededHere(tags) /* need this to do "make tags" */
102 CTagsTarget( *.y *.lex *.ugn $(REAL_HSP_SRCS_C) )