#
# depend:
#
-# The Depend target has to cope with a set of files that may have
+# The depend target has to cope with a set of files that may have
# different ways of computing their dependencies, i.e., a Haskell
# module's dependencies are computed differently from C files.
#
PKGCONF_DEP =
endif
-depend :: .depend
-
-.depend: $(MKDEPENDHS_SRCS) $(MKDEPENDC_SRCS) $(STAMP_PKG_CONF)
- @$(RM) $@
- @touch $@
+depend :: $(MKDEPENDHS_SRCS) $(MKDEPENDC_SRCS) $(STAMP_PKG_CONF)
+ @$(RM) .depend
+ @touch .depend
ifneq "$(DOC_SRCS)" ""
- $(MKDEPENDLIT) -o $@ $(MKDEPENDLIT_OPTS) $(filter %.lit,$(DOC_SRCS))
+ $(MKDEPENDLIT) -o .depend $(MKDEPENDLIT_OPTS) $(filter %.lit,$(DOC_SRCS))
endif
ifneq "$(MKDEPENDC_SRCS)" ""
- $(MKDEPENDC) -f $@ $(MKDEPENDC_OPTS) $(foreach way,$(WAYS),-s $(way)) -- $(CC_OPTS) -- $(MKDEPENDC_SRCS)
+ $(MKDEPENDC) -f .depend $(MKDEPENDC_OPTS) $(foreach way,$(WAYS),-s $(way)) -- $(CC_OPTS) -- $(MKDEPENDC_SRCS)
endif
ifneq "$(MKDEPENDHS_SRCS)" ""
- $(MKDEPENDHS) -M -optdep-f -optdep$@ $(foreach way,$(WAYS),-optdep-s -optdep$(way)) $(foreach obj,$(MKDEPENDHS_OBJ_SUFFICES),-osuf $(obj)) $(MKDEPENDHS_OPTS) $(filter-out -split-objs, $(HC_OPTS)) $(MKDEPENDHS_SRCS)
+ $(MKDEPENDHS) -M -optdep-f -optdep.depend $(foreach way,$(WAYS),-optdep-s -optdep$(way)) $(foreach obj,$(MKDEPENDHS_OBJ_SUFFICES),-osuf $(obj)) $(MKDEPENDHS_OPTS) $(filter-out -split-objs, $(HC_OPTS)) $(MKDEPENDHS_SRCS)
endif
ifeq "$(ArSupportsInput)" ""
define BUILD_LIB
$(RM) $@ $@.tmp
-(echo $(STUBOBJS) $(EXTRA_OBJS); $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o') | xargs ar q $@
+(echo $(STUBOBJS) $(C_OBJS); $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o') -print | xargs $(AR) $@
$(RANLIB) $@
endef
else
define BUILD_LIB
$(RM) $@ $@.tmp
-echo $(STUBOBJS) > $@.list
-echo $(EXTRA_OBJS) >> $@.list
-$(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o' >> $@.list
+echo $(STUBOBJS) > $@.list
+echo $(C_OBJS) >> $@.list
+$(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o' -print >> $@.list
$(AR) $(AR_OPTS) $@ $(ArSupportsInput) $@.list
$(RM) $@.list
$(RANLIB) $@
HC_SPLIT_PRE = \
$(RM) $@; if [ ! -d $(basename $@)_split ]; then mkdir $(basename $@)_split; else \
- $(FIND) $(basename $@)_split -name '*.$(way_)o' | xargs $(RM) __rm_food; fi
+ $(FIND) $(basename $@)_split -name '*.$(way_)o' -print | xargs $(RM) __rm_food; fi
ifeq "$(GhcWithInterpreter)" "YES"
HC_SPLIT_POST = (cd $(dir $@) && $(LD) -r $(LD_X) -o $(notdir $@) $(basename $(notdir $@))_split/*.$(way_)o)
else
# the --no-print-directory flag which is passed to recursive
# invocations of make.
#
-ifeq "$(way)" ""
+#ifeq "$(way)" ""
ifneq "$(SUBDIRS)" ""
# we override the 'boot', 'all' and 'install' targets in the top
@echo "------------------------------------------------------------------------"
endif
-endif
+#endif
#
# Selectively building subdirectories.