summaryrefslogtreecommitdiff
path: root/lang/ghc/patches/patch-an
blob: c00237179e672d01d380215c1b5c084a4df8fd99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$NetBSD: patch-an,v 1.1 2003/04/29 11:27:47 augustss Exp $

--- ./hslibs/util/Makefile.orig	Tue Apr 23 11:31:39 2002
+++ ./hslibs/util/Makefile	Fri Mar 28 23:48:02 2003
@@ -23,16 +23,25 @@
   PACKAGE_DEPS := $(filter-out posix, $(PACKAGE_DEPS))
 endif
 
+# hsc2hs needs to find the correct readline includes:
+EXTRA_HSC2HS_OPTS += -I$(ReadlineIncludePath)
+
 # yeuch, have to get LibsReadline in through CPP to util.conf.in
 comma = ,
 PACKAGE_CPP_OPTS += -DLibsReadline='$(patsubst %,$(comma)"%",$(LibsReadline))'
 
+# ... same with ExtraLdOptsReadline:
+PACKAGE_CPP_OPTS += -DExtraLdOptsReadline='$(patsubst %,"%"$(comma),$(ExtraLdOptsReadline))'
+
 # Remove Readline.hs if it is not wanted or headers are not available.
 ifeq "$(GhcLibsWithReadline)" "YES"
   ifneq "$(ReadlineIncludePath)" ""
     SRC_HC_OPTS += -I$(ReadlineIncludePath)
   endif
   STUBOBJS += Readline_stub.$(way_)o
+  ifeq "$(BootingFromHc)" "YES"
+    all :: $(STUBOBJS)
+  endif
   CLEAN_FILES += Readline_stub.[ch] $(STUBOBJS)
 else
   EXCLUDED_SRCS += Readline.hsc Readline_stub.c