X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FMakefile;h=b07f7778f939b3058c2420d68109011e9c423973;hb=bcd95f911539fd5308bec5a025bcadba712a3830;hp=6e94fb2869d59e8ddd0e579e4ac3e6321f0f1527;hpb=dec21d06eb80f6d958d18bc185cd84f40d9ef98f;p=ghc-hetmet.git diff --git a/compiler/Makefile b/compiler/Makefile index 6e94fb2..b07f777 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -272,6 +272,11 @@ endif @echo "cUSER_WAY_OPTS = \"$(USER_WAY_OPTS)\"" >> $(CONFIG_HS) @echo "cDEFAULT_TMPDIR = \"$(DEFAULT_TMPDIR)\"" >> $(CONFIG_HS) @echo "cDocDir = \"$(docdir)\"" >> $(CONFIG_HS) +ifeq "$(RelocatableBuild)" "YES" + @echo "cRelocatableBuild = True" >> $(CONFIG_HS) +else + @echo "cRelocatableBuild = False" >> $(CONFIG_HS) +endif @echo done. CLEAN_FILES += $(CONFIG_HS) @@ -488,7 +493,7 @@ SRC_HC_OPTS += -package readline -DUSE_READLINE PKG_DEPENDS += readline endif else --include $(FPTOOLS_TOP)/libraries/readline/config.mk +-include $(FPTOOLS_TOP_ABS)/libraries/readline/config.mk # readline's config.mk sets PACKAGE, which we don't want here PACKAGE= ifeq "$(READLINE_BUILD_PACKAGE)" "yes" @@ -737,9 +742,12 @@ SRC_LD_OPTS += -no-link-chk # See comments in $(FPTOOLS_TOP)/utils/ghc-pkg/Makefile for why we use # a real binary here rather than a shell script. +INPLACE_SRC = $(odir)/ghc-inplace.c INPLACE_PROG = $(odir)/ghc-inplace$(_way)$(exeext) EXCLUDED_C_SRCS += ghc-inplace.c +CLEAN_FILES += $(INPLACE_SRC) + GHC_PATH=$(FPTOOLS_TOP_ABS)/$(GHC_COMPILER_DIR_REL)/$(GHC_PROG)$(exeext) ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32" @@ -747,7 +755,8 @@ INPLACE_EXTRA_FLAGS = -optc-DWINDOWS endif $(INPLACE_PROG): ghc-inplace.c - $(HC) -cpp -optc-DGHC_PATH=$(DQ)$(GHC_PATH)$(DQ) -optc-DTOP_ABS=$(DQ)$(FPTOOLS_TOP_ABS)$(DQ) $(INPLACE_EXTRA_FLAGS) $< -o $@ + $(SED) -e "s@GHC_PATH@$(GHC_PATH)@g" -e "s@TOP_ABS@$(FPTOOLS_TOP_ABS)@g" < $< > $(INPLACE_SRC) + $(HC) -cpp $(INPLACE_EXTRA_FLAGS) $(INPLACE_SRC) -o $@ all :: $(INPLACE_PROG) @@ -855,8 +864,14 @@ GhcLibWays = $(GhcCompilerWays) # override $(GhcLibHcOpts): we want GhcStage2HcOpts to take precedence GhcLibHcOpts = +ifeq "$(DOING_BIN_DIST)" "YES" +# This is derived from the sources when we are in a source tree, but we +# don't have any sources in a bindist, so we have to shortcut it +HS_IFACES := $(wildcard stage$(stage)/*/*.hi) +else # override default definition of HS_IFACES so we can add $(odir) HS_IFACES = $(addsuffix .$(way_)hi,$(basename $(HS_OBJS))) +endif # Haddock can't handle recursive modules currently, so we disable it for now. override HADDOCK_DOCS = NO @@ -931,12 +946,6 @@ endif #----------------------------------------------------------------------------- # binary-dist -ifeq "$(DOING_BIN_DIST)" "YES" -# This is derived from the sources when we are in a source tree, but we -# don't have any sources in a bindist, so we have to shortcut it -HS_IFACES := $(wildcard stage$(stage)/*/*.hi) -endif - binary-dist: $(INSTALL_DIR) $(BIN_DIST_DIR)/compiler $(INSTALL_DIR) $(BIN_DIST_DIR)/compiler/stage$(stage)