From: sof Date: Thu, 16 Aug 2001 22:54:25 +0000 (+0000) Subject: [project @ 2001-08-16 22:54:24 by sof] X-Git-Tag: Approximately_9120_patches~1207 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=48e7208b5b03b375cd8cff78accb521387270ab6;p=ghc-hetmet.git [project @ 2001-08-16 22:54:24 by sof] Death to GHC_INCLUDE_DIR (well, almost). - mk/target.mk: get rid off the abomination of having SRC_CC_OPTS include GHC_INCLUDE_DIR and GHC_RUNTIME_DIR for all fptools/ projects. - mk/suffix.mk: %.pp suffix rule no longer hardwires in the use of GHC_INCLUDE_DIR; just $(CPP_OPTS). ==> If you want GHC_INCLUDE_DIR on the include path, better add it to SRC_CPP_OPTS (say) at the point where you need it (ghc/compiler/Makefile and ghc/lib/std/Makefile do this now). - wipe out the use of -I$(GHC_INCLUDE_DIR) in HC_OPTS in hslibs/; not needed. - hslibs/mk/boilerplate.mk still define GHC_{IO_}INCLUDE_DIR for the purpose of using it when compiling .c files. It should be possible to get rid off it by having CC=$(HC), but I haven't imposed that change (yet). --- diff --git a/ghc/compiler/Makefile b/ghc/compiler/Makefile index f0ab704..3f7fae9 100644 --- a/ghc/compiler/Makefile +++ b/ghc/compiler/Makefile @@ -1,5 +1,5 @@ # ----------------------------------------------------------------------------- -# $Id: Makefile,v 1.188 2001/08/15 18:31:57 qrczak Exp $ +# $Id: Makefile,v 1.189 2001/08/16 22:54:24 sof Exp $ TOP = .. include $(TOP)/mk/boilerplate.mk @@ -324,6 +324,8 @@ PRIMOP_BITS=primop-data-decl.hs-incl \ primop-usage.hs-incl \ primop-primop-info.hs-incl +SRC_CPP_OPTS += -I$(GHC_INCLUDE_DIR) + ifneq "$(BootingFromHc)" "YES" prelude/PrimOp.lhs prelude/PrimOp.o: $(PRIMOP_BITS) endif diff --git a/ghc/lib/std/Makefile b/ghc/lib/std/Makefile index 7f01561..27037d1 100644 --- a/ghc/lib/std/Makefile +++ b/ghc/lib/std/Makefile @@ -63,6 +63,10 @@ PrelCError_HC_OPTS = +RTS -K4m -RTS SRC_MKDEPENDHS_OPTS += -I$(GHC_INCLUDE_DIR) #----------------------------------------------------------------------------- +# Pre-processing (.pp) files +SRC_CPP_OPTS += -I$(GHC_INCLUDE_DIR) + +#----------------------------------------------------------------------------- # Rules PrelPrimopWrappers.hs: ../../compiler/prelude/primops.txt diff --git a/mk/suffix.mk b/mk/suffix.mk index 8ec5acb..fbf8d3d 100644 --- a/mk/suffix.mk +++ b/mk/suffix.mk @@ -277,4 +277,4 @@ endif % : %.pp rm -f $@ - $(CPP) -I$(GHC_INCLUDE_DIR) -x c $< | $(SED) -e '/^#/d' > $@ + $(CPP) $(CPP_OPTS) -x c $< | $(SED) -e '/^#/d' > $@ diff --git a/mk/target.mk b/mk/target.mk index 7522603..4d216fc 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -365,8 +365,6 @@ ifeq "$(LIBOBJS)" "" endif endif -SRC_CC_OPTS += -I$(GHC_INCLUDE_DIR) -I$(GHC_RUNTIME_DIR) - ifeq "$(IS_CBITS_LIB)" "YES" override datadir:=$(libdir)/include INSTALL_DATAS += Hs$(shell perl -e 'print ucfirst "$(PACKAGE)"').h