Skip to content
Snippets Groups Projects
Commit 1d5a157c authored by Simon Marlow's avatar Simon Marlow
Browse files

[project @ 1998-01-22 10:13:49 by simonm]

Even more gruesome hack to avoid -odir $* problems in make depend.
parent 4dfa61b9
No related merge requests found
......@@ -62,14 +62,6 @@
# Compiler produced files that are targets of the source's imports.
MKDEPENDHS_OBJ_SUFFICES=o
# HC_OPTS sometimes contains $*, which will expand to nothing in the depend
# rule below. So we replace $* with a dummy value for passing to mkdependHS
# and hope it works.
#
# This crops up with GhcLibHcOpts which ends in '-split_objs -odir $*'
MKDEPENDHS_HC_OPTS = $(patsubst $*,dollar_star,$(HC_OPTS))
depend :: $(MKDEPENDHS_SRCS) $(MKDEPENDC_SRCS)
@$(RM) .depend
@touch .depend
......@@ -80,9 +72,14 @@ ifneq "$(MKDEPENDC_SRCS)" ""
$(MKDEPENDC) -f .depend $(MKDEPENDC_OPTS) -- $(CC_OPTS) -- $(MKDEPENDC_SRCS)
endif
ifneq "$(MKDEPENDHS_SRCS)" ""
$(MKDEPENDHS) -M -optdep-f -optdep.depend $(foreach way,$(WAYS),-optdep-s -optdep$(way)) $(foreach obj,$(MKDEPENDHS_OBJ_SUFFICES),-optdep-o -optdep$(obj)) $(MKDEPENDHS_OPTS) $(MKDEPENDHS_HC_OPTS) $(MKDEPENDHS_SRCS)
$(MKDEPENDHS) -M -optdep-f -optdep.depend $(foreach way,$(WAYS),-optdep-s -optdep$(way)) $(foreach obj,$(MKDEPENDHS_OBJ_SUFFICES),-optdep-o -optdep$(obj)) $(MKDEPENDHS_OPTS) $(patsubst -odir,,$(HC_OPTS)) $(MKDEPENDHS_SRCS)
endif
# the above patsubst is a hack to remove the '-odir $*' from HC_OPTS
# which is present when we're splitting objects. The $* maps to
# nothing, since this isn't a pattern rule, so we have to get rid of
# the -odir too to avoid problems.
##################################################################
# boot
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment