blob: 0fe065f40df6c29c8cd755eeb1658e7b9011df79 [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 \
James E. King IIIf95620d2019-01-28 18:15:13 -050046 aclocal.m4 \
James E. King IIIb96c4382019-01-24 17:45:07 -050047 apache-thrift-test-library \
48 autoscan.log \
49 compile \
50 config.guess \
51 config.hin \
52 config.hin~ \
53 config.log \
54 config.status \
55 config.sub \
56 configure \
57 configure.scan \
58 debcomp \
59 install-sh \
60 ltmain.sh \
61 missing \
62 ylwrap
63
David Reisse2113932009-03-26 08:47:07 +000064dist-hook:
James E. King IIIb96c4382019-01-24 17:45:07 -050065 find $(distdir) -type f \( -iname ".DS_Store" -or -iname "._*" -or -iname ".gitignore" \) | xargs rm -f
Jens Geyer79f988c2014-10-03 20:42:54 +020066 find $(distdir) -type d \( -iname ".deps" -or -iname ".libs" \) | xargs rm -rf
67 find $(distdir) -type d \( -iname ".svn" -or -iname ".git" \) | xargs rm -rf
David Reisse2113932009-03-26 08:47:07 +000068
Roger Meier22872782010-10-22 11:20:25 +000069print-version:
James E. King, III0ad20bd2017-09-30 15:44:16 -070070 @echo $(PACKAGE_VERSION)
Roger Meier22872782010-10-22 11:20:25 +000071
Nobuaki Sukegawaf5b795d2015-03-29 14:48:48 +090072.PHONY: precross cross
Roger Meier41ad4342015-03-24 22:30:40 +010073precross-%: all
74 $(MAKE) -C $* precross
75precross: all precross-test precross-lib
Roger Meier7e103292014-02-22 18:13:03 +010076
Nobuaki Sukegawa03f0e182015-05-09 18:33:42 +090077empty :=
78space := $(empty) $(empty)
79comma := ,
80
Jens Geyer66d89762021-03-20 18:07:17 +010081CROSS_LANGS = @MAYBE_CPP@ @MAYBE_C_GLIB@ @MAYBE_CL@ @MAYBE_D@ @MAYBE_JAVA@ @MAYBE_PYTHON@ @MAYBE_PY3@ @MAYBE_RUBY@ @MAYBE_PERL@ @MAYBE_PHP@ @MAYBE_GO@ @MAYBE_NODEJS@ @MAYBE_DART@ @MAYBE_ERLANG@ @MAYBE_LUA@ @MAYBE_RS@ @MAYBE_NETSTD@ @MAYBE_NODETS@
Nobuaki Sukegawa03f0e182015-05-09 18:33:42 +090082CROSS_LANGS_COMMA_SEPARATED = $(subst $(space),$(comma),$(CROSS_LANGS))
83
Nobuaki Sukegawaffc2bb32016-01-12 19:20:05 +090084if WITH_PY3
85CROSS_PY=$(PYTHON3)
86else
87CROSS_PY=$(PYTHON)
88endif
89
Nobuaki Sukegawabd165302016-01-19 11:10:07 +090090if WITH_PYTHON
Nobuaki Sukegawa2c64bdd2016-09-04 15:33:40 +090091crossfeature: precross
James E. King III714c77c2018-03-20 19:58:38 -040092 $(CROSS_PY) test/test.py --retry-count 5 --features .* --skip-known-failures --server $(CROSS_LANGS_COMMA_SEPARATED)
Nobuaki Sukegawabd165302016-01-19 11:10:07 +090093else
94# feature test needs python build
Nobuaki Sukegawa2c64bdd2016-09-04 15:33:40 +090095crossfeature:
Nobuaki Sukegawabd165302016-01-19 11:10:07 +090096endif
Roger Meierbb23ead2015-04-11 13:12:35 +020097
Nobuaki Sukegawa2c64bdd2016-09-04 15:33:40 +090098cross-%: precross crossfeature
James E. King III714c77c2018-03-20 19:58:38 -040099 $(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 +0900100
101cross: cross-.*
102
Nobuaki Sukegawa147a5a22015-04-11 23:01:40 +0900103TIMES = 1 2 3
Roger Meierbb23ead2015-04-11 13:12:35 +0200104fail: precross
Nobuaki Sukegawaffc2bb32016-01-12 19:20:05 +0900105 $(CROSS_PY) test/test.py || true
106 $(CROSS_PY) test/test.py --update-expected-failures=overwrite
Nobuaki Sukegawa147a5a22015-04-11 23:01:40 +0900107 $(foreach var,$(TIMES),test/test.py -s || true;test/test.py --update-expected-failures=merge;)
Roger Meier41ad4342015-03-24 22:30:40 +0100108
Konrad Grochowski05fb8422014-11-24 11:16:54 +0100109codespell_skip_files = \
Konrad Grochowski40b2b642014-12-09 15:26:39 +0100110 *.jar \
111 *.class \
112 *.so \
Konrad Grochowski05fb8422014-11-24 11:16:54 +0100113 *.a \
114 *.la \
115 *.o \
116 *.p12 \
117 *OCamlMakefile \
118 .keystore \
119 .truststore \
120 CHANGES \
121 config.sub \
122 configure \
123 depcomp \
124 libtool.m4 \
125 output.* \
126 rebar \
127 thrift
128
Konrad Grochowski05fb8422014-11-24 11:16:54 +0100129skipped_files = $(subst $(space),$(comma),$(codespell_skip_files))
130
131style-local:
132 codespell --write-changes --skip=$(skipped_files) --disable-colors
133
Jake Farrelle0c53162011-11-16 12:58:36 +0000134EXTRA_DIST = \
Jens Geyer2ef01132021-02-04 22:41:50 +0100135 .asf.yaml \
jfarrellf13e4312015-08-25 00:39:29 -0400136 .clang-format \
James E. King IIIb96c4382019-01-24 17:45:07 -0500137 .dockerignore \
jfarrellf13e4312015-08-25 00:39:29 -0400138 .editorconfig \
Jens Geyer2ef01132021-02-04 22:41:50 +0100139 .eslintignore \
140 .eslintrc.json \
141 .flake8 \
142 .gitattributes \
143 .gitignore \
Jens Geyer79f988c2014-10-03 20:42:54 +0200144 .travis.yml \
James E. King IIIb96c4382019-01-24 17:45:07 -0500145 ApacheThrift.nuspec \
jfarrellf13e4312015-08-25 00:39:29 -0400146 appveyor.yml \
James E. King IIIb96c4382019-01-24 17:45:07 -0500147 bootstrap.sh \
Jens Geyer79f988c2014-10-03 20:42:54 +0200148 bower.json \
jfarrellf13e4312015-08-25 00:39:29 -0400149 build \
James E. King IIIb96c4382019-01-24 17:45:07 -0500150 CHANGES.md \
jfarrellf13e4312015-08-25 00:39:29 -0400151 CMakeLists.txt \
Jens Geyer79f988c2014-10-03 20:42:54 +0200152 composer.json \
153 contrib \
Roger Meiera199a162015-04-30 18:19:06 +0200154 CONTRIBUTING.md \
Jens Geyer79f988c2014-10-03 20:42:54 +0200155 debian \
Jens Geyer79f988c2014-10-03 20:42:54 +0200156 doap.rdf \
James E. King IIIb96c4382019-01-24 17:45:07 -0500157 doc \
158 dub.json \
Jens Geyerf087ec42022-02-02 23:14:52 +0100159 go.mod \
160 go.sum \
James E. King IIIb96c4382019-01-24 17:45:07 -0500161 jitpack.yml \
James E. King, III0ad20bd2017-09-30 15:44:16 -0700162 LANGUAGES.md \
Jens Geyer79f988c2014-10-03 20:42:54 +0200163 LICENSE \
Jens Geyer79f988c2014-10-03 20:42:54 +0200164 NOTICE \
James E. King IIIb96c4382019-01-24 17:45:07 -0500165 package.json \
Jens Geyer2ef01132021-02-04 22:41:50 +0100166 package-lock.json \
James E. King IIIb96c4382019-01-24 17:45:07 -0500167 phpcs.xml.dist \
Nobuaki Sukegawa73d16372016-03-19 23:32:11 +0900168 README.md \
Allen George55c3e4c2021-03-01 23:19:52 -0500169 rust-toolchain \
James E. King IIIb96c4382019-01-24 17:45:07 -0500170 sonar-project.properties \
Nobuaki Sukegawa73d16372016-03-19 23:32:11 +0900171 Thrift.podspec