remove empty dir
[ghc-hetmet.git] / compiler / ilxGen / tests / build.mk
1 # 1. To make standard library:
2 #
3 # e.g. from lib/std directory:
4 #       $(MAKE) way=ilx-Onot-mono std.ilx-Onot.mono.dll std.ilx-Onot.mono.vlb
5 #       $(MAKE) way=ilx-O-mono  std.ilx-O.mono.dll std.ilx-O.mono.vlb
6 #       $(MAKE) way=ilx-Onot-generic std.ilx-Onot.generic.dll
7 #
8 # 2. To make tests:
9 #
10 # e.g. from ilxGen/tests directory:
11 #
12 #  $ make -n way=ilx-Onot-mono test1.ilx-Onot.mono.retail.run 
13 #
14 #  $ make -n way=ilx-Onot-mono test1-nostdlib.ilx-Onot.mono.retail.run HC_OPTS="-fno-implicit-prelude -fglasgow-exts"
15 #
16
17
18 # Add all the ILX ways so dependencies get made correctly.
19 # (n.b. Actually we only need to add "ilx-Onot" and "ilx-O" for the 
20 #       GHC --> ILX dependencies, as these are the portions of the ILX
21 #       ways that are relevant in terms of GHC options,
22 #       but we list some of the others anyway.  Also note that
23 #       there are no dependencies required for the ILX --> IL or
24 #       IL --> CLR phases as these operate on the "standalone"
25 #       ILX and IL files).
26 #
27 #GhcLibWays+= ilx-Onot-mono ilx-Onot ilx-O ilx-O-mono
28 GhcLibWays+=i
29 GhcWithIlx=YES
30
31 ILXized=YES
32
33 GhcHcOpts+=-DILX -DNO_BIG_TUPLES
34 GhcLibHcOpts+=-optI--mono -optI--add-suffix-to-assembly -optImsilxlib -optI--suffix-to-add -optI.mono
35
36 # Each set of args below defines one ILX way.
37 #ALL_WAYS+=ilx-Onot-generic
38 #WAY_ilx-Onot-generic_NAME=ILX with Haskell Optimizer Off to run on Generic CLR
39 #WAY_ilx-Onot-generic_HC_OPTS=-buildtag ilx-Onot  $(GHC_ILX_OPTS) -Onot 
40 #WAY_ilx-Onot-generic_ILX2IL_OPTS=--generic
41 #WAY_ilx-Onot-generic_ILX=YES
42
43 #ALL_WAYS+=ilx-Onot-fullgeneric-verifiable
44 #WAY_ilx-Onot-fullgeneric-verifiable_NAME=ILX with Haskell Optimizer Off to run on Generic CLR
45 #WAY_ilx-Onot-fullgeneric-verifiable_HC_OPTS=-buildtag ilx-Onot $(GHC_ILX_OPTS) -Onot 
46 #WAY_ilx-Onot-fullgeneric-verifiable_ILX2IL_OPTS=--fullgeneric --verifiable
47 #WAY_ilx-Onot-fullgeneric-verifiable_ILX=YES
48
49 #ALL_WAYS+=ilx-Onot-repgeneric-verifiable
50 #WAY_ilx-Onot-repgeneric-verifiable_NAME=ILX with Haskell Optimizer Off to run on Generic CLR
51 #WAY_ilx-Onot-repgeneric-verifiable_HC_OPTS=-buildtag ilx-Onot $(GHC_ILX_OPTS) -Onot 
52 #WAY_ilx-Onot-repgeneric-verifiable_ILX2IL_OPTS=--repgeneric --verifiable
53 #WAY_ilx-Onot-repgeneric-verifiable_ILX=YES
54
55 #ALL_WAYS+=ilx-O-generic
56 #WAY_ilx-O-generic_NAME=ILX with Haskell Optimizer On to run on Generic CLR
57 #WAY_ilx-O-generic_HC_OPTS=-buildtag ilx-O $(GHC_ILX_OPTS) -O 
58 #WAY_ilx-O-generic_ILX2IL_OPTS=--generic
59 #WAY_ilx-O-generic_ILX=YES
60
61 #ALL_WAYS+=ilx-Onot-mono
62 #WAY_ilx-Onot-mono_NAME=ILX with Haskell Optimizer Off to run on V1 CLR
63 #WAY_ilx-Onot-mono_HC_OPTS=-buildtag ilx-Onot $(GHC_ILX_OPTS) -Onot 
64 #WAY_ilx-Onot-mono_ILX2IL_OPTS=--mono
65 #WAY_ilx-Onot-mono_ILX=YES
66
67 #ALL_WAYS+=ilx-Onot-mono-verifiable
68 #WAY_ilx-Onot-mono-verifiable_NAME=ILX with Haskell Optimizer Off to run on V1 CLR, verifiable code (CURRENTLY WILL NOT RUN BECAUSE OF LACK OF HIGHER KINDED TYPE PARAMETERS BUT IS USEFUL TO FIND BUGS USING THE VERIFIER)
69 #WAY_ilx-Onot-mono-verifiable_HC_OPTS=-buildtag ilx-Onot $(GHC_ILX_OPTS) -Onot 
70 #WAY_ilx-Onot-mono-verifiable_ILX2IL_OPTS=--mono --verifiable
71 #WAY_ilx-Onot-mono-verifiable_ILX=YES
72
73 #ALL_WAYS+=ilx-O-mono
74 #WAY_ilx-O-mono_NAME=ILX with Haskell Optimizer On to run on V1 CLR
75 #WAY_ilx-O-mono_HC_OPTS=-buildtag ilx-O $(GHC_ILX_OPTS) -O 
76 #WAY_ilx-O-mono_ILX2IL_OPTS=--mono
77 #WAY_ilx-O-mono_ILX=YES
78
79 #ALL_WAYS+=ilx-Onot-generic-traced
80 #WAY_ilx-Onot-generic-traced_NAME=ILX with Haskell Optimizer Off to run on Generic CLR
81 #WAY_ilx-Onot-generic-traced_HC_OPTS=-buildtag ilx-Onot $(GHC_ILX_OPTS) -Onot 
82 #WAY_ilx-Onot-generic-traced_ILX2IL_OPTS=--generic --traced
83 #WAY_ilx-Onot-generic-traced_ILX=YES
84
85 #ALL_WAYS+=ilx-O-generic-traced
86 #WAY_ilx-O-generic-traced_NAME=ILX with Haskell Optimizer On to run on Generic CLR
87 #WAY_ilx-O-generic-traced_HC_OPTS=-buildtag ilx-O $(GHC_ILX_OPTS) -O 
88 #WAY_ilx-O-generic-traced_ILX2IL_OPTS=--generic --traced
89 #WAY_ilx-O-generic-traced_ILX=YES
90
91 #ALL_WAYS+=ilx-Onot-mono-traced
92 #WAY_ilx-Onot-mono-traced_NAME=ILX with Haskell Optimizer Off to run on V1 CLR
93 #WAY_ilx-Onot-mono-traced_HC_OPTS=-buildtag ilx-Onot $(GHC_ILX_OPTS) -Onot 
94 #WAY_ilx-Onot-mono-traced_ILX2IL_OPTS=--mono --traced
95 #WAY_ilx-Onot-mono-traced_ILX=YES
96
97 #ALL_WAYS+=ilx-O-mono-traced
98 #WAY_ilx-O-mono-traced_NAME=ILX with Haskell Optimizer On to run on V1 CLR
99 #WAY_ilx-O-mono-traced_HC_OPTS=-buildtag ilx-O $(GHC_ILX_OPTS) -O 
100 #WAY_ilx-O-mono-traced_ILX2IL_OPTS=--mono --traced
101 #WAY_ilx-O-mono-traced_ILX=YES
102
103 # Put a "." after the Haskell portion of the way.  Way names can't contain
104 # dots for some reason elsewhere in the Make system.  But we need to be able
105 # to split out the Haskell portion of the way from the ILX portion (e.g. --generic)
106 # and the runtime portion (e.g. --retail).
107 ilx_way=$(subst ilx-Onot-,ilx-Onot.,$(subst ilx-O-,ilx-O.,$(way)))
108 ilx2il_suffix=$(subst ilx-Onot.,.,$(subst ilx-O.,.,$(ilx_way)))
109 hs2ilx_suffix=$(subst $(ilx2il_suffix),,$(ilx_way))
110 HS_ILX=$(subst $(way),$(hs2ilx_suffix),$(HS_OBJS))
111 #HS_IL=$(subst $(hs2ilx_suffix)_o,$(ilx_way).il,$(HS_ILX))
112 HS_IL=$(subst .o,.il,$(HS_ILX))
113
114 ILVALID=C:/devel/fcom/bin/ilvalid.exe
115 ILVERIFY=C:/devel/fcom/bin/ilverify.exe
116
117 %.$(ilx_way).mvl : %.$(ilx_way).il $(HS_IL)  
118         ((ILVALID_HOME=c:\\devel\\fcom\\src\\ ILVALID_MSCORLIB=mscorlib.vlb $(ILVALID) c:\\devel\\fcom\\src\\bin\\msilxlib$(ilx2il_suffix).vlb  $(addprefix --other-il-module ,$(filter-out $*.$(ilx_way).il,$(HS_IL))) $<) 2>&1) | tee $@
119
120 %.$(ilx_way).mvr : %.$(ilx_way).il $(HS_IL) 
121         ((ILVALID_HOME=c:\\devel\\fcom\\src\\ ILVALID_MSCORLIB=mscorlib.vlb $(ILVERIFY) c:\\devel\\fcom\\src\\bin\\msilxlib$(ilx2il_suffix).vlb  $(addprefix --other-il-module ,$(filter-out $<,$(HS_IL))) $<) 2>&1) | tee $@