~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/dialyzer/src/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Erlang Packagers, Sergei Golovan
  • Date: 2006-12-03 17:07:44 UTC
  • mfrom: (2.1.11 feisty)
  • Revision ID: james.westby@ubuntu.com-20061203170744-rghjwupacqlzs6kv
Tags: 1:11.b.2-4
[ Sergei Golovan ]
Fixed erlang-base and erlang-base-hipe prerm scripts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#=============================================================================
 
2
#
 
3
#    File:  lib/dialyzer/src/Makefile
 
4
# Authors:  Kostis Sagonas and Tobias Lindahl
 
5
#
 
6
#=============================================================================
 
7
 
 
8
include $(ERL_TOP)/make/target.mk
 
9
include $(ERL_TOP)/make/$(TARGET)/otp.mk
 
10
 
 
11
# ----------------------------------------------------
 
12
# Application version
 
13
# ----------------------------------------------------
 
14
include ../vsn.mk
 
15
VSN=$(DIALYZER_VSN)
 
16
 
 
17
# ----------------------------------------------------
 
18
# Release directory specification
 
19
# ----------------------------------------------------
 
20
RELSYSDIR = $(RELEASE_PATH)/lib/dialyzer-$(VSN)
 
21
 
 
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
 
27
 
 
28
##---------------------------------------------------------------------
 
29
## Edit here if you want to change the default libraries included in
 
30
## Dialyzer's initial PLT (Persistent Lookup Table).
 
31
##
 
32
## 1. Minimal configuration
 
33
##
 
34
DIALYZER_DEF_LIBS = "kernel,mnesia,stdlib"
 
35
##
 
36
## 2. Configuration which includes enough stuff for most Dialyzer uses
 
37
## 
 
38
# DIALYZER_DEF_LIBS = "compiler,gs,hipe,kernel,mnesia,stdlib,syntax_tools"
 
39
##
 
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
 
45
##    them to the list.
 
46
##
 
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
##---------------------------------------------------------------------
 
49
 
 
50
# ----------------------------------------------------
 
51
# Target Specs
 
52
# ----------------------------------------------------
 
53
MODULES =  \
 
54
        dialyzer \
 
55
        dialyzer_analysis_callgraph \
 
56
        dialyzer_callgraph \
 
57
        dialyzer_cl \
 
58
        dialyzer_cl_parse \
 
59
        dialyzer_codeserver \
 
60
        dialyzer_dataflow \
 
61
        dialyzer_dep \
 
62
        dialyzer_gui \
 
63
        dialyzer_icode \
 
64
        dialyzer_options \
 
65
        dialyzer_plt \
 
66
        dialyzer_succ_typings \
 
67
        dialyzer_typesig
 
68
 
 
69
EXTRA_FILES=  ../plt/dialyzer_init_plt  ## automatically generated
 
70
 
 
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)
 
75
 
 
76
APP_FILE= dialyzer.app
 
77
APP_SRC= $(APP_FILE).src
 
78
APP_TARGET= $(EBIN)/$(APP_FILE)
 
79
 
 
80
APPUP_FILE= dialyzer.appup
 
81
APPUP_SRC= $(APPUP_FILE).src
 
82
APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
 
83
 
 
84
# ----------------------------------------------------
 
85
# FLAGS
 
86
# ----------------------------------------------------
 
87
ERL_FLAGS +=
 
88
ERL_COMPILE_FLAGS += -I$(HIPE_ICODE_DIR) +warn_unused_import
 
89
 
 
90
# ----------------------------------------------------
 
91
# Targets
 
92
# ----------------------------------------------------
 
93
 
 
94
debug opt: $(TARGET_FILES) $(DIALYZER_DIR)/plt/dialyzer_init_plt
 
95
 
 
96
docs:
 
97
 
 
98
clean:
 
99
        rm -f $(TARGET_FILES)
 
100
        rm -f $(EXTRA_FILES)
 
101
        rm -f core
 
102
 
 
103
# ----------------------------------------------------
 
104
# Special Build Targets
 
105
# ----------------------------------------------------
 
106
 
 
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
 
113
 
 
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
 
116
 
 
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
 
119
 
 
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
 
122
 
 
123
$(APP_TARGET): $(APP_SRC) ../vsn.mk
 
124
        sed -e 's;%VSN%;$(VSN);' $< > $@
 
125
 
 
126
$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
 
127
        sed -e 's;%VSN%;$(VSN);' $< > $@
 
128
 
 
129
# ---------------------------------------------------------------------
 
130
# dependencies -- I wish they were somehow automatically generated
 
131
# ---------------------------------------------------------------------
 
132
 
 
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
 
144
 
 
145
# ----------------------------------------------------
 
146
# Release Target
 
147
# ---------------------------------------------------- 
 
148
include $(ERL_TOP)/make/otp_release_targets.mk
 
149
 
 
150
release_spec: opt
 
151
        $(INSTALL_DIR) $(RELSYSDIR)/src
 
152
        $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(EXTRA_FILES) \
 
153
                $(RELSYSDIR)/src
 
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
 
158
 
 
159
release_docs_spec: