[project @ 2001-08-16 22:54:24 by sof]
authorsof <unknown>
Thu, 16 Aug 2001 22:54:25 +0000 (22:54 +0000)
committersof <unknown>
Thu, 16 Aug 2001 22:54:25 +0000 (22:54 +0000)
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).

ghc/compiler/Makefile
ghc/lib/std/Makefile
mk/suffix.mk
mk/target.mk

index f0ab704..3f7fae9 100644 (file)
@@ -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
index 7f01561..27037d1 100644 (file)
@@ -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
index 8ec5acb..fbf8d3d 100644 (file)
@@ -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' > $@
index 7522603..4d216fc 100644 (file)
@@ -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