From 9f66c841f79f96dd2e933bd2dc6ca054ef6aac2d Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 13 Feb 2002 10:40:24 +0000 Subject: [PATCH] [project @ 2002-02-13 10:40:24 by simonmar] Fixes to SplitObjs: we now put the split object files in a subdirectory M_split/ rather than just M/, because the latter interacts badly with our hierarchical module structure. --- ghc/compiler/main/DriverPipeline.hs | 2 +- mk/target.mk | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ghc/compiler/main/DriverPipeline.hs b/ghc/compiler/main/DriverPipeline.hs index f48f9e0..e0b0097 100644 --- a/ghc/compiler/main/DriverPipeline.hs +++ b/ghc/compiler/main/DriverPipeline.hs @@ -712,7 +712,7 @@ run_phase SplitAs basename _suff _input_fn output_fn odir <- readIORef v_Output_dir let real_odir = case odir of - Nothing -> basename + Nothing -> basename ++ "_split" Just d -> d let assemble_file n diff --git a/mk/target.mk b/mk/target.mk index cf73e23..d361d39 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -296,7 +296,7 @@ SRC_HC_OPTS += -split-objs ifeq "$(ArSupportsInput)" "" define BUILD_LIB $(RM) $@ $@.tmp -(echo $(STUBOBJS); $(FIND) $(patsubst %.$(way_)o,%,$(LIBOBJS)) -name '*.$(way_)o') | xargs ar q $@.tmp +(echo $(STUBOBJS); $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o') | xargs ar q $@.tmp $(RANLIB) $@.tmp $(MV) $@.tmp $@ endef @@ -304,7 +304,7 @@ else define BUILD_LIB $(RM) $@ $@.tmp echo $(STUBOBJS) > $@.list -$(FIND) $(patsubst %.$(way_)o,%,$(LIBOBJS)) -name '*.$(way_)o' >> $@.list +$(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o' >> $@.list $(AR) $(AR_OPTS) $@.tmp $(ArSupportsInput) $@.list $(RM) $@.list $(RANLIB) $@.tmp @@ -315,10 +315,10 @@ endif # Extra stuff for compiling Haskell files with $(SplitObjs): HC_SPLIT_PRE = \ - $(RM) $@; if [ ! -d $(basename $@) ]; then mkdir $(basename $@); else \ - $(FIND) $(basename $@) -name '*.$(way_)o' | xargs $(RM) __rm_food; fi + $(RM) $@; if [ ! -d $(basename $@)_split ]; then mkdir $(basename $@)_split; else \ + $(FIND) $(basename $@)_split -name '*.$(way_)o' | xargs $(RM) __rm_food; fi ifeq "$(GhcWithInterpreter)" "YES" -HC_SPLIT_POST = $(LD) -r $(LD_X) -o $@ $(basename $@)/*.$(way_)o +HC_SPLIT_POST = $(LD) -r $(LD_X) -o $@ $(basename $@)_split/*.$(way_)o else HC_SPLIT_POST = touch $@ endif # GhcWithInterpreter == YES @@ -333,8 +333,8 @@ SRC_HC_POST_OPTS += $(HC_SPLIT_POST); # extraclean :: - $(FIND) $(patsubst %.$(way_)o,%,$(HS_OBJS)) -name '*.$(way_)o' -print | xargs $(RM) __rm_food - -rmdir $(patsubst %.$(way_)o,%,$(HS_OBJS)) > /dev/null 2>&1 + $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o' -print | xargs $(RM) __rm_food + -rmdir $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) > /dev/null 2>&1 endif # $(way) == u endif # $(SplitObjs) @@ -347,7 +347,7 @@ endif # $(HS_SRCS) ifeq "$(StripLibraries)" "YES" ifeq "$(SplitObjs)" "YES" SRC_HC_POST_OPTS += \ - for i in $(basename $@)/*; do \ + for i in $(basename $@)_split/*; do \ $(LD) -r $(LD_X) -o $$i.tmp $$i; \ $(MV) $$i.tmp $$i; \ done -- 1.7.10.4