X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FilxGen%2Ftests%2FMakefile;fp=ghc%2Fcompiler%2FilxGen%2Ftests%2FMakefile;h=b89001442ee82aaec3c9e3775364856c94504435;hb=1276e713503e453c650a5f4addf57d3a34ea9a58;hp=03765c84de2ab292bdd7899288a2debb080b4815;hpb=ebf2c80221ccf11aeb7a0a2be27bfc72529855a5;p=ghc-hetmet.git diff --git a/ghc/compiler/ilxGen/tests/Makefile b/ghc/compiler/ilxGen/tests/Makefile index 03765c8..b890014 100644 --- a/ghc/compiler/ilxGen/tests/Makefile +++ b/ghc/compiler/ilxGen/tests/Makefile @@ -1,15 +1,25 @@ -# These settings are if you use a visual studio build -CVS=cvs +TOP = ../../.. +include $(TOP)/mk/boilerplate.mk + +WAYS=$(GhcLibWays) + +#----------------------------------------------------------------------------- +# Setting the standard variables +# + +HC = $(GHC_INPLACE) +SRC_HC_OPTS+=-cpp -fglasgow-exts + +#----------------------------------------------------------------------------- +# CORENV_DEBUG= CORENV_RETAIL= LOCALRUN=./ -ILX_FAST=x ifeq ($(HOSTNAME),MSRC-HILDA) CORENV_DEBUG="call devcorb2gen.bat fastchecked" CORENV_RETAIL="call devcorb2gen.bat free" LOCALRUN=.\\ -ILX_FAST= endif ILX2IL_HOME=C:/devel/fcom/src @@ -23,56 +33,28 @@ ilx: $(MAKE) -C $(ILX2IL_HOME) ilxdefault prel: ilx - $(MAKE) -C ../../../lib/std std.Onot.mono-b2.dll - -%.o: %.hs ../../ghc-4.11 - ../../ghc-inplace -o $@ -c $*.hs + $(MAKE) -C ../../../lib/std std.$(ilx_way).dll std.$(ilx_way).vlb #======================================================================== -# 1. From Haskell to ILX - -%.Onot.ilx: %.hs ../../ghc-4.11 - ../../ghc-inplace -c -fglasgow-exts -o $@ -i../../../lib/std/.Onot -Onot -filx -fkeep-stg-types $*.hs -osuf Onot.ilx - -%.O.ilx: %.hs ../../ghc-4.11 - ../../ghc-inplace -c -fglasgow-exts -o $@ -i../../../lib/std/.O -O -filx -fkeep-stg-types $*.hs -osuf O.ilx - -../Entry.Onot.ilx: ../Entry.ilx - sed -e "s|ilx std|ilx std.Onot|g" ../Entry.ilx > $@.tmp - mv $@.tmp $@ - -../Entry.O.ilx: ../Entry.ilx - sed -e "s|ilx std|ilx std.O|g" ../Entry.ilx > $@.tmp - mv $@.tmp $@ - +# 1. From Haskell to ILX and then to IL - see build.mk -#======================================================================== -# 2. From ILX to IL +#------------------------------------------------------------------------ +# 2. From IL to .EXE -%.generic.il: $(ILX2IL) %.ilx - $(ILX2IL) --generic $(ILX2IL_FLAGS) -o $@.tmp $*.ilx - mv $@.tmp $@ +%.$(ilx_way).exe : %.$(ilx_way).il ../Entry.$(ilx_way).il + cat $*.$(ilx_way).il ../Entry.$(ilx_way).il > $@.tmp + echo "call devcorb2gen free" > tmp.bat + echo "ilasm /DEBUG /QUIET /OUT=$@ $@.tmp" >> tmp.bat + cmd /c tmp.bat -%.mono.il: $(ILX2IL) %.ilx - $(ILX2IL) --mono $(ILX2IL_FLAGS) -o $@.tmp $*.ilx +../Entry.$(hs2ilx_suffix)_o: ../Entry.ilx + sed -e "s|ilx std|ilx std.$(hs2ilx_suffix)|g" ../Entry.ilx > $@.tmp mv $@.tmp $@ -#------------------------------------------------------------------------ -# From IL to .EXE -%.generic.exe: %.generic.il ../Entry.Onot.generic.il - cat $*.generic.il ../Entry.Onot.generic.il > $@.tmp - echo "$(CORENV_RETAIL)" > $@.bat - echo "ilasm /exe /quiet /out=$(subst /,\\,$@.tmp) $(subst /,\\,$@.tmp)" >> $@.bat - time -p cmd /c $(subst /,\\,$@).bat - rm $@.bat +%.$(ilx_way).mvl: %.$(ilx_way).il + (ILVALID_HOME=c:\\devel\\fcom\\src\\ ILVALID_MSCORLIB=mscorlib.vlb $(ILVALID) c:\\devel\\fcom\\src\\bin\\msilxlib$(ilx2il_suffix).vlb $(TOP)/lib/std/std.$(ilx_way).vlb $<) 2>&1 -%.mono.exe: %.mono.il ../Entry.Onot.mono.il - cat $*.mono.il ../Entry.Onot.mono.il > $@.tmp - echo "$(CORENV_RETAIL)" > $@.bat - echo "ilasm /exe /quiet /out=$(subst /,\\,$@.tmp) $(subst /,\\,$@.tmp)" >> $@.bat - time -p cmd /c $(subst /,\\,$@).bat - rm $@.bat #------------------------------------------------------------------------ # From .HS to .EXE without using ILX @@ -94,16 +76,14 @@ HSstd_cbits.dll: ../../../lib/std/cbits/HSstd_cbits.dll cp $< $@ %.debug.run: HSstd_cbits.dll %.exe - echo "$(CORENV_DEBUG)" > $@.bat - echo "set CORPATH=$(subst /,\\,$(ILX2IL_HOME))\\bin;\\GHC\\fptools\\ghc\\lib\\std;%CORPATH%" >> $@.bat - echo "$(LOCALRUN)$(subst /,\\,$*).debug.exe 2>&1" >> $@.bat - time -p cmd /c $(subst /,\\,$@).bat - rm $@.bat - -%.retail.run: HSstd_cbits.dll %.exe - echo "$(CORENV_RETAIL)" > $@.bat - echo "set CORPATH=$(subst /,\\,$(ILX2IL_HOME))\\bin;\\GHC\\fptools\\ghc\\lib\\std;%CORPATH%" >> $@.bat - echo "$(LOCALRUN)$(subst /,\\,$*).retail.exe 2>&1" >> $@.bat + cp $(TOP)/lib/std/*.dll . + cp $(TOP)/lib/std/*.pdb . + cp $(TOP)/lib/std/*.il . + cp $(ILX2IL_HOME)/bin/*.dll . + cp $(ILX2IL_HOME)/bin/*.pdb . + cp $(ILX2IL_HOME)/bin/*.il . + echo "call devcorb2gen free" > $@.bat + echo "$(LOCALRUN)$(subst /,\\,$*).exe 2>&1" >> $@.bat time -p cmd /c $(subst /,\\,$@).bat rm $@.bat @@ -127,6 +107,7 @@ upd: (cd ../..; $(CVS) up) (cd ../../../lib/std; $(CVS) up) -.PRECIOUS: %.mono-nonstatic.il %.fullgeneric-nonstatic.il %.fullgeneric.il %.nolib.il %.Onot.ilx %.O.ilx %.nolib.ilx %-nonstatic.ilx %.exe %.debug.exe %.dll %.O.exe .PHONY: %.run + +include $(TOP)/mk/target.mk