blob: 3eaa94e670be99e5194dd319adb02eb20cb62fff [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
David Reisse2113932009-03-26 08:47:07 +000032dist-hook:
Jens Geyer79f988c2014-10-03 20:42:54 +020033 find $(distdir) -type f \( -iname ".DS_Store" -or -iname "._*" -or -iname ".gitignore" \) | xargs rm -rf
34 find $(distdir) -type d \( -iname ".deps" -or -iname ".libs" \) | xargs rm -rf
35 find $(distdir) -type d \( -iname ".svn" -or -iname ".git" \) | xargs rm -rf
David Reisse2113932009-03-26 08:47:07 +000036
Roger Meier22872782010-10-22 11:20:25 +000037print-version:
Jens Geyer79f988c2014-10-03 20:42:54 +020038 @echo $(VERSION)
Roger Meier22872782010-10-22 11:20:25 +000039
Nobuaki Sukegawaf5b795d2015-03-29 14:48:48 +090040.PHONY: precross cross
Roger Meier41ad4342015-03-24 22:30:40 +010041precross-%: all
42 $(MAKE) -C $* precross
43precross: all precross-test precross-lib
Roger Meier7e103292014-02-22 18:13:03 +010044
Roger Meier41ad4342015-03-24 22:30:40 +010045# TODO: generate --server and --client switches from "--with(out)-..." build flags
Nobuaki Sukegawa03f0e182015-05-09 18:33:42 +090046
47
48empty :=
49space := $(empty) $(empty)
50comma := ,
51
Nobuaki Sukegawaa185d7e2015-11-06 21:24:24 +090052CROSS_LANGS = @MAYBE_CPP@ @MAYBE_C_GLIB@ @MAYBE_JAVA@ @MAYBE_CSHARP@ @MAYBE_PYTHON@ @MAYBE_PY3@ @MAYBE_RUBY@ @MAYBE_HASKELL@ @MAYBE_PERL@ @MAYBE_PHP@ @MAYBE_GO@ @MAYBE_NODEJS@ @MAYBE_DART@ @MAYBE_ERLANG@
Nobuaki Sukegawa03f0e182015-05-09 18:33:42 +090053CROSS_LANGS_COMMA_SEPARATED = $(subst $(space),$(comma),$(CROSS_LANGS))
54
Nobuaki Sukegawaf5b795d2015-03-29 14:48:48 +090055cross: precross
Nobuaki Sukegawa378b7272016-01-03 17:04:50 +090056 $(PYTHON) test/test.py -F.* -s --server $(CROSS_LANGS_COMMA_SEPARATED)
Nobuaki Sukegawa03f0e182015-05-09 18:33:42 +090057 $(PYTHON) test/test.py -s --server $(CROSS_LANGS_COMMA_SEPARATED) --client $(CROSS_LANGS_COMMA_SEPARATED)
Roger Meierbb23ead2015-04-11 13:12:35 +020058
Nobuaki Sukegawa147a5a22015-04-11 23:01:40 +090059TIMES = 1 2 3
Roger Meierbb23ead2015-04-11 13:12:35 +020060fail: precross
Nobuaki Sukegawa147a5a22015-04-11 23:01:40 +090061 $(PYTHON) test/test.py || true
Roger Meierbb23ead2015-04-11 13:12:35 +020062 $(PYTHON) test/test.py --update-expected-failures=overwrite
Nobuaki Sukegawa147a5a22015-04-11 23:01:40 +090063 $(foreach var,$(TIMES),test/test.py -s || true;test/test.py --update-expected-failures=merge;)
Roger Meier41ad4342015-03-24 22:30:40 +010064
Konrad Grochowski05fb8422014-11-24 11:16:54 +010065codespell_skip_files = \
Konrad Grochowski40b2b642014-12-09 15:26:39 +010066 *.jar \
67 *.class \
68 *.so \
Konrad Grochowski05fb8422014-11-24 11:16:54 +010069 *.a \
70 *.la \
71 *.o \
72 *.p12 \
73 *OCamlMakefile \
74 .keystore \
75 .truststore \
76 CHANGES \
77 config.sub \
78 configure \
79 depcomp \
80 libtool.m4 \
81 output.* \
82 rebar \
83 thrift
84
Konrad Grochowski05fb8422014-11-24 11:16:54 +010085skipped_files = $(subst $(space),$(comma),$(codespell_skip_files))
86
87style-local:
88 codespell --write-changes --skip=$(skipped_files) --disable-colors
89
Jake Farrelle0c53162011-11-16 12:58:36 +000090EXTRA_DIST = \
jfarrellf13e4312015-08-25 00:39:29 -040091 .clang-format \
92 .editorconfig \
Jens Geyer79f988c2014-10-03 20:42:54 +020093 .travis.yml \
jfarrellf13e4312015-08-25 00:39:29 -040094 appveyor.yml \
Jens Geyer79f988c2014-10-03 20:42:54 +020095 bower.json \
jfarrellf13e4312015-08-25 00:39:29 -040096 build \
97 CMakeLists.txt \
Jens Geyer79f988c2014-10-03 20:42:54 +020098 composer.json \
99 contrib \
Roger Meiera199a162015-04-30 18:19:06 +0200100 CONTRIBUTING.md \
Jens Geyer79f988c2014-10-03 20:42:54 +0200101 debian \
102 doc \
103 doap.rdf \
Roger Meier281bdae2015-02-03 21:45:28 +0100104 package.json \
Jens Geyer79f988c2014-10-03 20:42:54 +0200105 sonar-project.properties \
106 LICENSE \
107 CHANGES \
108 NOTICE \
109 README.md