[project @ 2005-03-08 11:50:42 by simonmar]
authorsimonmar <unknown>
Tue, 8 Mar 2005 11:50:42 +0000 (11:50 +0000)
committersimonmar <unknown>
Tue, 8 Mar 2005 11:50:42 +0000 (11:50 +0000)
Build & install runhaskell, but only install it if there isn't already
a $(bindir)/runhaskell.

ghc/utils/runghc/Makefile

index 213422e..cd2f607 100644 (file)
@@ -31,4 +31,16 @@ SRC_MKDEPENDHS_OPTS += \
        -optdep--exclude-module=Distribution.Version \
        -optdep--exclude-module=System.Directory.Internals
 
+all :: runhaskell
+
+runhaskell : $(HS_PROG)
+       $(CP) $< runhaskell
+
+# Only install runhaskell if there isn't already one installed
+ifneq "$(findstring install, $(MAKECMDGOALS))" ""
+ifeq "$(wildcard $(bindir)/runhaskell)" ""
+INSTALL_PROGS += runhaskell
+endif
+endif
+
 include $(TOP)/mk/target.mk