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

« back to all changes in this revision

Viewing changes to lib/inets/test/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
 
# ``The contents of this file are subject to the Erlang Public License,
2
 
# Version 1.1, (the "License"); you may not use this file except in
3
 
# compliance with the License. You should have received a copy of the
4
 
# Erlang Public License along with this software. If not, it can be
5
 
# retrieved via the world wide web at http://www.erlang.org/.
6
 
7
 
# Software distributed under the License is distributed on an "AS IS"
8
 
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
9
 
# the License for the specific language governing rights and limitations
10
 
# under the License.
11
 
12
 
# The Initial Developer of the Original Code is Ericsson Utvecklings AB.
13
 
# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
14
 
# AB. All Rights Reserved.''
15
 
16
 
#     $Id$
17
 
#
18
 
# For an outline of how this all_SUITE_data stuff works, see the
19
 
# make file ../../ssl/test/Makefile.
20
 
#
21
 
include $(ERL_TOP)/make/target.mk
22
 
 
23
 
include $(ERL_TOP)/make/$(TARGET)/otp.mk
24
 
 
25
 
# ----------------------------------------------------
26
 
# Application version
27
 
# ----------------------------------------------------
28
 
include ../vsn.mk
29
 
VSN=$(INETS_VSN)
30
 
 
31
 
 
32
 
# ----------------------------------------------------
33
 
# Target Specs
34
 
# ----------------------------------------------------
35
 
 
36
 
CP = cp
37
 
 
38
 
ifeq ($(TESTROOT_DIR),)
39
 
TESTROOT_DIR = /ldisk/tests/$(USER)/inets
40
 
endif
41
 
 
42
 
ifeq ($(INETS_DATA_DIR),)
43
 
INETS_DATA_DIR = $(TESTROOT_DIR)/data_dir
44
 
endif
45
 
 
46
 
ifeq ($(INETS_PRIV_DIR),)
47
 
INETS_PRIV_DIR = $(TESTROOT_DIR)/priv_dir
48
 
endif
49
 
 
50
 
INETS_FLAGS = -Dinets_data_dir='"$(INETS_DATA_DIR)"'       \
51
 
              -Dinets_priv_dir='"$(INETS_PRIV_DIR)"'
52
 
 
53
 
 
54
 
### 
55
 
### test suite debug flags
56
 
### 
57
 
ifeq ($(FTP_DEBUG_CLIENT),)
58
 
  FTP_DEBUG_CLIENT = y
59
 
endif
60
 
 
61
 
ifeq ($(FTP_DEBUG_CLIENT),y)
62
 
  FTP_FLAGS += -Dftp_debug_client
63
 
endif
64
 
 
65
 
ifneq ($(FTP_DEBUG),)
66
 
  FTP_DEBUG = s
67
 
endif
68
 
 
69
 
ifeq ($(FTP_DEBUG),l)
70
 
  FTP_FLAGS += -Dftp_log
71
 
endif
72
 
 
73
 
ifeq ($(FTP_DEBUG),d)
74
 
  FTP_FLAGS += -Dftp_debug -Dftp_log
75
 
endif
76
 
 
77
 
ifeq ($(INETS_DEBUG),)
78
 
  INETS_DEBUG = d
79
 
endif
80
 
 
81
 
ifeq ($(INETS_DEBUG),l)
82
 
  INETS_FLAGS += -Dinets_log
83
 
endif
84
 
 
85
 
ifeq ($(INETS_DEBUG),d)
86
 
  INETS_FLAGS += -Dinets_debug -Dinets_log
87
 
endif
88
 
 
89
 
 
90
 
### 
91
 
### HTTPD verbosity flags
92
 
### 
93
 
 
94
 
ifneq ($(MANV),)
95
 
  INETS_FLAGS += -Dhttpd_manager_verbosity=$(MANV)
96
 
else
97
 
  INETS_FLAGS += -Dhttpd_manager_verbosity=trace
98
 
endif
99
 
 
100
 
ifneq ($(REQV),)
101
 
  INETS_FLAGS += -Dhttpd_request_handler_verbosity=$(REQV)
102
 
else
103
 
  INETS_FLAGS += -Dhttpd_request_handler_verbosity=trace
104
 
endif
105
 
 
106
 
ifneq ($(ACCV),)
107
 
  INETS_FLAGS += -Dhttpd_acceptor_verbosity=$(ACCV)
108
 
else
109
 
  INETS_FLAGS += -Dhttpd_acceptor_verbosity=trace
110
 
endif
111
 
 
112
 
ifneq ($(AUTHV),)
113
 
  INETS_FLAGS += -Dhttpd_auth_verbosity=$(AUTHV)
114
 
else
115
 
  INETS_FLAGS += -Dhttpd_auth_verbosity=log
116
 
endif
117
 
 
118
 
ifneq ($(SECV),)
119
 
  INETS_FLAGS += -Dhttpd_security_verbosity=$(SECV)
120
 
else
121
 
  INETS_FLAGS += -Dhttpd_security_verbosity=log
122
 
endif
123
 
 
124
 
INETS_ROOT = ../../inets
125
 
 
126
 
MODULES =                 \
127
 
        inets_test_server \
128
 
        inets_test_lib    \
129
 
        httpd_test_lib    \
130
 
        inets_SUITE       \
131
 
        inets_app_test    \
132
 
        inets_appup_test  \
133
 
        httpd_test        \
134
 
        httpc_test        \
135
 
        ftp_test          \
136
 
        httpd_poll        \
137
 
        httpd_time_test
138
 
 
139
 
EBIN = .
140
 
 
141
 
HRL_FILES = inets_test_lib.hrl httpd_test_lib.hrl
142
 
 
143
 
ERL_FILES = $(MODULES:%=%.erl)
144
 
 
145
 
TARGET_FILES = $(MODULES:%=$(EBIN)/%.$(EMULATOR))
146
 
 
147
 
INETS_FILES = Makefile.inets rules.mk suite_targets.mk \
148
 
              inets.config inets.spec inets.spec.vxworks 
149
 
 
150
 
SOURCE = $(ERL_FILES) $(HRL_FILES) $(TARGET_FILES)
151
 
 
152
 
INETS_SPECS = inets.spec inets.spec.vxworks
153
 
 
154
 
INETS_SUITE = inets_SUITE
155
 
APP_SUITE   = inets_app_test
156
 
APPUP_SUITE = inets_appup_test
157
 
FTP_SUITE   = ftp_test
158
 
HTTPD_SUITE = httpd_test
159
 
HTTPC_SUITE = httpc_test
160
 
 
161
 
HTTPD_DATADIR = httpd_test_data
162
 
DATADIRS = $(HTTPD_DATADIR)
163
 
 
164
 
EMAKEFILE  = Emakefile
165
 
MAKE_EMAKE = $(wildcard $(ERL_TOP)/make/make_emakefile)
166
 
 
167
 
ifeq ($(MAKE_EMAKE),)
168
 
BUILDTARGET   = $(TARGET_FILES)
169
 
RELTEST_FILES = $(INETS_SPECS) $(SOURCE) 
170
 
else
171
 
BUILDTARGET   = emakebuild
172
 
RELTEST_FILES = $(EMAKEFILE) $(INETS_SPECS) $(SOURCE) 
173
 
endif
174
 
 
175
 
# ----------------------------------------------------
176
 
# Release directory specification
177
 
# ----------------------------------------------------
178
 
RELSYSDIR = $(RELEASE_PATH)/lib/inets-$(VSN)
179
 
 
180
 
RELTESTSYSDIR        = $(RELEASE_PATH)/inets_test
181
 
RELTESTSYSALLDATADIR = $(RELTESTSYSDIR)/all_SUITE_data
182
 
RELTESTSYSBINDIR     = $(RELTESTSYSALLDATADIR)/bin
183
 
 
184
 
MAKEFILE_SRC = Makefile.src
185
 
INETS_SSL_LIB_DIR  = ../../ssl/usr/ssleay/
186
 
 
187
 
 
188
 
# ----------------------------------------------------
189
 
# FLAGS
190
 
# ----------------------------------------------------
191
 
ERL_FLAGS += 
192
 
ERL_COMPILE_FLAGS += $(FTP_FLAGS) $(INETS_FLAGS)
193
 
 
194
 
 
195
 
# ----------------------------------------------------
196
 
# Targets
197
 
# erl -sname kalle -pa ../ebin
198
 
# If you intend to run the test suite locally (private), then
199
 
# there is some requirements:
200
 
# 1) INETS_PRIV_DIR must be created
201
 
# 2) INETS_SSL_LIB_DIR must be created with the same content as 
202
 
#    content comparable to all_SUITE_data/bin (see test-server).
203
 
