[project @ 2002-11-13 12:21:08 by simonmar]
[ghc-hetmet.git] / mk / target.mk
index 3a54c97..252d331 100644 (file)
@@ -44,6 +44,11 @@ PRE_SRCS := $(ALL_SRCS)
 
 include $(TOP)/mk/package.mk
 
+###################################################################
+# Suffix rules for Haskell, C and literate 
+
+include $(TOP)/mk/suffix.mk
+
 ##################################################################
 #              FPtools standard targets
 #
@@ -302,9 +307,8 @@ SRC_HC_OPTS += -split-objs
 ifeq "$(ArSupportsInput)" ""
 define BUILD_LIB
 $(RM) $@ $@.tmp
-(echo $(STUBOBJS) $(EXTRA_OBJS); $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o') | xargs ar q $@.tmp
-$(RANLIB) $@.tmp
-$(MV) $@.tmp $@
+(echo $(STUBOBJS) $(EXTRA_OBJS); $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o') | xargs ar q $@
+$(RANLIB) $@
 endef
 else
 define BUILD_LIB
@@ -312,10 +316,9 @@ $(RM) $@ $@.tmp
 echo $(STUBOBJS)    > $@.list
 echo $(EXTRA_OBJS) >> $@.list
 $(FIND) $(patsubst %.$(way_)o,%_split,$(HS_OBJS)) -name '*.$(way_)o' >> $@.list
-$(AR) $(AR_OPTS) $@.tmp $(ArSupportsInput) $@.list
+$(AR) $(AR_OPTS) $@ $(ArSupportsInput) $@.list
 $(RM) $@.list
-$(RANLIB) $@.tmp
-$(MV) $@.tmp $@
+$(RANLIB) $@
 endef
 endif