extra prettyprinting only when debugging
[ghc-hetmet.git] / compiler / Makefile
index 6f3c94c..342a1ab 100644 (file)
@@ -165,6 +165,13 @@ odir=stage$(stage)
 
 SRC_HC_OPTS += $(patsubst %, -i$(odir)/%, $(ALL_DIRS))
 
+SRC_HC_OPTS += -Wall -fno-warn-name-shadowing
+# Turn off orphan warnings, but only if the flag exists (i.e. not if we
+# are building stage 1 and using GHC < 6.3).
+ifneq "$(stage) $(ghc_ge_603)" "1 NO"
+SRC_HC_OPTS += -fno-warn-orphans
+endif
+
 HS_OBJS = $(patsubst %, $(odir)/%, $(addsuffix .$(way_)o,$(basename $(HS_SRCS))))
 C_OBJS = $(patsubst %, $(odir)/%, $(addsuffix .$(way_)o,$(basename $(C_SRCS))))
 
@@ -218,7 +225,7 @@ boot :: $(CONFIG_HS)
 $(CONFIG_HS) : $(FPTOOLS_TOP)/mk/config.mk
        @$(RM) -f $(CONFIG_HS)
        @echo "Creating $(CONFIG_HS) ... "
-       @echo "{-# OPTIONS_GHC -w #-}" >>$(CONFIG_HS)
+       @echo "{-# OPTIONS -w #-}" >>$(CONFIG_HS)
        @echo "module Config where" >>$(CONFIG_HS)
        @echo "cProjectName          = \"$(ProjectName)\"" >> $(CONFIG_HS)
        @echo "cProjectVersion       = \"$(ProjectVersion)\"" >> $(CONFIG_HS)
@@ -732,18 +739,14 @@ SRC_LD_OPTS += -no-link-chk
 INPLACE_PROG = $(odir)/ghc-inplace$(exeext)
 EXCLUDED_C_SRCS += ghc-inplace.c
 
-# FPTOOLS_TOP_ABS platform uses backslashes, at least on Cygwin, but that
-# will go wrong when we use it in a Haskell string below.
-TOP_ABS=$(subst \\,/,$(FPTOOLS_TOP_ABS_PLATFORM))
-
-GHC_PATH=$(TOP_ABS)/$(GHC_COMPILER_DIR_REL)/$(GHC_PROG)$(exeext)
+GHC_PATH=$(FPTOOLS_TOP_ABS)/$(GHC_COMPILER_DIR_REL)/$(GHC_PROG)$(exeext)
 
 ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
 INPLACE_EXTRA_FLAGS = -optc-DWINDOWS
 endif
 
 $(INPLACE_PROG): ghc-inplace.c
-       $(HC) -cpp -optc-DGHC_PATH=$(DQ)$(GHC_PATH)$(DQ) -optc-DTOP_ABS=$(DQ)$(TOP_ABS)$(DQ) $(INPLACE_EXTRA_FLAGS) $< -o $@
+       $(HC) -cpp -optc-DGHC_PATH=$(DQ)$(GHC_PATH)$(DQ) -optc-DTOP_ABS=$(DQ)$(FPTOOLS_TOP_ABS)$(DQ) $(INPLACE_EXTRA_FLAGS) $< -o $@
 
 all :: $(INPLACE_PROG)
 
@@ -857,7 +860,7 @@ GhcLibHcOpts =
 HS_IFACES   = $(addsuffix .$(way_)hi,$(basename $(HS_OBJS)))
 
 # Haddock can't handle recursive modules currently, so we disable it for now.
-HADDOCK_DOCS = NO
+override HADDOCK_DOCS = NO
 
 # Tell package.mk not to set $(HC)
 NO_SET_HC = YES