1
#=============================================================================
3
# File: lib/dialyzer/src/Makefile
4
# Authors: Kostis Sagonas and Tobias Lindahl
6
#=============================================================================
8
include $(ERL_TOP)/make/target.mk
9
include $(ERL_TOP)/make/$(TARGET)/otp.mk
11
# ----------------------------------------------------
13
# ----------------------------------------------------
17
# ----------------------------------------------------
18
# Release directory specification
19
# ----------------------------------------------------
20
RELSYSDIR = $(RELEASE_PATH)/lib/dialyzer-$(VSN)
22
# ----------------------------------------------------
23
# Orientation information -- find HiPE's icode dir
24
# ----------------------------------------------------
25
DIALYZER_DIR = $(ERL_TOP)/lib/dialyzer
26
HIPE_ICODE_DIR = $(ERL_TOP)/lib/hipe/icode
28
##---------------------------------------------------------------------
29
## Edit here if you want to change the default libraries included in
30
## Dialyzer's initial PLT (Persistent Lookup Table).
32
## 1. Minimal configuration
34
DIALYZER_DEF_LIBS = "kernel,mnesia,stdlib"
36
## 2. Configuration which includes enough stuff for most Dialyzer uses
38
# DIALYZER_DEF_LIBS = "compiler,gs,hipe,kernel,mnesia,stdlib,syntax_tools"
40
## 3. Configuration without any unknown functions when building the PLT.
41
## Gives good results for most uses, but takes really long to
42
## create the initial PLT. If you have patience or a fast machine,
43
## we strongly recommend this option. Also, if your application uses
44
## more OTP libraries than those listed below, then by all means add
47
# DIALYZER_DEF_LIBS = "asn1,compiler,crypto,dialyzer,debugger,edoc,et,gs,hipe,inets,kernel,observer,mnesia,mnemosyne,parsetools,runtime_tools,snmp,stdlib,ssl,syntax_tools,tools,webtool,xmerl"
48
##---------------------------------------------------------------------
50
# ----------------------------------------------------
52
# ----------------------------------------------------
55
dialyzer_analysis_callgraph \
66
dialyzer_succ_typings \
69
EXTRA_FILES= ../plt/dialyzer_init_plt ## automatically generated
71
HRL_FILES= dialyzer.hrl
72
ERL_FILES= $(MODULES:%=%.erl)
73
INSTALL_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET)
74
TARGET_FILES= $(INSTALL_FILES)
76
APP_FILE= dialyzer.app
77
APP_SRC= $(APP_FILE).src
78
APP_TARGET= $(EBIN)/$(APP_FILE)
80
APPUP_FILE= dialyzer.appup
81
APPUP_SRC= $(APPUP_FILE).src
82
APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
84
# ----------------------------------------------------
86
# ----------------------------------------------------
88
ERL_COMPILE_FLAGS += -I$(HIPE_ICODE_DIR) +warn_unused_import
90
# ----------------------------------------------------
92
# ----------------------------------------------------
94
debug opt: $(TARGET_FILES) $(DIALYZER_DIR)/plt/dialyzer_init_plt
103
# ----------------------------------------------------
104
# Special Build Targets
105
# ----------------------------------------------------
107
$(DIALYZER_DIR)/plt/dialyzer_init_plt:
108
@echo "Dialyzer will now build auxiliary information needed for subsequent analyses..."
109
@echo "A PLT for following libs will be built:"
110
@echo " [$(DIALYZER_DEF_LIBS)]"
111
@echo "To select a different set please edit the file $(DIALYZER_DIR)/src/Makefile"
112
$(ERL_TOP)/bin/dialyzer --check_init_plt
114
$(EBIN)/dialyzer_cl_parse.$(EMULATOR): dialyzer_cl_parse.erl ../vsn.mk Makefile
115
erlc $(ERL_FLAGS) $(ERL_COMPILE_FLAGS) -DDEFAULT_LIBS="[$(DIALYZER_DEF_LIBS)]" -DVSN="\"v$(VSN)\"" -o$(EBIN) dialyzer_cl_parse.erl
117
$(EBIN)/dialyzer_plt.$(EMULATOR): dialyzer_plt.erl Makefile ../vsn.mk
118
erlc $(ERL_FLAGS) $(ERL_COMPILE_FLAGS) -DVSN="\"v$(VSN)\"" -DDEFAULT_LIBS="[$(DIALYZER_DEF_LIBS)]" -o$(EBIN) dialyzer_plt.erl
120
$(EBIN)/dialyzer_gui.$(EMULATOR): dialyzer_gui.erl ../vsn.mk
121
erlc $(ERL_FLAGS) $(ERL_COMPILE_FLAGS) -DVSN="\"v$(VSN)\"" -o$(EBIN) dialyzer_gui.erl
123
$(APP_TARGET): $(APP_SRC) ../vsn.mk
124
sed -e 's;%VSN%;$(VSN);' $< > $@
126
$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
127
sed -e 's;%VSN%;$(VSN);' $< > $@
129
# ---------------------------------------------------------------------
130
# dependencies -- I wish they were somehow automatically generated
131
# ---------------------------------------------------------------------
133
$(EBIN)/dialyzer.beam: dialyzer.hrl
134
$(EBIN)/dialyzer_analysis.beam: dialyzer.hrl
135
$(EBIN)/dialyzer_analysis_callgraph.beam: dialyzer.hrl
136
$(EBIN)/dialyzer_cl.beam: dialyzer.hrl $(HIPE_ICODE_DIR)/hipe_icode_type.hrl
137
$(EBIN)/dialyzer_cl_parse.beam: dialyzer.hrl
138
$(EBIN)/dialyzer_dataflow.beam: dialyzer.hrl
139
$(EBIN)/dialyzer_gui.beam: dialyzer.hrl $(HIPE_ICODE_DIR)/hipe_icode_type.hrl
140
$(EBIN)/dialyzer_icode.beam: $(HIPE_ICODE_DIR)/hipe_icode.hrl $(HIPE_ICODE_DIR)/hipe_icode_type.hrl
141
$(EBIN)/dialyzer_options.beam: dialyzer.hrl $(HIPE_ICODE_DIR)/hipe_icode_type.hrl
142
$(EBIN)/dialyzer_plt.beam: dialyzer.hrl
143
$(EBIN)/dialyzer_typesig.beam: dialyzer.hrl
145
# ----------------------------------------------------
147
# ----------------------------------------------------
148
include $(ERL_TOP)/make/otp_release_targets.mk
151
$(INSTALL_DIR) $(RELSYSDIR)/src
152
$(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(EXTRA_FILES) \
154
$(INSTALL_DIR) $(RELSYSDIR)/ebin
155
$(INSTALL_DATA) $(INSTALL_FILES) $(RELSYSDIR)/ebin
156
$(INSTALL_DIR) $(RELSYSDIR)/plt
157
$(INSTALL_DATA) ../plt/dialyzer_init_plt $(RELSYSDIR)/plt