File 0491-ssl-Fix-make-deps.patch of Package erlang
From ed9511839b509343db2cf8bccc7014108258a6c5 Mon Sep 17 00:00:00 2001
From: Lukas Larsson <lukas@erlang.org>
Date: Fri, 14 May 2021 10:21:26 +0200
Subject: [PATCH] ssl: Fix make deps
This commit fixes two issues. Firstly it makes it so that
the include files that we depend on is not taken from the
bootstrap system, which means that the prebuild should work.
Secondly it makes sure that if `$ERL_TOP` is something small
(like just `/OTP`), we do not do an overly zelous sed match.
Closes #4823
---
lib/ssl/prebuild.skip | 1 -
lib/ssl/src/Makefile | 7 +++++--
2 files changed, 5 insertions(+), 3 deletions(-)
delete mode 100644 lib/ssl/prebuild.skip
diff --git a/lib/ssl/prebuild.skip b/lib/ssl/prebuild.skip
deleted file mode 100644
index c416485981..0000000000
--- a/lib/ssl/prebuild.skip
+++ /dev/null
@@ -1 +0,0 @@
-src/deps/ssl.d
\ No newline at end of file
diff --git a/lib/ssl/src/Makefile b/lib/ssl/src/Makefile
index 5edd6cb4b9..9cbee91946 100644
--- a/lib/ssl/src/Makefile
+++ b/lib/ssl/src/Makefile
@@ -172,12 +172,16 @@ ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/kernel/src \
# Targets
# ----------------------------------------------------
+opt debug: $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) $(DEP_FILE)
+
+deps: $(DEP_FILE)
+
$(TARGET_FILES): $(BEHAVIOUR_TARGET_FILES)
$(DEP_FILE): $(ERL_FILES)
@echo SED $(TARGET) $(ERL_TOP_NATIVE)
$(gen_verbose)erlc -M $(ERL_FILES) \
- | sed "s@[a-zA-Z]\?$(ERL_TOP_NATIVE)@../../..@g" \
+ | sed "s@[a-zA-Z]\?$(ERL_TOP_NATIVE)/\(bootstrap/\)\?lib/\([^/]\+/\)@../../\2@g" \
| sed "s/\.$(EMULATOR)/\.$$\(EMULATOR\)/" \
| sed 's@^dtls_@$$(EBIN)/dtls_@' \
| sed 's@^inet_@$$(EBIN)/inet_@' \
@@ -185,7 +189,6 @@ $(DEP_FILE): $(ERL_FILES)
| sed 's@^tls_@$$(EBIN)/tls_@' \
> $(DEP_FILE)
-debug opt: $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) $(DEP_FILE)
clean:
rm -f $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET) $(BEHAVIOUR_TARGET_FILES)
--
2.26.2