On Tue, Feb 9, 2010 at 8:48 AM, Limestraël <limestr...@gmail.com> wrote:
> Cabal/cabal-install are good tools for distribution and installation, but I
> was wondering -- as I was starting to learn how to use Cabal -- how do
> usually Haskell developpers build their softwares

I add the enclosed Makefile to the directory that contains the .cabal
file, and then in emacs, run M-x compile.  To move to location of an
error, type C-x `.  I bind compile to M-C-y in my .emacs.el file with:

   (global-set-key "\M-\C-y" 'compile)

--------------- Makefile ----------------
# Haskell/Cabal Makefile
# Requires GNU Make
# The all target creates a default configuration if need be.

PACKAGE := $(wildcard *.cabal)
CONFIG  = dist/setup-config
SETUP   = runhaskell Setup.hs

all:    $(CONFIG)
        $(SETUP) build

Makefile:
        @echo make $@

$(PACKAGE):
        @echo make $@

$(CONFIG):      $(PACKAGE)
        $(SETUP) configure --ghc --user --prefix="${HOME}"

%:      force
        $(SETUP) $@

.PHONY: all force
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to