# ----------------------------------------------------
204
 
tests debug opt: $(BUILDTARGET)
205
 
 
206
 
targets: $(TARGET_FILES)
207
 
 
208
 
.PHONY: emakebuild
209
 
 
210
 
emakebuild: $(EMAKEFILE)
211
 
        erl $(ERL_FLAGS) -make
212
 
 
213
 
$(EMAKEFILE): 
214
 
        $(MAKE_EMAKE) $(ERL_COMPILE_FLAGS) -o$(EBIN) '*_SUITE_make' > $(EMAKEFILE)
215
 
        $(MAKE_EMAKE) $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES) >> $(EMAKEFILE)
216
 
 
217
 
clean:
218
 
        rm -f $(EMAKEFILE)
219
 
        rm -f $(TARGET_FILES)
220
 
        rm -f core *~
221
 
 
222
 
docs:
223
 
 
224
 
 
225
 
# ----------------------------------------------------
226
 
# inets
227
 
# ---------------------------------------------------- 
228
 
 
229
 
include suite_targets.mk
230
 
 
231
 
 
232
 
# ----------------------------------------------------
233
 
# Release Target
234
 
# ---------------------------------------------------- 
235
 
include $(ERL_TOP)/make/otp_release_targets.mk
236
 
 
237
 
release_spec: opt
238
 
        $(INSTALL_DIR)  $(RELSYSDIR)/test
239
 
        $(INSTALL_DATA) $(HRL_FILES)   $(ERL_FILES) $(RELSYSDIR)/test
240
 
        $(INSTALL_DATA) $(INETS_FILES) $(RELSYSDIR)/test
241
 
        $(INSTALL_DIR)  $(RELSYSDIR)/test/$(HTTPD_DATADIR)
242
 
        tar chf - -C $(HTTPD_DATADIR) . | (cd $(RELSYSDIR)/test/$(HTTPD_DATADIR); tar xf -)
243
 
        (cd $(RELSYSDIR)/test; mv Makefile.inets Makefile)
244
 
 
245
 
release_tests_spec: opt
246
 
        $(INSTALL_DIR) $(RELTESTSYSDIR)
247
 
        $(INSTALL_DATA) $(RELTEST_FILES) $(RELTESTSYSDIR)
248
 
        chmod -f -R u+w $(RELTESTSYSDIR)
249
 
        tar chf - $(DATADIRS) | (cd $(RELTESTSYSDIR); tar xf -)
250
 
        $(INSTALL_DIR) $(RELTESTSYSALLDATADIR)
251
 
        $(INSTALL_DATA) $(MAKEFILE_SRC) $(RELTESTSYSALLDATADIR)/Makefile.src
252
 
        $(INSTALL_DATA) copy_files.erl $(RELTESTSYSALLDATADIR)/copy_files.erl
253
 
        $(INSTALL_DIR) $(RELTESTSYSBINDIR)
254
 
        chmod -f -R +x $(RELTESTSYSBINDIR)
255
 
        tar cf - -C $(INETS_SSL_LIB_DIR) . | (cd $(RELTESTSYSALLDATADIR); tar xf -)
256
 
        $(INSTALL_DIR) $(RELTESTSYSALLDATADIR)/win32/lib        
257
 
        tar cf - -C $(INETS_SSL_LIB_DIR)/win32/out32dll . | \
258
 
                (cd $(RELTESTSYSALLDATADIR)/win32/lib; tar xf -)
259
 
 
260
 
release_docs_spec:
261
 
 
262
 
info:
263
 
        @echo "MAKE_EMAKE        = $(MAKE_EMAKE)"
264
 
        @echo "EMAKEFILE         = $(EMAKEFILE)"
265
 
        @echo "BUILDTARGET       = $(BUILDTARGET)"
266
 
        @echo "TARGET_FILES      = $(TARGET_FILES)"
267
 
        @echo "INETS_DATA_DIR    = $(INETS_DATA_DIR)"
268
 
        @echo "INETS_PRIV_DIR    = $(INETS_PRIV_DIR)"
269
 
        @echo "INETS_SSL_LIB_DIR = $(INETS_SSL_LIB_DIR)"
270
 
        @echo "INETS_ROOT        = $(INETS_ROOT)"
271
 
        @echo "INETS_FLAGS       = $(INETS_FLAGS)"
272
 
        @echo "FTP_FLAGS         = $(FTP_FLAGS)"