ifneq "$(BINDIST)" "YES"
$(libffi_STAMP_CONFIGURE):
"$(RM)" $(RM_OPTS_REC) $(LIBFFI_DIR) libffi/build
- cat ghc-tarballs/libffi/libffi*.tar.gz | $(GZIP) -d | { cd libffi && $(TAR) -xf - ; }
+ cat ghc-tarballs/libffi/libffi*.tar.gz | $(GZIP_CMD) -d | { cd libffi && $(TAR_CMD) -xf - ; }
mv libffi/libffi-* libffi/build
chmod +x libffi/ln
touch $@
$(libffi_STATIC_LIB): $(libffi_STAMP_BUILD)
+ @test -f $@
+
# Rename libffi.a to libHSffi.a
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.a
ifeq "$(BuildSharedLibs)" "YES"
ifeq "$(Windows)" "YES"
libffi/libffi.dll.a $(libffi_HS_DYN_LIB): $(libffi_STAMP_BUILD)
+ @test -f $@
+
# Windows libtool creates <soname>.dll, and as we already patched that
# there is no need to copy from libffi.dll to libHSffi...dll.
# However, the renaming is still required for the import library
else
$(libffi_DYNAMIC_LIBS): $(libffi_STAMP_BUILD)
+ @test -f $@
+
# Rename libffi.so to libHSffi...so
$(libffi_HS_DYN_LIB): $(libffi_DYNAMIC_LIBS) | $$(dir $$@)/.
"$(CP)" $(word 1,$(libffi_DYNAMIC_LIBS)) $(libffi_HS_DYN_LIB)