[Haskell-cafe] Makefile for a Haskell Project

John D. Ramsdell ramsdell0 at gmail.com
Tue Jan 15 21:00:27 CET 2013


This is the Makefile used by CPSA.  It requires GNU make.

John

# 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 $(CABALFLAGS) --ghc --user --prefix="${HOME}"

%:	force
	$(SETUP) $@

.PHONY:	all force



More information about the Haskell-Cafe mailing list