micro-opt: replace stmGetEnclosingTRec() with a field access
[ghc-hetmet.git] / rules / build-dependencies.mk
index 68d45c8..dfb98d2 100644 (file)
@@ -26,7 +26,7 @@ $$($1_$2_depfile) : $$(MKDEPENDC) $$($1_$2_HS_SRCS) $$($1_$2_HS_BOOT_SRCS) $$($1
        touch $$@.tmp
 ifneq "$$($1_$2_C_SRCS)$$($1_$2_S_SRCS)" ""
        "$$(MKDEPENDC)" -f $$($1_$2_depfile).tmp $$($1_MKDEPENDC_OPTS) $$(foreach way,$$($1_WAYS),-s $$(way)) -- $$($1_$2_v_ALL_CC_OPTS) -- $$($1_$2_C_FILES) $$($1_$2_S_FILES)
-       sed -e "s|$1/\([^ :]*o[ :]\)|$1/$2/build/\1|g" -e "s|$$(TOP)/||" <$$($1_$2_depfile).tmp >$$($1_$2_depfile)
+       sed -e "s|$1/\([^ :]*o[ :]\)|$1/$2/build/\1|g" -e "s|$$(TOP)/||" -e "s|$2/build/$2/build|$2/build|g" <$$($1_$2_depfile).tmp >$$($1_$2_depfile)
 endif
 ifneq "$$($1_$2_HS_SRCS)" ""
        "$$($1_$2_HC_MK_DEPEND)" -M $$($1_$2_MKDEPENDHS_FLAGS) \