blob: 1f2d4836ab0bd2cefc3fdb8204e29f5440b3b6aa [file] [log] [blame]
David Reissea2cba82009-03-30 21:35:00 +00001#
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
David Reiss832b2622007-12-28 18:25:33 +000020ACLOCAL_AMFLAGS = -I ./aclocal
21
Roger Meierc88d5812014-01-26 11:51:26 +010022SUBDIRS = compiler/cpp lib
Jake Farrell627f1a02011-09-14 03:43:49 +000023
24if WITH_TESTS
25SUBDIRS += test
26endif
David Reisse2113932009-03-26 08:47:07 +000027
Roger Meierc88d5812014-01-26 11:51:26 +010028if WITH_TUTORIAL
jfarrell102c6002013-08-15 21:20:19 -040029SUBDIRS += tutorial
Roger Meierc88d5812014-01-26 11:51:26 +010030endif
jfarrell102c6002013-08-15 21:20:19 -040031
James E. King IIIb96c4382019-01-24 17:45:07 -050032clean-local:
33 $(RM) -r vendor/
34
35distclean-local:
36 $(RM) -r .dub/
37 $(RM) -r autom4te.cache/
38
39CLEANFILES = \
40 composer.lock \
41 dub.selections.json
42
43DISTCLEANFILES = \
44 Makefile \
45 Makefile.in \
46 apache-thrift-test-library \
47 autoscan.log \
48 compile \
49 config.guess \
50 config.hin \
51 config.hin~ \
52 config.log \
53 config.status \
54 config.sub \
55 configure \
56 configure.scan \
57 debcomp \
58 install-sh \
59 ltmain.sh \
60 missing \
61 ylwrap
62
David Reisse2113932009-03-26 08:47:07 +000063dist-hook:
James E. King IIIb96c4382019-01-24 17:45:07 -050064 find $(distdir) -type f \( -iname ".DS_Store" -or -iname "._*" -or -iname ".gitignore" \) | xargs rm -f
Jens Geyer79f988c2014-10-03 20:42:54 +020065 find $(distdir) -type d \( -iname ".deps" -or -iname ".libs" \) | xargs rm -rf
66 find $(distdir) -type d \( -iname ".svn" -or -iname ".git" \) | xargs rm -rf
David Reisse2113932009-03-26 08:47:07 +000067
Roger Meier22872782010-10-22 11:20:25 +000068print-version:
James E. King, III0ad20bd2017-09-30 15:44:16 -070069 @echo $(PACKAGE_VERSION)
Roger Meier22872782010-10-22 11:20:25 +000070
Nobuaki Sukegawaf5b795d2015-03-29 14:48:48 +090071.PHONY: precross cross
Roger Meier41ad4342015-03-24 22:30:40 +010072precross-%: all
73 $(MAKE) -C $* precross
74precross: all precross-test precross-lib
Roger Meier7e103292014-02-22 18:13:03 +010075
Nobuaki Sukegawa03f0e182015-05-09 18:33:42 +090076empty :=
77space := $(empty) $(empty)
78comma := ,
79
wilfrem2c69b5a2015-04-20 19:24:50 +090080CROSS_LANGS = @MAYBE_CPP@ @MAYBE_C_GLIB@ @MAYBE_CL@ @MAYBE_D@ @MAYBE_JAVA@ @MAYBE_CSHARP@ @MAYBE_PYTHON@ @MAYBE_PY3@ @MAYBE_RUBY@ @MAYBE_HASKELL@ @MAYBE_PERL@ @MAYBE_PHP@ @MAYBE_GO@ @MAYBE_NODEJS@ @MAYBE_DART@ @MAYBE_ERLANG@ @MAYBE_LUA@ @MAYBE_RS@ @MAYBE_DOTNETCORE@ @MAYBE_NODETS@
Nobuaki Sukegawa03f0e182015-05-09 18:33:42 +090081CROSS_LANGS_COMMA_SEPARATED = $(subst $(space),$(comma),$(CROSS_LANGS))
82
Nobuaki Sukegawaffc2bb32016-01-12 19:20:05 +090083if WITH_PY3
84CROSS_PY=$(PYTHON3)
85else
86CROSS_PY=$(PYTHON)
87endif
88
Nobuaki Sukegawabd165302016-01-19 11:10:07 +090089if WITH_PYTHON
Nobuaki Sukegawa2c64bdd2016-09-04 15:33:40 +090090crossfeature: precross
James E. King III714c77c2018-03-20 19:58:38 -040091 $(CROSS_PY) test/test.py --retry-count 5 --features .* --skip-known-failures --server $(CROSS_LANGS_COMMA_SEPARATED)
Nobuaki Sukegawabd165302016-01-19 11:10:07 +090092else
93# feature test needs python build
Nobuaki Sukegawa2c64bdd2016-09-04 15:33:40 +090094crossfeature:
Nobuaki Sukegawabd165302016-01-19 11:10:07 +090095endif
Roger Meierbb23ead2015-04-11 13:12:35 +020096
Nobuaki Sukegawa2c64bdd2016-09-04 15:33:40 +090097cross-%: precross crossfeature
James E. King III714c77c2018-03-20 19:58:38 -040098 $(CROSS_PY) test/test.py --retry-count 5 --skip-known-failures --server $(CROSS_LANGS_COMMA_SEPARATED) --client $(CROSS_LANGS_COMMA_SEPARATED) --regex "$*"
Nobuaki Sukegawa2c64bdd2016-09-04 15:33:40 +090099
100cross: cross-.*
101
Nobuaki Sukegawa147a5a22015-04-11 23:01:40 +0900102TIMES = 1 2 3
Roger Meierbb23ead2015-04-11 13:12:35 +0200103fail: precross
Nobuaki Sukegawaffc2bb32016-01-12 19:20:05 +0900104 $(CROSS_PY) test/test.py || true
105 $(CROSS_PY) test/test.py --update-expected-failures=overwrite
Nobuaki Sukegawa147a5a22015-04-11 23:01:40 +0900106 $(foreach var,$(TIMES),test/test.py -s || true;test/test.py --update-expected-failures=merge;)
Roger Meier41ad4342015-03-24 22:30:40 +0100107
Konrad Grochowski05fb8422014-11-24 11:16:54 +0100108codespell_skip_files = \
Konrad Grochowski40b2b642014-12-09 15:26:39 +0100109 *.jar \
110 *.class \
111 *.so \
Konrad Grochowski05fb8422014-11-24 11:16:54 +0100112 *.a \
113 *.la \
114 *.o \
115 *.p12 \
116 *OCamlMakefile \
117 .keystore \
118 .truststore \
119 CHANGES \
120 config.sub \
121 configure \
122 depcomp \
123 libtool.m4 \
124 output.* \
125 rebar \
126 thrift
127
Konrad Grochowski05fb8422014-11-24 11:16:54 +0100128skipped_files = $(subst $(space),$(comma),$(codespell_skip_files))
129
130style-local:
131 codespell --write-changes --skip=$(skipped_files) --disable-colors
132
Jake Farrelle0c53162011-11-16 12:58:36 +0000133EXTRA_DIST = \
jfarrellf13e4312015-08-25 00:39:29 -0400134 .clang-format \
James E. King IIIb96c4382019-01-24 17:45:07 -0500135 .dockerignore \
jfarrellf13e4312015-08-25 00:39:29 -0400136 .editorconfig \
Jens Geyer79f988c2014-10-03 20:42:54 +0200137 .travis.yml \
Jens Geyerf3a29742017-11-30 22:30:03 +0100138 .rustfmt.toml \
James E. King IIIb96c4382019-01-24 17:45:07 -0500139 ApacheThrift.nuspec \
jfarrellf13e4312015-08-25 00:39:29 -0400140 appveyor.yml \
James E. King IIIb96c4382019-01-24 17:45:07 -0500141 bootstrap.sh \
Jens Geyer79f988c2014-10-03 20:42:54 +0200142 bower.json \
jfarrellf13e4312015-08-25 00:39:29 -0400143 build \
James E. King IIIb96c4382019-01-24 17:45:07 -0500144 CHANGES.md \
jfarrellf13e4312015-08-25 00:39:29 -0400145 CMakeLists.txt \
Jens Geyer79f988c2014-10-03 20:42:54 +0200146 composer.json \
147 contrib \
Roger Meiera199a162015-04-30 18:19:06 +0200148 CONTRIBUTING.md \
Jens Geyer79f988c2014-10-03 20:42:54 +0200149 debian \
Jens Geyer79f988c2014-10-03 20:42:54 +0200150 doap.rdf \
James E. King IIIb96c4382019-01-24 17:45:07 -0500151 doc \
152 dub.json \
153 jitpack.yml \
James E. King, III0ad20bd2017-09-30 15:44:16 -0700154 LANGUAGES.md \
Jens Geyer79f988c2014-10-03 20:42:54 +0200155 LICENSE \
Jens Geyer79f988c2014-10-03 20:42:54 +0200156 NOTICE \
James E. King IIIb96c4382019-01-24 17:45:07 -0500157 package.json \
158 phpcs.xml.dist \
Nobuaki Sukegawa73d16372016-03-19 23:32:11 +0900159 README.md \
James E. King IIIb96c4382019-01-24 17:45:07 -0500160 sonar-project.properties \
Nobuaki Sukegawa73d16372016-03-19 23:32:11 +0900161 Thrift.podspec