Commit fae43d78 authored by Simon Marlow's avatar Simon Marlow

remove unnecessary $(RM)s

parent 5564a292
...@@ -63,7 +63,6 @@ endif ...@@ -63,7 +63,6 @@ endif
rts_AUTO_APPLY_CMM = rts/dist/build/AutoApply.cmm rts_AUTO_APPLY_CMM = rts/dist/build/AutoApply.cmm
$(rts_AUTO_APPLY_CMM): $(GENAPPLY_INPLACE) $(rts_AUTO_APPLY_CMM): $(GENAPPLY_INPLACE)
"$(RM)" $(RM_OPTS) $@
"$(GENAPPLY_INPLACE)" >$@ "$(GENAPPLY_INPLACE)" >$@
rts/dist/build/sm/Evac_thr.c : rts/sm/Evac.c rts/dist/build/sm/Evac_thr.c : rts/sm/Evac.c
......
...@@ -23,16 +23,16 @@ ifneq "$$($1_$2_NO_BUILD_DEPS)" "YES" ...@@ -23,16 +23,16 @@ ifneq "$$($1_$2_NO_BUILD_DEPS)" "YES"
$$($1_$2_depfile) : $$(MKDIRHIER) $$(MKDEPENDC) $$($1_$2_HS_SRCS) $$($1_$2_HS_BOOT_SRCS) $$($1_$2_HC_MK_DEPEND_DEP) $$($1_$2_C_FILES) $$($1_$2_S_FILES) $$($1_$2_depfile) : $$(MKDIRHIER) $$(MKDEPENDC) $$($1_$2_HS_SRCS) $$($1_$2_HS_BOOT_SRCS) $$($1_$2_HC_MK_DEPEND_DEP) $$($1_$2_C_FILES) $$($1_$2_S_FILES)
"$$(MKDIRHIER)" $1/$2/build "$$(MKDIRHIER)" $1/$2/build
"$$(RM)" $$(RM_OPTS) $$@ $$@.tmp "$$(RM)" $$(RM_OPTS) $$@.tmp
touch $$@.tmp touch $$@.tmp
ifneq "$$($1_$2_C_SRCS)$$($1_$2_S_SRCS)" "" 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) || ( "$$(RM)" $$(RM_OPTS) $$@; exit 1 ) "$$(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)/||" <$$($1_$2_depfile).tmp >$$($1_$2_depfile)
endif endif
ifneq "$$($1_$2_HS_SRCS)" "" ifneq "$$($1_$2_HS_SRCS)" ""
"$$($1_$2_HC_MK_DEPEND)" -M $$($1_$2_MKDEPENDHS_FLAGS) \ "$$($1_$2_HC_MK_DEPEND)" -M $$($1_$2_MKDEPENDHS_FLAGS) \
$$(filter-out -split-objs, $$($1_$2_v_ALL_HC_OPTS)) \ $$(filter-out -split-objs, $$($1_$2_v_ALL_HC_OPTS)) \
$$($1_$2_HS_SRCS) || ( "$$(RM)" $$(RM_OPTS) $$@; exit 1 ) $$($1_$2_HS_SRCS)
endif endif
echo "$1_$2_depfile_EXISTS = YES" >> $$@ echo "$1_$2_depfile_EXISTS = YES" >> $$@
ifneq "$$($1_$2_SLASH_MODS)" "" ifneq "$$($1_$2_SLASH_MODS)" ""
......
...@@ -41,7 +41,6 @@ endif ...@@ -41,7 +41,6 @@ endif
ifeq "$3" "dyn" ifeq "$3" "dyn"
# Link a dynamic library # Link a dynamic library
$$($1_$2_$3_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_dyn_C_OBJS) $$($1_$2_dyn_S_OBJS) $$(ALL_RTS_LIBS) $$($1_$2_$3_DEPS_LIBS) $$($1_$2_EXTRA_OBJS) $$($1_$2_$3_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_dyn_C_OBJS) $$($1_$2_dyn_S_OBJS) $$(ALL_RTS_LIBS) $$($1_$2_$3_DEPS_LIBS) $$($1_$2_EXTRA_OBJS)
"$$(RM)" $$(RM_OPTS) $$@
"$$($1_$2_HC)" $$($1_$2_dyn_C_OBJS) $$($1_$2_dyn_S_OBJS) $$($1_$2_$3_HS_OBJS) \ "$$($1_$2_HC)" $$($1_$2_dyn_C_OBJS) $$($1_$2_dyn_S_OBJS) $$($1_$2_$3_HS_OBJS) \
`$$($1_$2_$3_MKSTUBOBJS)` $$($1_$2_EXTRA_OBJS) \ `$$($1_$2_$3_MKSTUBOBJS)` $$($1_$2_EXTRA_OBJS) \
-shared -dynamic -dynload deploy \ -shared -dynamic -dynload deploy \
...@@ -52,11 +51,11 @@ else ...@@ -52,11 +51,11 @@ else
ifeq "$$($1_$2_SplitObjs)" "YES" ifeq "$$($1_$2_SplitObjs)" "YES"
$$($1_$2_$3_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS) $$($1_$2_$3_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS)
"$$(RM)" $$(RM_OPTS) $$@ "$$(RM)" $$(RM_OPTS) $$@
(echo $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) `$$($1_$2_$3_MKSTUBOBJS)` $$($1_$2_EXTRA_OBJS); find $$(patsubst %.$$($3_osuf),%_split,$$($1_$2_$3_HS_OBJS)) -name '*.$$($3_osuf)' -print) | $$(XARGS) $$(AR) $$(EXTRA_AR_ARGS) $$@ || "$$(RM)" $$(RM_OPTS) $$@ (echo $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) `$$($1_$2_$3_MKSTUBOBJS)` $$($1_$2_EXTRA_OBJS); find $$(patsubst %.$$($3_osuf),%_split,$$($1_$2_$3_HS_OBJS)) -name '*.$$($3_osuf)' -print) | $$(XARGS) $$(AR) $$(EXTRA_AR_ARGS) $$@
else else
$$($1_$2_$3_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS) $$($1_$2_$3_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS)
"$$(RM)" $$(RM_OPTS) $$@ "$$(RM)" $$(RM_OPTS) $$@
echo $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_$3_HS_OBJS) `$$($1_$2_$3_MKSTUBOBJS)` $$($1_$2_EXTRA_OBJS) | $$(XARGS) $$(AR) $$(EXTRA_AR_ARGS) $$@ || "$$(RM)" $$(RM_OPTS) $$@ echo $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_$3_HS_OBJS) `$$($1_$2_$3_MKSTUBOBJS)` $$($1_$2_EXTRA_OBJS) | $$(XARGS) $$(AR) $$(EXTRA_AR_ARGS) $$@
endif endif
endif endif
...@@ -77,7 +76,6 @@ ifneq "$4" "0" ...@@ -77,7 +76,6 @@ ifneq "$4" "0"
BINDIST_LIBS += $$($1_$2_GHCI_LIB) BINDIST_LIBS += $$($1_$2_GHCI_LIB)
endif endif
$$($1_$2_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS) $$($1_$2_GHCI_LIB) : $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) $$($1_$2_EXTRA_OBJS)
"$$(RM)" $$(RM_OPTS) $$@
"$$(LD)" -r -o $$@ $$(EXTRA_LD_OPTS) $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) `$$($1_$2_$3_MKSTUBOBJS)` $$($1_$2_EXTRA_OBJS) "$$(LD)" -r -o $$@ $$(EXTRA_LD_OPTS) $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_CMM_OBJS) $$($1_$2_$3_C_OBJS) $$($1_$2_$3_S_OBJS) `$$($1_$2_$3_MKSTUBOBJS)` $$($1_$2_EXTRA_OBJS)
$(call all-target,$1_$2,$$($1_$2_GHCI_LIB)) $(call all-target,$1_$2,$$($1_$2_GHCI_LIB))
......
...@@ -39,7 +39,6 @@ ifeq "$(findstring clean,$(MAKECMDGOALS))" "" ...@@ -39,7 +39,6 @@ ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
ifneq "$$(BINDIST)" "YES" ifneq "$$(BINDIST)" "YES"
$1/$2/$$($1_$2_PROG).prl: $1/$$($1_PERL_SRC) $$(UNLIT) $1/$2/$$($1_$2_PROG).prl: $1/$$($1_PERL_SRC) $$(UNLIT)
"$$(MKDIRHIER)" $1/$2 "$$(MKDIRHIER)" $1/$2
"$$(RM)" $$(RM_OPTS) $$@
"$$(UNLIT)" $$(UNLIT_OPTS) $$< $$@ "$$(UNLIT)" $$(UNLIT_OPTS) $$< $$@
$1/$2/$$($1_$2_PROG): $1/$2/$$($1_$2_PROG).prl $1/$2/$$($1_$2_PROG): $1/$2/$$($1_$2_PROG).prl
...@@ -51,7 +50,6 @@ $1/$2/$$($1_$2_PROG): $1/$2/$$($1_$2_PROG).prl ...@@ -51,7 +50,6 @@ $1/$2/$$($1_$2_PROG): $1/$2/$$($1_$2_PROG).prl
$$($1_$2_INPLACE): $1/$2/$$($1_$2_PROG) $$($1_$2_INPLACE): $1/$2/$$($1_$2_PROG)
"$$(MKDIRHIER)" $$(dir $$@) "$$(MKDIRHIER)" $$(dir $$@)
"$$(RM)" $$(RM_OPTS) $$@
"$$(CP)" $$< $$@ "$$(CP)" $$< $$@
$$(EXECUTABLE_FILE) $$@ $$(EXECUTABLE_FILE) $$@
endif endif
......
...@@ -21,53 +21,42 @@ define c-suffix-rules ...@@ -21,53 +21,42 @@ define c-suffix-rules
ifeq "$4 $$(BootingFromHc)" "YES NO" ifeq "$4 $$(BootingFromHc)" "YES NO"
$1/$2/build/%.$$($3_osuf) : $1/%.c $$(MKDIRHIER) $$($1_$2_HC_DEP) $1/$2/build/%.$$($3_osuf) : $1/%.c $$(MKDIRHIER) $$($1_$2_HC_DEP)
"$$(RM)" $$(RM_OPTS) $$@
"$$(MKDIRHIER)" $$(dir $$@) "$$(MKDIRHIER)" $$(dir $$@)
"$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -c $$< -o $$@ "$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -c $$< -o $$@
$1/$2/build/%.$$($3_osuf) : $1/$2/build/%.c $$($1_$2_HC_DEP) $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.c $$($1_$2_HC_DEP)
"$$(RM)" $$(RM_OPTS) $$@
"$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -c $$< -o $$@ "$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -c $$< -o $$@
$1/$2/build/%.$$($3_osuf) : $1/$2/build/%.$$($3_way_)s $$($1_$2_HC_DEP) $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.$$($3_way_)s $$($1_$2_HC_DEP)
"$$(RM)" $$(RM_OPTS) $$@
"$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -c $$< -o $$@ "$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -c $$< -o $$@
$1/$2/build/%.$$($3_osuf) : $1/%.S $$(MKDIRHIER) $$($1_$2_HC_DEP) $1/$2/build/%.$$($3_osuf) : $1/%.S $$(MKDIRHIER) $$($1_$2_HC_DEP)
"$$(RM)" $$(RM_OPTS) $$@
"$$(MKDIRHIER)" $$(dir $$@) "$$(MKDIRHIER)" $$(dir $$@)
"$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -c $$< -o $$@ "$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -c $$< -o $$@
$1/$2/build/%.$$($3_way_)s : $1/$2/build/%.c $$($1_$2_HC_DEP) $1/$2/build/%.$$($3_way_)s : $1/$2/build/%.c $$($1_$2_HC_DEP)
"$$(RM)" $$(RM_OPTS) $$@
"$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -S $$< -o $$@ "$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -S $$< -o $$@
$1/$2/build/%.$$($3_way_)s : $1/%.c $$($1_$2_HC_DEP) $1/$2/build/%.$$($3_way_)s : $1/%.c $$($1_$2_HC_DEP)
"$$(RM)" $$(RM_OPTS) $$@
"$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -S $$< -o $$@ "$$($1_$2_HC)" $$($1_$2_$3_GHC_CC_OPTS) -S $$< -o $$@
else else
$1/$2/build/%.$$($3_osuf) : $1/%.c $$(MKDIRHIER) $1/$2/build/%.$$($3_osuf) : $1/%.c $$(MKDIRHIER)
"$$(RM)" $$(RM_OPTS) $$@
"$$(MKDIRHIER)" $$(dir $$@) "$$(MKDIRHIER)" $$(dir $$@)
"$$(CC)" $$($1_$2_$3_ALL_CC_OPTS) -c $$< -o $$@ "$$(CC)" $$($1_$2_$3_ALL_CC_OPTS) -c $$< -o $$@
$1/$2/build/%.$$($3_osuf) : $1/$2/build/%.c $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.c
"$$(RM)" $$(RM_OPTS) $$@
"$$(CC)" $$($1_$2_$3_ALL_CC_OPTS) -c $$< -o $$@ "$$(CC)" $$($1_$2_$3_ALL_CC_OPTS) -c $$< -o $$@
$1/$2/build/%.$$($3_osuf) : $1/$2/build/%.$$($3_way_)s $1/$2/build/%.$$($3_osuf) : $1/$2/build/%.$$($3_way_)s
"$$(RM)" $$(RM_OPTS) $$@
"$$(AS)" $$($1_$2_$3_ALL_AS_OPTS) -o $$@ $$< "$$(AS)" $$($1_$2_$3_ALL_AS_OPTS) -o $$@ $$<
$1/$2/build/%.$$($3_osuf) : $1/%.S $$(MKDIRHIER) $1/$2/build/%.$$($3_osuf) : $1/%.S $$(MKDIRHIER)
"$$(RM)" $$(RM_OPTS) $$@
"$$(MKDIRHIER)" $$(dir $$@) "$$(MKDIRHIER)" $$(dir $$@)
"$$(CC)" $$($1_$2_$3_ALL_CC_OPTS) -c $$< -o $$@ "$$(CC)" $$($1_$2_$3_ALL_CC_OPTS) -c $$< -o $$@
$1/$2/build/%.$$($3_way_)s : $1/$2/build/%.c $1/$2/build/%.$$($3_way_)s : $1/$2/build/%.c
"$$(RM)" $$(RM_OPTS) $$@
"$$(CC)" $$($1_$2_$3_ALL_CC_OPTS) -S $$< -o $$@ "$$(CC)" $$($1_$2_$3_ALL_CC_OPTS) -S $$< -o $$@
endif endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment