David Reiss | ea2cba8 | 2009-03-30 21:35:00 +0000 | [diff] [blame] | 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 | |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 20 | ACLOCAL_AMFLAGS = -I ./aclocal |
| 21 | |
Roger Meier | c88d581 | 2014-01-26 11:51:26 +0100 | [diff] [blame] | 22 | SUBDIRS = compiler/cpp lib |
Jake Farrell | 627f1a0 | 2011-09-14 03:43:49 +0000 | [diff] [blame] | 23 | |
| 24 | if WITH_TESTS |
| 25 | SUBDIRS += test |
| 26 | endif |
David Reiss | e211393 | 2009-03-26 08:47:07 +0000 | [diff] [blame] | 27 | |
Roger Meier | c88d581 | 2014-01-26 11:51:26 +0100 | [diff] [blame] | 28 | if WITH_TUTORIAL |
jfarrell | 102c600 | 2013-08-15 21:20:19 -0400 | [diff] [blame] | 29 | SUBDIRS += tutorial |
Roger Meier | c88d581 | 2014-01-26 11:51:26 +0100 | [diff] [blame] | 30 | endif |
jfarrell | 102c600 | 2013-08-15 21:20:19 -0400 | [diff] [blame] | 31 | |
David Reiss | e211393 | 2009-03-26 08:47:07 +0000 | [diff] [blame] | 32 | dist-hook: |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 33 | 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 Reiss | e211393 | 2009-03-26 08:47:07 +0000 | [diff] [blame] | 36 | |
Roger Meier | 2287278 | 2010-10-22 11:20:25 +0000 | [diff] [blame] | 37 | print-version: |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 38 | @echo $(VERSION) |
Roger Meier | 2287278 | 2010-10-22 11:20:25 +0000 | [diff] [blame] | 39 | |
Nobuaki Sukegawa | f5b795d | 2015-03-29 14:48:48 +0900 | [diff] [blame] | 40 | .PHONY: precross cross |
Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame] | 41 | precross-%: all |
| 42 | $(MAKE) -C $* precross |
| 43 | precross: all precross-test precross-lib |
Roger Meier | 7e10329 | 2014-02-22 18:13:03 +0100 | [diff] [blame] | 44 | |
Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame] | 45 | # TODO: generate --server and --client switches from "--with(out)-..." build flags |
Nobuaki Sukegawa | 03f0e18 | 2015-05-09 18:33:42 +0900 | [diff] [blame^] | 46 | |
| 47 | |
| 48 | empty := |
| 49 | space := $(empty) $(empty) |
| 50 | comma := , |
| 51 | |
| 52 | CROSS_LANGS = @MAYBE_CPP@ @MAYBE_C_GLIB@ @MAYBE_JAVA@ @MAYBE_CSHARP@ @MAYBE_PYTHON@ @MAYBE_RUBY@ @MAYBE_HASKELL@ @MAYBE_PERL@ @MAYBE_PHP@ @MAYBE_GO@ @MAYBE_NODEJS@ |
| 53 | CROSS_LANGS_COMMA_SEPARATED = $(subst $(space),$(comma),$(CROSS_LANGS)) |
| 54 | |
Nobuaki Sukegawa | f5b795d | 2015-03-29 14:48:48 +0900 | [diff] [blame] | 55 | cross: precross |
Nobuaki Sukegawa | 03f0e18 | 2015-05-09 18:33:42 +0900 | [diff] [blame^] | 56 | $(PYTHON) test/test.py -s --server $(CROSS_LANGS_COMMA_SEPARATED) --client $(CROSS_LANGS_COMMA_SEPARATED) |
Roger Meier | bb23ead | 2015-04-11 13:12:35 +0200 | [diff] [blame] | 57 | |
Nobuaki Sukegawa | 147a5a2 | 2015-04-11 23:01:40 +0900 | [diff] [blame] | 58 | TIMES = 1 2 3 |
Roger Meier | bb23ead | 2015-04-11 13:12:35 +0200 | [diff] [blame] | 59 | fail: precross |
Nobuaki Sukegawa | 147a5a2 | 2015-04-11 23:01:40 +0900 | [diff] [blame] | 60 | $(PYTHON) test/test.py || true |
Roger Meier | bb23ead | 2015-04-11 13:12:35 +0200 | [diff] [blame] | 61 | $(PYTHON) test/test.py --update-expected-failures=overwrite |
Nobuaki Sukegawa | 147a5a2 | 2015-04-11 23:01:40 +0900 | [diff] [blame] | 62 | $(foreach var,$(TIMES),test/test.py -s || true;test/test.py --update-expected-failures=merge;) |
Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame] | 63 | |
Konrad Grochowski | 05fb842 | 2014-11-24 11:16:54 +0100 | [diff] [blame] | 64 | codespell_skip_files = \ |
Konrad Grochowski | 40b2b64 | 2014-12-09 15:26:39 +0100 | [diff] [blame] | 65 | *.jar \ |
| 66 | *.class \ |
| 67 | *.so \ |
Konrad Grochowski | 05fb842 | 2014-11-24 11:16:54 +0100 | [diff] [blame] | 68 | *.a \ |
| 69 | *.la \ |
| 70 | *.o \ |
| 71 | *.p12 \ |
| 72 | *OCamlMakefile \ |
| 73 | .keystore \ |
| 74 | .truststore \ |
| 75 | CHANGES \ |
| 76 | config.sub \ |
| 77 | configure \ |
| 78 | depcomp \ |
| 79 | libtool.m4 \ |
| 80 | output.* \ |
| 81 | rebar \ |
| 82 | thrift |
| 83 | |
Konrad Grochowski | 05fb842 | 2014-11-24 11:16:54 +0100 | [diff] [blame] | 84 | skipped_files = $(subst $(space),$(comma),$(codespell_skip_files)) |
| 85 | |
| 86 | style-local: |
| 87 | codespell --write-changes --skip=$(skipped_files) --disable-colors |
| 88 | |
Jake Farrell | e0c5316 | 2011-11-16 12:58:36 +0000 | [diff] [blame] | 89 | EXTRA_DIST = \ |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 90 | .travis.yml \ |
| 91 | bower.json \ |
| 92 | composer.json \ |
| 93 | contrib \ |
Roger Meier | a199a16 | 2015-04-30 18:19:06 +0200 | [diff] [blame] | 94 | CONTRIBUTING.md \ |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 95 | debian \ |
| 96 | doc \ |
| 97 | doap.rdf \ |
Roger Meier | 281bdae | 2015-02-03 21:45:28 +0100 | [diff] [blame] | 98 | package.json \ |
Jens Geyer | 79f988c | 2014-10-03 20:42:54 +0200 | [diff] [blame] | 99 | sonar-project.properties \ |
| 100 | LICENSE \ |
| 101 | CHANGES \ |
| 102 | NOTICE \ |
| 103 | README.md |