File 0426-megaco-example-meas-Make-dialyzer-more-like-app_targ.patch of Package erlang
From f7e38a125c93416be2582d4101808e0e8a8661e5 Mon Sep 17 00:00:00 2001
From: Micael Karlberg <bmk@erlang.org>
Date: Fri, 15 Jul 2022 10:56:08 +0200
Subject: [PATCH 6/7] [megaco|example|meas] Make dialyzer more like app_target
rule
OTP-18179
---
lib/megaco/examples/meas/Makefile.in | 28 ++++++++++++----------------
1 file changed, 12 insertions(+), 16 deletions(-)
diff --git a/lib/megaco/examples/meas/Makefile.in b/lib/megaco/examples/meas/Makefile.in
index 7115a791a2..216f03fc04 100644
--- a/lib/megaco/examples/meas/Makefile.in
+++ b/lib/megaco/examples/meas/Makefile.in
@@ -97,6 +97,9 @@ endif
ifeq ($(DIAW_UR),true)
DIA_WARNINGS += -Wunmatched_returns
endif
+DIA_PLT_APPS = \
+ erts et asn1 kernel stdlib compiler debugger \
+ runtime_tools crypto mnesia wx
# ----------------------------------------------------
@@ -123,6 +126,10 @@ info:
@echo ""
@echo "TARGET_FILES = $(TARGET_FILES)"
@echo ""
+ @echo "DIA_PLT = $(DIA_PLT)"
+ @echo "DIA_ANALYSIS = $(DIA_ANALYSIS)"
+ @echo "DIA_PLT_APPS = $(DIA_PLT_APPS)"
+ @echo ""
clean:
rm -f $(TARGET_FILES)
@@ -159,32 +166,21 @@ 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/compiler/ebin \
- ../../../../lib/debugger/ebin \
- ../../../../lib/runtime_tools/ebin \
- ../../../../lib/crypto/ebin \
- ../../../../lib/mnesia/ebin \
- ../../../../lib/wx/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 meas"
@dialyzer --plt $< \
- -r ../../ebin \
+ $(ERL_TOP)/lib/megaco/examples/meas \
$(DIA_WARNINGS) \
--verbose
+
# ----------------------------------------------------
# Include dependencies
# ----------------------------------------------------
--
2.35.3