Commits

Bryan O'Sullivan committed ac53fa5

Use cabal instead of runghc Setup if available

  • Participants
  • Parent commits ffd2ad1

Comments (0)

Files changed (1)

 lib-srcs := $(shell grep '^  *Data' ../text.cabal | \
                     sed -e 's,\.,/,g' -e 's,$$,.hs,')
 
+cabal := $(shell which cabal 2>/dev/null)
+
 all: qc coverage
 
 lib: $(lib)
 
 $(lib): $(lib-srcs:%=../%)
+ifeq ($(cabal),)
 	cd .. && runghc Setup configure --user --prefix=$(HOME)
 	cd .. && runghc Setup build
+else
+	cd .. && cabal configure
+	cd .. && cabal build
+endif
 
 Properties.o: QuickCheckUtils.o