X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=utils%2Frunghc%2Fghc.mk;h=7c6a34a19018e948a0f482dbf7e17ea124cb3f4d;hb=HEAD;hp=1eb2d87c47f1c0e23d1d2ac6eb317b0eb495c45e;hpb=34cc75e1a62638f2833815746ebce0a9114dc26b;p=ghc-hetmet.git diff --git a/utils/runghc/ghc.mk b/utils/runghc/ghc.mk index 1eb2d87..7c6a34a 100644 --- a/utils/runghc/ghc.mk +++ b/utils/runghc/ghc.mk @@ -1,29 +1,39 @@ -utils/runghc_dist_MODULES = Main -utils/runghc_dist_HC_OPTS = -cpp -DVERSION="\"$(ProjectVersion)\"" -utils/runghc_dist_PROG = runghc$(exeext) -utils/runghc_dist_SHELL_WRAPPER = YES -utils/runghc_dist_INSTALL_SHELL_WRAPPER = YES +# ----------------------------------------------------------------------------- +# +# (c) 2009 The University of Glasgow +# +# This file is part of the GHC build system. +# +# To understand how the build system works and how to modify it, see +# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture +# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying +# +# ----------------------------------------------------------------------------- -ifneq "$(BINDIST)" "YES" +utils/runghc_PACKAGE = runghc +utils/runghc_dist-install_USES_CABAL = YES +utils/runghc_dist-install_PROG = runghc$(exeext) +utils/runghc_dist-install_SHELL_WRAPPER = YES +utils/runghc_dist-install_INSTALL_SHELL_WRAPPER = YES +utils/runghc_dist-install_EXTRA_HC_OPTS = -cpp -DVERSION="\"$(ProjectVersion)\"" +ifneq "$(BINDIST)" "YES" # hack: the build system has trouble with Main modules not called Main.hs -utils/runghc/dist/build/Main.hs : utils/runghc/runghc.hs $(MKDIRHIER) - $(MKDIRHIER) $(dir $@) - $(CP) $< $@ - -$(eval $(call build-prog,utils/runghc,dist,1)) - +utils/runghc/dist-install/build/Main.hs : utils/runghc/runghc.hs | $$(dir $$@)/. + "$(CP)" $< $@ endif +$(eval $(call build-prog,utils/runghc,dist-install,1)) + install: install_runhaskell .PHONY: install_runhaskell ifeq "$(Windows)" "YES" install_runhaskell: install_bins - $(CP) $(DESTDIR)$(bindir)/runghc$(exeext) $(DESTDIR)$(bindir)/runhaskell$(exeext) + "$(CP)" $(DESTDIR)$(bindir)/runghc$(exeext) $(DESTDIR)$(bindir)/runhaskell$(exeext) else install_runhaskell: - $(RM) $(DESTDIR)$(bindir)/runhaskell - $(LN_S) runghc $(DESTDIR)$(bindir)/runhaskell + "$(RM)" $(RM_OPTS) "$(DESTDIR)$(bindir)/runhaskell" + $(LN_S) runghc "$(DESTDIR)$(bindir)/runhaskell" endif