TOP=../..
include $(TOP)/mk/boilerplate.mk
-HS_PROG = runghc
+HS_PROG = runghc$(exeext)
INSTALL_PROGS += $(HS_PROG)
UseGhcForCc = YES
-optdep--exclude-module=Distribution.Version \
-optdep--exclude-module=System.Directory.Internals
+all :: runhaskell
+
+runhaskell : $(HS_PROG)
+ $(CP) $< runhaskell$(exeext)
+
+# Only install runhaskell if there isn't already one installed
+ifneq "$(findstring install, $(MAKECMDGOALS))" ""
+ifeq "$(wildcard $(bindir)/runhaskell)" ""
+INSTALL_PROGS += runhaskell$(exeext)
+endif
+endif
+
include $(TOP)/mk/target.mk