-
-# This is a kludge. The .dyn_hi files currently depend on the .dyn_hi
-# files of modules that they import. But they actually want the .hi
-# files of modules from another package.This we make the .dyn_hi files
-# depend on the .hi files so we are sure that they exist and are
-# up-to-date.
-$$(foreach m,$$(addprefix $1/$2/build/,$$($1_$2_SLASH_MODS)),\
-$$(eval $$(call mkdep,$$m.$$($3_hisuf),$$m.hi)) \
-)
-
+else
+$$($1_$2_$3_LIB) : $$($1_$2_$3_ALL_OBJS) $$(ALL_RTS_LIBS) $$($1_$2_$3_DEPS_LIBS)
+ "$$($1_$2_HC)" $$($1_$2_$3_ALL_OBJS) \
+ `$$($1_$2_$3_MKSTUBOBJS)` \
+ -shared -dynamic -dynload deploy \
+ -dylib-install-name $(ghclibdir)/`basename "$$@" | sed 's/^libHS//;s/[-]ghc.*//'`/`basename "$$@"` \
+ -no-auto-link-packages $$(addprefix -package ,$$($1_$2_DEPS)) \
+ -o $$@
+endif