aboutsummaryrefslogtreecommitdiffstats
path: root/lib/orber/test/Makefile
blob: 782ee2730bd17959a08da694e93321b12e180e84 (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
#
# %CopyrightBegin%
#
# Copyright Ericsson AB 1997-2016. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions 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 \
	ip_v4v6_interop_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/ic/ebin \
	-pa $(ERL_TOP)/lib/orber/ebin \
	-I$(ERL_TOP)/lib/orber \
	-I$(ERL_TOP)/lib/orber/test/$(IDLOUTDIR)

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

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


docs:

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

IDL-GENERATED: orber_test.idl iiop_test.idl orber_test_server.idl
	erlc $(ERL_IDL_FLAGS) -o$(IDLOUTDIR) orber_test.idl
	erlc $(ERL_IDL_FLAGS) -o$(IDLOUTDIR) \
		+'{preproc_flags,"-I../COSS/CosNaming"}' iiop_test.idl
	erlc $(ERL_IDL_FLAGS) -o$(IDLOUTDIR) \
	+'{cfgfile,"orber_test_server.cfg"}' orber_test_server.idl
	>IDL-GENERATED

$(GEN_FILES): IDL-GENERATED

$(TARGET_FILES): IDL-GENERATED

# ----------------------------------------------------
# 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 -R u+w "$(RELSYSDIR)"
	$(INSTALL_DIR) "$(RELSYSDIR)/$(IDLOUTDIR)"
	$(INSTALL_DATA) $(GEN_TARGET_FILES) $(GEN_FILES) \
		"$(RELSYSDIR)/$(IDLOUTDIR)"