File 0427-megaco-example-simple-Make-dialyzer-more-like-app_ta.patch of Package erlang

From e245c0a52e8356b924c802982cb81cfe36ff5012 Mon Sep 17 00:00:00 2001
From: Micael Karlberg <bmk@erlang.org>
Date: Fri, 15 Jul 2022 10:56:51 +0200
Subject: [PATCH 7/7] [megaco|example|simple] Make dialyzer more like
 app_target rule

OTP-18179
---
 lib/megaco/examples/simple/Makefile | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/lib/megaco/examples/simple/Makefile b/lib/megaco/examples/simple/Makefile
index fc6fa24635..8f1ca41433 100644
--- a/lib/megaco/examples/simple/Makefile
+++ b/lib/megaco/examples/simple/Makefile
@@ -111,6 +111,9 @@ endif
 ifeq ($(DIAW_UR),true)
 DIA_WARNINGS += -Wunmatched_returns
 endif
+DIA_PLT_APPS = \
+	erts asn1 et kernel stdlib compiler debugger \
+	runtime_tools crypto mnesia wx
 
 
 # ----------------------------------------------------
@@ -127,8 +130,13 @@ clean:
 
 docs:
 
-info: 
+info:
 	@echo "MEGACO_ROOT_DIR = $(MEGACO_ROOT_DIR)"
+	@echo ""
+	@echo "DIA_PLT      = $(DIA_PLT)"
+	@echo "DIA_ANALYSIS = $(DIA_ANALYSIS)"
+	@echo "DIA_PLT_APPS = $(DIA_PLT_APPS)"
+	@echo ""
 
 
 dclean:
@@ -138,22 +146,15 @@ dclean:
 dialyzer_plt: $(DIA_PLT)
 
 $(DIA_PLT): $(ERL_FILES)
-	@echo "Building ($(basename $(DIA_PLT))) plt file"
+	@echo "Building $(basename $(DIA_PLT)) plt file"
 	@dialyzer --build_plt \
                   --output_plt $@ \
-                  -r ../../ebin \
-                     ../../../../lib/asn1/ebin \
-                     ../../../../lib/et/ebin \
-                     ../../../../lib/kernel/ebin \
-                     ../../../../lib/stdlib/ebin \
-                     ../../../../lib/debugger/ebin \
-                     ../../../../lib/runtime_tools/ebin \
-                     ../../../../erts/preloaded/ebin \
+                  --apps --apps $(sort $(APPLICATION) $(DIA_PLT_APPS)) \
                   --output $(DIA_ANALYSIS) \
                   --verbose
 
 dialyzer: $(DIA_PLT)
-	@echo "Running dialyzer on $(basename $(DIA_PLT))"
+	@echo "Running dialyzer on megaco example simple"
 	@dialyzer --plt $< \
                   -r ../../ebin \
                   $(DIA_WARNINGS) \
-- 
2.35.3

openSUSE Build Service is sponsored by