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_HAXE
68SUBDIRS += haxe
69endif
70
71if WITH_DOTNET
72SUBDIRS += netstd
73endif
74
75if WITH_GO
76SUBDIRS += go
77PRECROSS_TARGET += precross-go
78endif
79
80if WITH_ERLANG
81SUBDIRS += erl
82PRECROSS_TARGET += precross-erl
83endif
84
85if WITH_LUA
86SUBDIRS += lua
87PRECROSS_TARGET += precross-lua
88endif
89
90if WITH_RS
91SUBDIRS += rs
92PRECROSS_TARGET += precross-rs
93endif
94
95if WITH_SWIFT
96SUBDIRS += swift
97PRECROSS_TARGET += precross-swift
98endif
99
100#
101# generate html for ThriftTest.thrift AND validate it!
102#
103if WITH_NODEJS
104check-local:
105	$(top_builddir)/compiler/cpp/thrift --gen html -r $(top_srcdir)/test/ThriftTest.thrift
106	$(top_builddir)/node_modules/.bin/html-validator --file=gen-html/index.html --verbose
107	$(top_builddir)/node_modules/.bin/html-validator --file=gen-html/ThriftTest.html --verbose
108else
109check-local:
110	$(top_builddir)/compiler/cpp/thrift --gen html -r $(top_srcdir)/test/ThriftTest.thrift
111endif
112
113clean-local:
114	$(RM) -r $(top_srcdir)/test/gen-html/
115	find . -type d -name "__pycache__" | xargs rm -rf
116	find . -type f -name "*.pyc" | xargs rm -f
117
118dist-hook:
119	$(RM) -r $(distdir)/gen-html/
120	find $(distdir) -type d -name "__pycache__" | xargs rm -rf
121	find $(distdir) -type f -name "*.pyc" | xargs rm -f
122
123EXTRA_DIST = \
124	audit \
125	c_glib \
126	cl \
127	cpp \
128	crossrunner \
129	dart \
130	erl \
131	keys \
132	lua \
133	ocaml \
134	perl \
135	php \
136	py \
137	py.tornado \
138	py.twisted \
139	rb \
140	rs \
141	swift \
142	threads \
143	partial \
144	AnnotationTest.thrift \
145	BrokenConstants.thrift \
146	ConstantsDemo.thrift \
147	DebugProtoTest.thrift \
148	v0.16/DebugProtoTest.thrift \
149	DenseLinkingTest.thrift \
150	DocTest.thrift \
151	DoubleConstantsTest.thrift \
152	EnumContainersTest.thrift \
153	EnumTest.thrift \
154	FullCamelTest.thrift \
155	Include.thrift \
156	Identifiers.thrift \
157	Int64Test.thrift \
158	JsDeepConstructorTest.thrift \
159	ManyOptionals.thrift \
160	ManyTypedefs.thrift \
161	NameConflictTest.thrift \
162	OptionalRequiredTest.thrift \
163	Recursive.thrift \
164	ReuseObjects.thrift \
165	SmallTest.thrift \
166	StressTest.thrift \
167	ThriftTest.thrift \
168	v0.16/ThriftTest.thrift \
169	TypedefTest.thrift \
170	Types.thrift \
171	UnsafeTypes.thrift \
172	Service.thrift \
173	SpecificNameTest.thrift \
174	VoidMethExceptionsTest.thrift \
175	partial/thrift_test_schema.thrift \
176	keys/keygen/.gitignore \
177	known_failures_Linux.json \
178	test.py \
179	tests.json \
180	rebuild_known_failures.sh \
181	result.js \
182	index.html \
183	README.md \
184	valgrind.suppress
185
186precross-%:
187	$(MAKE) -C $* precross
188precross: $(PRECROSS_TARGET)
189