summaryrefslogtreecommitdiff
path: root/libffi
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-01-15 20:21:04 +0000
committerIan Lynagh <igloo@earth.li>2011-01-15 20:21:04 +0000
commiteb675b52615870c462aa34dce559d1597fdfcce5 (patch)
tree5b7549d13a181c837c5260c43fd4b357ba6a4f51 /libffi
parent66dfd5c5947c79eabd7e3bdf6aa6e9b5b506564b (diff)
downloadhaskell-eb675b52615870c462aa34dce559d1597fdfcce5.tar.gz
Fix libffi build rules
Fixes a rare race when both libHSffi.a and libHSffi_p.a were being built at the same time: "cp" libffi/dist-install/build/libffi.a libffi/dist-install/build/libHSffi.a "cp" libffi/dist-install/build/libffi.a libffi/dist-install/build/libHSffi.a "cp" libffi/dist-install/build/libffi.so libffi/dist-install/build/libHSffi-ghc7.1.20110115.so cp: cannot create regular file `libffi/dist-install/build/libHSffi.a': File exists
Diffstat (limited to 'libffi')
-rw-r--r--libffi/ghc.mk4
1 files changed, 3 insertions, 1 deletions
diff --git a/libffi/ghc.mk b/libffi/ghc.mk
index 887df1d525..f207eb0d3a 100644
--- a/libffi/ghc.mk
+++ b/libffi/ghc.mk
@@ -161,8 +161,10 @@ $(libffi_STATIC_LIB): $(libffi_STAMP_BUILD)
@test -f $@ || { echo "$< exits, but $@ does not."; echo "Suggest removing $<."; exit 1; }
# Rename libffi.a to libHSffi.a
-libffi/dist-install/build/libHSffi.a libffi/dist-install/build/libHSffi_p.a: $(libffi_STATIC_LIB)
+libffi/dist-install/build/libHSffi.a: $(libffi_STATIC_LIB)
"$(CP)" $(libffi_STATIC_LIB) libffi/dist-install/build/libHSffi.a
+
+libffi/dist-install/build/libHSffi_p.a: $(libffi_STATIC_LIB)
"$(CP)" $(libffi_STATIC_LIB) libffi/dist-install/build/libHSffi_p.a
$(eval $(call all-target,libffi,$(INSTALL_HEADERS) $(INSTALL_LIBS)))