Skip to content

Commit a1d326a

Browse files
committed
Tweaks to avoid rebuilds.
1 parent 97920ff commit a1d326a

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

Makefile

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ downloads/openssl-$(OPENSSL_VERSION).tgz:
214214
# Setup: libFFI
215215
###########################################################################
216216

217-
# Clean the LibFFI project
217+
# Clean the libFFI project
218218
clean-libFFI:
219219
@echo ">>> Clean libFFI build products"
220220
rm -rf build/*/libffi-$(LIBFFI_VERSION) \
@@ -393,15 +393,14 @@ endif
393393

394394
$$(OPENSSL_DIR-$(target))/libssl.a: $$(OPENSSL_DIR-$(target))/Makefile
395395
@echo ">>> Build OpenSSL for $(target)"
396-
# Make and install just the software (not the docs)
397396
cd $$(OPENSSL_DIR-$(target)) && \
398397
CC="$$(CC-$(target))" \
399398
CROSS_TOP="$$(dir $$(SDK_ROOT-$(target))).." \
400399
CROSS_SDK="$$(notdir $$(SDK_ROOT-$(target)))" \
401-
make depend _all\
400+
make depend _all \
402401
2>&1 | tee -a ../openssl-$(target).build.log
403402

404-
$$(OPENSSL_SSL_LIB-$(target)) $$(OPENSSL_CRYPTO_LIB-$(target)): $$(OPENSSL_DIR-$(target))/libssl.a
403+
$$(OPENSSL_SSL_LIB-$(target)): $$(OPENSSL_DIR-$(target))/libssl.a
405404
@echo ">>> Install OpenSSL for $(target)"
406405
# Install just the software (not the docs)
407406
cd $$(OPENSSL_DIR-$(target)) && \
@@ -423,7 +422,7 @@ LIBFFI_DIR-$(os)=build/$(os)/libffi-$(LIBFFI_VERSION)
423422
LIBFFI_DIR-$(target)=$$(LIBFFI_DIR-$(os))/build_$$(SDK-$(target))-$$(ARCH-$(target))
424423
LIBFFI_LIB-$(target)=$$(LIBFFI_DIR-$(target))/.libs/libffi.a
425424

426-
$$(LIBFFI_LIB-$(target)): $$(LIBFFI_DIR-$(os))/darwin_common
425+
$$(LIBFFI_LIB-$(target)): $$(LIBFFI_DIR-$(os))/darwin_common/include/ffi.h
427426
@echo ">>> Build libFFI for $(target)"
428427
cd $$(LIBFFI_DIR-$(target)) && \
429428
make \
@@ -582,22 +581,23 @@ $$(XZ_FATLIB-$(sdk)): $$(foreach target,$$(SDK_TARGETS-$(sdk)),$$(XZ_LIB-$$(targ
582581

583582
OPENSSL_FATLIB-$(sdk)=build/$(os)/openssl/$(sdk)/lib/libOpenSSL.a
584583

585-
$$(OPENSSL_FATLIB-$(sdk)): $$(foreach target,$$(SDK_TARGETS-$(sdk)),$$(OPENSSL_SSL_LIB-$$(target)) $$(OPENSSL_CRYPTO_LIB-$$(target)))
584+
$$(OPENSSL_FATLIB-$(sdk)): $$(foreach target,$$(SDK_TARGETS-$(sdk)),$$(OPENSSL_SSL_LIB-$$(target)))
586585
@echo ">>> Build OpenSSL fat library for $(sdk)"
587586
mkdir -p build/$(os)/openssl/$(sdk)/lib
588-
xcrun --sdk $(sdk) libtool -no_warning_for_no_symbols -static -o $$@ $$^ \
587+
xcrun --sdk $(sdk) libtool -no_warning_for_no_symbols -static -o $$@ \
588+
$$(foreach target,$$(SDK_TARGETS-$(sdk)),$$(OPENSSL_SSL_LIB-$$(target)) $$(OPENSSL_CRYPTO_LIB-$$(target))) \
589589
2>&1 | tee -a build/$(os)/openssl-$(sdk).libtool.log
590590
# Copy headers from the first target associated with the SDK
591591
cp -r $$(OPENSSL_DIR-$$(firstword $$(SDK_TARGETS-$(sdk))))/_install/include build/$(os)/openssl/$(sdk)
592592

593593
###########################################################################
594-
# SDK: LibFFI
594+
# SDK: libFFI
595595
###########################################################################
596596

597597
LIBFFI_FATLIB-$(sdk)=$$(LIBFFI_DIR-$(os))/_install/$(sdk)/libFFI.a
598598

599599
$$(LIBFFI_FATLIB-$(sdk)): $$(foreach target,$$(SDK_TARGETS-$(sdk)),$$(LIBFFI_LIB-$$(target)))
600-
@echo ">>> Build LibFFI fat library for $(sdk)"
600+
@echo ">>> Build libFFI fat library for $(sdk)"
601601
mkdir -p $$(LIBFFI_DIR-$(os))/_install/$(sdk)
602602
xcrun --sdk $(sdk) libtool -no_warning_for_no_symbols -static -o $$@ $$^ \
603603
2>&1 | tee -a build/$(os)/libffi-$(sdk).libtool.log
@@ -739,8 +739,7 @@ ifneq ($(os),macOS)
739739
LIBFFI_XCFRAMEWORK-$(os)=build/$(os)/Support/libFFI.xcframework
740740
LIBFFI_DIR-$(os)=build/$(os)/libffi-$(LIBFFI_VERSION)
741741

742-
# Unpack LibFFI and generate source & headers
743-
$$(LIBFFI_DIR-$(os))/darwin_common: downloads/libffi-$(LIBFFI_VERSION).tgz Python-macOS
742+
$$(LIBFFI_DIR-$(os))/darwin_common/include/ffi.h: downloads/libffi-$(LIBFFI_VERSION).tgz Python-macOS
744743
@echo ">>> Unpack and configure libFFI sources on $(os)"
745744
mkdir -p $$(LIBFFI_DIR-$(os))
746745
tar zxf downloads/libffi-$(LIBFFI_VERSION).tgz --strip-components 1 -C $$(LIBFFI_DIR-$(os))

0 commit comments

Comments
 (0)