HC_SPLIT_POST: reduce the risk of exceeding command line length limits.
[As was, constructing the relocatable ".o"s from split object files
failed with stuff inside of libraries/haskell-src/Language/Haskell/
under cygwin(&bash).]
$(RM) $@; if [ ! -d $(basename $@)_split ]; then mkdir $(basename $@)_split; else \
$(FIND) $(basename $@)_split -name '*.$(way_)o' | xargs $(RM) __rm_food; fi
ifeq "$(GhcWithInterpreter)" "YES"
$(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 $@)_split/*.$(way_)o
+HC_SPLIT_POST = (cd $(dir $@) && $(LD) -r $(LD_X) -o $(notdir $@) $(basename $(notdir $@))_split/*.$(way_)o)
else
HC_SPLIT_POST = touch $@
endif # GhcWithInterpreter == YES
else
HC_SPLIT_POST = touch $@
endif # GhcWithInterpreter == YES