<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div dir="ltr" style="font-family:Calibri,'Segoe UI',Meiryo,'Microsoft YaHei UI','Microsoft JhengHei UI','Malgun Gothic',sans-serif;font-size:12pt"><div><span style="font-size:12pt">In my </span><a href="http://ghc.mk" target="_blank" style="font-size:12pt">ghc.mk</a><span style="font-size:12pt"> I have declared:</span><br></div><div><br></div><div>$(eval $(call build-prog,driver/ghc-split,dist,0))<br>$(eval $(call bindist,driver/ghc-split,<a href="http://ghc.mk" target="_blank">ghc.mk</a>))</div></div></div></blockquote><div><br></div><div>That second line isn't needed. I think you are trying to follow <a href="https://ghc.haskell.org/trac/ghc/wiki/Building/Modifying#Addingaprogram">https://ghc.haskell.org/trac/ghc/wiki/Building/Modifying#Addingaprogram</a>, but that information is outdated. Take a look at some <a href="http://ghc.mk">ghc.mk</a> files in the utils directory, for example `utils/hpc/<a href="http://ghc.mk">ghc.mk</a>`.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div dir="ltr" style="font-family:Calibri,'Segoe UI',Meiryo,'Microsoft YaHei UI','Microsoft JhengHei UI','Malgun Gothic',sans-serif;font-size:12pt"><div>Now it's perfectly fine to build this at stage 1 or 2</div></div></div></blockquote><div><br></div><div>Use stage1 to build it, or stage2 if you need access to the ghc api.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div dir="ltr" style="font-family:Calibri,'Segoe UI',Meiryo,'Microsoft YaHei UI','Microsoft JhengHei UI','Malgun Gothic',sans-serif;font-size:12pt"><div>, but when I change it to either of those building fails telling me that<br>ghc-stage1 or ghc-stage2 cannot be found...</div></div></div></blockquote><div><br></div><div>You are probably missing an entry like the following in the toplevel <a href="http://ghc.mk">ghc.mk</a>:<br></div><div><br></div><div>utils/hpc/dist-install/<a href="http://package-data.mk">package-data.mk</a>: compiler/stage2/<a href="http://package-data.mk">package-data.mk</a></div></div></div></div>