Makefile.am 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. ACLOCAL_AMFLAGS = -I ./aclocal
  20. if WITH_PLUGIN
  21. # To enable bootstrap, build order is lib/cpp -> compiler -> others
  22. SUBDIRS = lib/cpp compiler/cpp lib
  23. if WITH_TESTS
  24. SUBDIRS += lib/cpp/test
  25. endif
  26. else
  27. SUBDIRS = compiler/cpp lib
  28. endif
  29. if WITH_TESTS
  30. SUBDIRS += test
  31. endif
  32. if WITH_TUTORIAL
  33. SUBDIRS += tutorial
  34. endif
  35. dist-hook:
  36. find $(distdir) -type f \( -iname ".DS_Store" -or -iname "._*" -or -iname ".gitignore" \) | xargs rm -rf
  37. find $(distdir) -type d \( -iname ".deps" -or -iname ".libs" \) | xargs rm -rf
  38. find $(distdir) -type d \( -iname ".svn" -or -iname ".git" \) | xargs rm -rf
  39. print-version:
  40. @echo $(VERSION)
  41. .PHONY: precross cross
  42. precross-%: all
  43. $(MAKE) -C $* precross
  44. precross: all precross-test precross-lib
  45. empty :=
  46. space := $(empty) $(empty)
  47. comma := ,
  48. CROSS_LANGS = @MAYBE_CPP@ @MAYBE_C_GLIB@ @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@
  49. CROSS_LANGS_COMMA_SEPARATED = $(subst $(space),$(comma),$(CROSS_LANGS))
  50. if WITH_PY3
  51. CROSS_PY=$(PYTHON3)
  52. else
  53. CROSS_PY=$(PYTHON)
  54. endif
  55. if WITH_PYTHON
  56. crossfeature: precross
  57. $(CROSS_PY) test/test.py --retry-count 3 --features .* --skip-known-failures --server $(CROSS_LANGS_COMMA_SEPARATED)
  58. else
  59. # feature test needs python build
  60. crossfeature:
  61. endif
  62. cross-%: precross crossfeature
  63. $(CROSS_PY) test/test.py --retry-count 3 --skip-known-failures --server $(CROSS_LANGS_COMMA_SEPARATED) --client $(CROSS_LANGS_COMMA_SEPARATED) --regex "$*"
  64. cross: cross-.*
  65. TIMES = 1 2 3
  66. fail: precross
  67. $(CROSS_PY) test/test.py || true
  68. $(CROSS_PY) test/test.py --update-expected-failures=overwrite
  69. $(foreach var,$(TIMES),test/test.py -s || true;test/test.py --update-expected-failures=merge;)
  70. codespell_skip_files = \
  71. *.jar \
  72. *.class \
  73. *.so \
  74. *.a \
  75. *.la \
  76. *.o \
  77. *.p12 \
  78. *OCamlMakefile \
  79. .keystore \
  80. .truststore \
  81. CHANGES \
  82. config.sub \
  83. configure \
  84. depcomp \
  85. libtool.m4 \
  86. output.* \
  87. rebar \
  88. thrift
  89. skipped_files = $(subst $(space),$(comma),$(codespell_skip_files))
  90. style-local:
  91. codespell --write-changes --skip=$(skipped_files) --disable-colors
  92. EXTRA_DIST = \
  93. .clang-format \
  94. .editorconfig \
  95. .travis.yml \
  96. appveyor.yml \
  97. bower.json \
  98. build \
  99. CMakeLists.txt \
  100. composer.json \
  101. contrib \
  102. CONTRIBUTING.md \
  103. debian \
  104. doc \
  105. doap.rdf \
  106. package.json \
  107. sonar-project.properties \
  108. Dockerfile \
  109. LICENSE \
  110. CHANGES \
  111. NOTICE \
  112. README.md \
  113. Thrift.podspec