1#
2# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
9#
10#   http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
18#
19
20SUBDIRS = features
21PRECROSS_TARGET =
22
23if WITH_C_GLIB
24SUBDIRS += c_glib
25PRECROSS_TARGET += precross-c_glib
26endif
27
28if WITH_CL
29SUBDIRS += cl
30PRECROSS_TARGET += precross-cl
31endif
32
33if WITH_CPP
34SUBDIRS += cpp
35PRECROSS_TARGET += precross-cpp
36endif
37
38if WITH_PERL
39SUBDIRS += perl
40PRECROSS_TARGET += precross-perl
41endif
42
43if WITH_PHP
44SUBDIRS += php
45PRECROSS_TARGET += precross-php
46endif
47
48if WITH_DART
49SUBDIRS += dart
50PRECROSS_TARGET += precross-dart
51endif
52
53if WITH_PYTHON
54SUBDIRS += py
55PRECROSS_TARGET += precross-py
56SUBDIRS += py.tornado
57if WITH_TWISTED_TEST
58SUBDIRS += py.twisted
59endif
60endif
61
62if WITH_RUBY
63SUBDIRS += rb
64PRECROSS_TARGET += precross-rb
65endif
66
67if WITH_HASKELL
68SUBDIRS += hs
69endif
70
71if WITH_HAXE
72SUBDIRS += haxe
73endif
74
75if WITH_DOTNET
76SUBDIRS += netstd
77endif
78
79if WITH_GO
80SUBDIRS += go
81PRECROSS_TARGET += precross-go
82endif
83
84if WITH_ERLANG
85SUBDIRS += erl
86PRECROSS_TARGET += precross-erl
87endif
88
89if WITH_LUA
90SUBDIRS += lua
91PRECROSS_TARGET += precross-lua
92endif
93
94if WITH_RS
95SUBDIRS += rs
96PRECROSS_TARGET += precross-rs
97endif
98
99#
100# generate html for ThriftTest.thrift AND validate it!
101#
102if WITH_NODEJS
103check-local:
104	$(top_builddir)/compiler/cpp/thrift --gen html -r $(top_srcdir)/test/ThriftTest.thrift
105	$(top_builddir)/node_modules/.bin/html-validator --file=gen-html/index.html --verbose
106	$(top_builddir)/node_modules/.bin/html-validator --file=gen-html/ThriftTest.html --verbose
107else
108check-local:
109	$(top_builddir)/compiler/cpp/thrift --gen html -r $(top_srcdir)/test/ThriftTest.thrift
110endif
111
112clean-local:
113	$(RM) -r $(top_srcdir)/test/gen-html/
114	find . -type d -name "__pycache__" | xargs rm -rf
115	find . -type f -name "*.pyc" | xargs rm -f
116
117dist-hook:
118	$(RM) -r $(distdir)/gen-html/
119	find $(distdir) -type d -name "__pycache__" | xargs rm -rf
120	find $(distdir) -type f -name "*.pyc" | xargs rm -f
121
122EXTRA_DIST = \
123	audit \
124	c_glib \
125	cl \
126	cpp \
127	crossrunner \
128	dart \
129	erl \
130	hs \
131	keys \
132	lua \
133	ocaml \
134	perl \
135	php \
136	py \
137	py.tornado \
138	py.twisted \
139	rb \
140	rs \
141	threads \
142	AnnotationTest.thrift \
143	BrokenConstants.thrift \
144	ConstantsDemo.thrift \
145	DebugProtoTest.thrift \
146	DenseLinkingTest.thrift \
147	DocTest.thrift \
148	DoubleConstantsTest.thrift \
149	EnumContainersTest.thrift \
150	EnumTest.thrift \
151	FullCamelTest.thrift \
152	Include.thrift \
153	Identifiers.thrift \
154	Int64Test.thrift \
155	JavaBeansTest.thrift \
156	JavaBinaryDefault.thrift \
157	JavaDeepCopyTest.thrift \
158	JavaTypes.thrift \
159	JsDeepConstructorTest.thrift \
160	ManyOptionals.thrift \
161	ManyTypedefs.thrift \
162	NameConflictTest.thrift \
163	OptionalRequiredTest.thrift \
164	Recursive.thrift \
165	ReuseObjects.thrift \
166	SmallTest.thrift \
167	StressTest.thrift \
168	ThriftTest.thrift \
169	TypedefTest.thrift \
170	Types.thrift \
171	UnsafeTypes.thrift \
172	Service.thrift \
173	SpecificNameTest.thrift \
174	known_failures_Linux.json \
175	test.py \
176	tests.json \
177	rebuild_known_failures.sh \
178	result.js \
179	index.html \
180	README.md \
181	valgrind.suppress
182
183precross-%:
184	$(MAKE) -C $* precross
185precross: $(PRECROSS_TARGET)
186