Skip to content

Commit e14fb9f

Browse files
committed
unix: use NEED_* for libressl/openssl split
Now that we have this pattern it makes more sense to use it.
1 parent df9aec8 commit e14fb9f

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

cpython-unix/Makefile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@ ifdef PYBUILD_MUSL
4141
NEED_MUSL := 1
4242
endif
4343

44+
ifdef PYBUILD_LIBRESSL
45+
NEED_LIBRESSL := 1
46+
NEED_OPENSSL :=
47+
else
48+
NEED_OPENSSL := 1
49+
NEED_LIBRESSL :=
50+
endif
51+
4452
ifdef PYBUILD_DEBUG
4553
DEFAULT_EXTRA := -debug
4654
else
@@ -218,7 +226,9 @@ PYTHON_DEPENDS := \
218226
$(if $(NEED_GDBM),$(OUTDIR)/gdbm-$(GDBM_VERSION)-$(PLATFORM).tar) \
219227
$(OUTDIR)/libedit-$(LIBEDIT_VERSION)-$(PLATFORM).tar \
220228
$(OUTDIR)/libffi-$(LIBFFI_VERSION)-$(PLATFORM).tar \
229+
$(if $(NEED_LIBRESSL),$(OUTDIR)/libressl-$(LIBRESSL_VERSION)-$(PLATFORM).tar) \
221230
$(OUTDIR)/ncurses-$(NCURSES_VERSION)-$(PLATFORM).tar \
231+
$(if $(NEED_OPENSSL),$(OUTDIR)/openssl-$(OPENSSL_VERSION)-$(PLATFORM).tar) \
222232
$(if $(NEED_READLINE),$(OUTDIR)/readline-$(READLINE_VERSION)-$(PLATFORM).tar) \
223233
$(OUTDIR)/sqlite-$(SQLITE_VERSION)-$(PLATFORM).tar \
224234
$(if $(NEED_TIX),$(OUTDIR)/tix-$(TIX_VERSION)-$(PLATFORM).tar) \
@@ -228,12 +238,6 @@ PYTHON_DEPENDS := \
228238
$(HERE)/static-modules.$(BASE_PLATFORM) \
229239
$(NULL)
230240

231-
ifdef PYBUILD_LIBRESSL
232-
PYTHON_DEPENDS += $(OUTDIR)/libressl-$(LIBRESSL_VERSION)-$(PLATFORM).tar
233-
else
234-
PYTHON_DEPENDS += $(OUTDIR)/openssl-$(OPENSSL_VERSION)-$(PLATFORM).tar
235-
endif
236-
237241
$(OUTDIR)/cpython-$(PYBUILD_PYTHON_VERSION)-$(PLATFORM).tar: $(PYTHON_DEP_DEPENDS) $(HERE)/build-cpython.sh $(PYTHON_DEPENDS)
238242
$(BUILD) --platform $(PLATFORM) cpython
239243

0 commit comments

Comments
 (0)