File 4714-Fix-ERTS_SKIP_DEPEND.patch of Package erlang

From 5371e92a72e54407e2c466b8fb64306200817a32 Mon Sep 17 00:00:00 2001
From: Dan Gudmundsson <dgud@erlang.org>
Date: Wed, 22 Jan 2020 18:27:14 +0100
Subject: [PATCH 04/11] Fix ERTS_SKIP_DEPEND

Makes one time compilation faster on windows,
deps generation is slow.
---
 erts/emulator/Makefile.in         | 2 ++
 erts/lib_src/Makefile.in          | 2 ++
 lib/erl_interface/src/Makefile.in | 5 ++++-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in
index 319987580e..1a61680c8c 100644
--- a/erts/emulator/Makefile.in
+++ b/erts/emulator/Makefile.in
@@ -1304,6 +1304,7 @@ endif
 	$(V_at)cd $(ERTS_LIB_DIR) && $(MAKE) depend
 endif
 
+ifneq ($(ERTS_SKIP_DEPEND),true)
 ifneq ($(MAKECMDGOALS),clean)
 ifneq ($(MAKECMDGOALS),generate)
 ifndef VOID_EMULATOR
@@ -1311,5 +1312,6 @@ ifndef VOID_EMULATOR
 endif
 endif
 endif
+endif
 
 include $(ERL_TOP)/make/app_targets.mk
diff --git a/erts/lib_src/Makefile.in b/erts/lib_src/Makefile.in
index df87100a44..85250c4358 100644
--- a/erts/lib_src/Makefile.in
+++ b/erts/lib_src/Makefile.in
@@ -656,8 +656,10 @@ endif
 endif
 	@echo "# EOF" >> $(DEPEND_MK);
 
+ifneq ($(ERTS_SKIP_DEPEND),true)
 ifneq ($(MAKECMDGOALS),clean)
 -include $(DEPEND_MK)
 endif
+endif
 
 # eof
diff --git a/lib/erl_interface/src/Makefile.in b/lib/erl_interface/src/Makefile.in
index 5dee4dc5ed..f6cd33803e 100644
--- a/lib/erl_interface/src/Makefile.in
+++ b/lib/erl_interface/src/Makefile.in
@@ -782,6 +782,7 @@ $(MDD_OBJDIR)/ei_fake_prog_mdd_cxx$(EXE): prog/ei_fake_prog.c $(MDD_EILIB)
 #  Create dependency file using gcc -MM
 ###########################################################################
 
+ifneq ($(ERTS_SKIP_DEPEND),true)
 depend: $(TARGET)/depend.mk
 
 $(TARGET)/depend.mk: $(TARGET)/config.h
@@ -802,7 +803,9 @@ $(TARGET)/depend.mk: $(TARGET)/config.h
 
 # For some reason this has to be after 'opt' target
 -include $(TARGET)/depend.mk
-
+else
+depend:
+endif
 # ----------------------------------------------------
 # Release Target
 # ---------------------------------------------------- 
-- 
2.16.4

openSUSE Build Service is sponsored by