-
Notifications
You must be signed in to change notification settings - Fork 38
/
makefile.checks
129 lines (109 loc) · 2.63 KB
/
makefile.checks
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
##############################################################################
# Consistency checks
ifneq ($(DEBUG), true)
ifneq ($(DEBUG), false)
$(error DEBUG variable must be set to true or false)
endif
endif
ifneq ($(NETLIB), gnat)
ifneq ($(NETLIB), ipv4)
ifneq ($(NETLIB), ipv6)
$(error NETLIB variable must be set to gnat, ipv6, or ipv4)
endif
endif
endif
ifeq ($(ENABLE_SHARED), )
ENABLE_SHARED=false
endif
ifeq ($(XMLADA), )
XMLADA=false
endif
ifeq ($(LAL), )
LAL=false
endif
ifneq ($(ZLIB), true)
ZLIB=false
endif
ifndef THREAD_SANITIZER
THREAD_SANITIZER=false
endif
ifndef SSL_DYNAMIC
SSL_DYNAMIC=false
endif
ifeq ($(PRJ_TARGET), vxworks)
ifeq ($(ENABLE_SHARED), true)
$(error shared libraries not supported on cross platforms)
endif
ifeq ($(LAL), true)
$(error LAL not supported on cross platforms)
endif
ifeq ($(LDAP), true)
$(error LDAP not supported on cross platforms)
endif
endif
ifneq ($(ENABLE_SHARED), true)
ifneq ($(ENABLE_SHARED), false)
$(error ENABLE_SHARED variable must be set to true or false)
endif
endif
ifneq ($(THREAD_SANITIZER), true)
ifneq ($(THREAD_SANITIZER), false)
$(error THREAD_SANITIZER variable must be set to true or false)
endif
endif
ifneq ($(SSL_DYNAMIC), true)
ifneq ($(SSL_DYNAMIC), false)
$(error SSL_DYNAMIC variable must be set to true or false)
endif
endif
ifneq ($(LAL), true)
ifneq ($(LAL), false)
$(error LAL variable must be set to true or false)
endif
endif
ifneq ($(XMLADA), true)
ifneq ($(XMLADA), false)
$(error XMLADA variable must be set to true or false)
endif
endif
ifneq ($(LDAP), true)
ifneq ($(LDAP), false)
$(error LDAP variable must be set to true or false)
endif
endif
ifeq ($(LAL), true)
ifeq ($(XMLADA), false)
$(error LaL is set and requires XMLADA to be installed. \
You may be missing XMLADA=true)
endif
endif
ifeq ($(SOCKET), std)
ifeq ($(SSL_DYNAMIC), true)
# SSL_DYNAMIC can be true only together with SOCKET in openssl | gnutls
SSL_DYNAMIC = false
ifeq ($(SSL_DYNAMIC), true)
# We are here only when SSL_DYNAMIC=true in make setup command line
$(error SSL_DYNAMIC can be true only together with SOCKET = openssl or gnutls)
endif
endif
else # SOCKET /= std
ifneq ($(SOCKET), openssl)
ifneq ($(SOCKET), gnutls)
$(error SOCKET variable must be set to std, openssl or gnutls)
endif
endif
endif
ifneq ($(INSTALL), )
$(error INSTALL variable is deprecated, please use prefix instead)
endif
ifneq ($(SHARED), )
$(error SHARED variable is deprecated, please use ENABLE_SHARED instead)
endif
ifeq ("$(prefix)", "..")
$(error "Wrong install path : prefix='$(prefix)', \
Check that GNAT is in the PATH")
else
ifeq ("$(prefix)", "")
$(error "Wrong install path : empty prefix variable")
endif
endif