From ea5f0fca972758ffc86fd251676b7757d9c3cb18 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 17 Oct 2012 23:04:43 -0400 Subject: [PATCH] workaround for ghci fragility in reusing objects compiled with ghc --- .ghci | 3 --- Makefile | 4 ++++ ghci | 5 +++++ 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100755 ghci diff --git a/.ghci b/.ghci index 318bac2028..c5550cee6e 100644 --- a/.ghci +++ b/.ghci @@ -1,4 +1 @@ --- make ghci use precompiled modules, and C library -:set -outputdir=tmp -:set -IUtility :load Common diff --git a/Makefile b/Makefile index c4341b9aec..796e6af8b6 100644 --- a/Makefile +++ b/Makefile @@ -221,4 +221,8 @@ osxapp: rm -f tmp/git-annex.dmg.bz2 bzip2 tmp/git-annex.dmg +# used by ./ghci +getflags: + @echo $(ALLFLAGS) + .PHONY: $(bins) test install diff --git a/ghci b/ghci new file mode 100755 index 0000000000..57361281c1 --- /dev/null +++ b/ghci @@ -0,0 +1,5 @@ +#!/bin/sh +# This runs ghci with the same flags used when compiling with ghc. +# Certian flags need to be the same in order for ghci to reuse compiled +# objects. +ghci $(make getflags) $@