aboutsummaryrefslogtreecommitdiffstats
path: root/lib/orber/test/Makefile
blob: 88aeacbfe8177f182cbcdb1e4e939714bac12c7f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
#
# %CopyrightBegin%
#
# Copyright Ericsson AB 1997-2011. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
#
# %CopyrightEnd%
#
#
include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk

# ----------------------------------------------------
# Application version
# ----------------------------------------------------
include ../vsn.mk
VSN=$(ORBER_VSN)
# ----------------------------------------------------
# Release directory specification
# ----------------------------------------------------
RELSYSDIR = $(RELEASE_PATH)/orber_test

# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
TEST_SPEC_FILE = orber.spec
COVER_FILE = orber.cover


IDL_FILES = \
	orber_test.idl \
	iiop_test.idl \
	orber_test_server.idl

IDLOUTDIR = idl_output

MODULES =  \
	cdrcoding_11_SUITE \
	cdrcoding_10_SUITE \
	cdrcoding_12_SUITE \
	cdrlib_SUITE \
	corba_SUITE \
	iop_ior_11_SUITE \
	iop_ior_10_SUITE \
	iop_ior_12_SUITE \
	iiop_module_do_test_impl \
	iiop_module_test_impl \
	lname_SUITE \
	naming_context_SUITE \
	orber_SUITE \
	orber_test_server_impl \
	orber_test_timeout_server_impl \
	orber_test_lib \
	csiv2_SUITE \
	multi_ORB_SUITE \
	data_types_SUITE \
	tc_SUITE \
	generated_SUITE \
	orber_web_SUITE \
	interceptors_SUITE \
	orber_acl_SUITE \
	orber_firewall_ipv4_in_SUITE \
	orber_firewall_ipv6_in_SUITE \
	orber_firewall_ipv4_out_SUITE \
	orber_firewall_ipv6_out_SUITE \
	orber_nat_SUITE

GEN_MOD_ORBER = \
	oe_orber_test \
	Module_Except1 \
	Module_Except2 \
	Module_Except3 \
	Module_Except4 \
	Module_HEADER \
	Module_I1 \
	Module_I2 \
	Module_Struct0 \
	Module_Struct1 \
	Module_Struct2 \
	Module_Union \
	Module_Union1 \
	Module_Union2

GEN_HRL_ORBER = \
	oe_orber_test.hrl \
	Module.hrl \
	Module_I1.hrl \
	Module_I2.hrl

GEN_MOD_IIOP = \
	oe_iiop_test \
	iiop_module_Except1 \
	iiop_module_Struct1 \
	iiop_module_Union1 \
	iiop_module_do_test \
	iiop_module_test \
	iiop_module_test_retval

GEN_HRL_IIOP = \
	oe_iiop_test.hrl \
	iiop_module.hrl \
	iiop_module_do_test.hrl \
	iiop_module_test.hrl

GEN_MOD_TEST_SERVER = \
	oe_orber_test_server \
	orber_test_server \
	orber_test_server_ComplexUserDefinedException \
	orber_test_server_UserDefinedException \
	orber_test_server_struc \
	orber_test_server_uni \
	orber_test_server_uni_d \
	orber_test_timeout_server \
	orber_parent_inherrit \
	orber_test_server_rec_struct \
	orber_test_server_rec_struct_seq \
	orber_test_server_rec_union \
	orber_test_server_rec_union_seq

GEN_HRL_TEST_SERVER = \
	oe_orber_test_server.hrl \
	orber_test_server.hrl \
	orber_test_timeout_server.hrl

GEN_MODULES = $(GEN_MOD_ORBER) $(GEN_MOD_IIOP) \
	$(GEN_MOD_TEST_SERVER)

ERL_FILES = $(MODULES:%=%.erl)

HRL_FILES = 

GEN_HRL_FILES = $(GEN_HRL_ORBER) $(GEN_HRL_IIOP) \
	$(GEN_HRL_TEST_SERVER)

GEN_FILES = \
	$(GEN_HRL_FILES:%=$(IDLOUTDIR)/%) \
	$(GEN_MODULES:%=$(IDLOUTDIR)/%.erl) 

GEN_TARGET_FILES = $(GEN_MODULES:%=$(IDLOUTDIR)/%.$(EMULATOR))

SUITE_TARGET_FILES = $(MODULES:%=%.$(EMULATOR))

TARGET_FILES = \
	$(GEN_TARGET_FILES) \
	$(SUITE_TARGET_FILES)

# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
ERL_IDL_FLAGS += -pa $(ERL_TOP)/lib/orber/ebin -pa $(ERL_TOP)/lib/ic/ebin

ERL_COMPILE_FLAGS += $(ERL_IDL_FLAGS) \
	-pa $(ERL_TOP)/lib/test_server/ebin \
	-pa $(ERL_TOP)/lib/ic/ebin \
	-pa $(ERL_TOP)/lib/orber/ebin \
	-I$(ERL_TOP)/lib/orber \
	-I$(ERL_TOP)/lib/orber/test/$(IDLOUTDIR) \
	-I$(ERL_TOP)/lib/test_server/include

# ----------------------------------------------------
# Targets
# ----------------------------------------------------
tests debug opt: $(TARGET_FILES)

clean:
	rm -f idl_output/*
	rm -f $(TARGET_FILES) 
	rm -f errs core *~


docs:

# ----------------------------------------------------
# Special Targets
# ----------------------------------------------------

#
# Each IDL file produces many target files so no pattern
# rule can be used.
#
TGT_ORBER = \
	$(GEN_HRL_ORBER:%=$(IDLOUTDIR)/%) \
	$(GEN_MOD_ORBER:%=$(IDLOUTDIR)/%.erl)
TGT_IIOP = \
	$(GEN_HRL_IIOP:%=$(IDLOUTDIR)/%) \
	$(GEN_MOD_IIOP:%=$(IDLOUTDIR)/%.erl)

TGT_TEST_SERVER = \
	$(GEN_HRL_TEST_SERVER:%=$(IDLOUTDIR)/%) \
	$(GEN_MOD_TEST_SERVER:%=$(IDLOUTDIR)/%.erl)

$(TGT_ORBER): orber_test.idl
	erlc $(ERL_IDL_FLAGS) -o$(IDLOUTDIR) orber_test.idl

$(TGT_IIOP): iiop_test.idl
	erlc $(ERL_IDL_FLAGS) -o$(IDLOUTDIR) \
		+'{preproc_flags,"-I../COSS/CosNaming"}' iiop_test.idl

$(TGT_TEST_SERVER): orber_test_server.idl
	erlc $(ERL_IDL_FLAGS) -o$(IDLOUTDIR) \
	+'{cfgfile,"orber_test_server.cfg"}' orber_test_server.idl

# ----------------------------------------------------
# Release Targets
# ---------------------------------------------------- 
# We don't copy generated intermediate erlang and hrl files

include $(ERL_TOP)/make/otp_release_targets.mk

release_spec: 

release_docs_spec:

release_tests_spec: tests
	$(INSTALL_DIR) $(RELSYSDIR)
	$(INSTALL_DATA) $(IDL_FILES)  $(TEST_SPEC_FILE) $(COVER_FILE) \
		$(ERL_FILES) $(RELSYSDIR)
	$(INSTALL_DATA) $(SUITE_TARGET_FILES) $(RELSYSDIR)
	chmod -f -R u+w $(RELSYSDIR)
	$(INSTALL_DIR) $(RELSYSDIR)/$(IDLOUTDIR)
	$(INSTALL_DATA) $(GEN_TARGET_FILES) $(GEN_FILES) \
		$(RELSYSDIR)/$(IDLOUTDIR)