Bryan Duxbury | 7173bd9 | 2010-05-02 22:54:22 +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 | |
Anthony F. Molinaro | 917d898 | 2011-06-21 06:20:18 +0000 | [diff] [blame] | 20 | THRIFT = ../../compiler/cpp/thrift |
Anthony F. Molinaro | 917d898 | 2011-06-21 06:20:18 +0000 | [diff] [blame] | 21 | THRIFT_FILES = $(wildcard ../../test/*.thrift) \ |
| 22 | $(wildcard test/*.thrift) |
| 23 | |
| 24 | .generated: $(THRIFT_FILES) |
| 25 | for f in $(THRIFT_FILES) ; do \ |
| 26 | $(THRIFT) --gen erl -out test $$f ; \ |
| 27 | done ; \ |
| 28 | touch .generated |
| 29 | |
| 30 | all: .generated |
| 31 | ./rebar compile |
| 32 | |
| 33 | check: .generated |
Roger Meier | e594bf7 | 2011-06-22 23:01:02 +0000 | [diff] [blame] | 34 | ./rebar eunit |
Bryan Duxbury | 7173bd9 | 2010-05-02 22:54:22 +0000 | [diff] [blame] | 35 | |
Bryan Duxbury | 7173bd9 | 2010-05-02 22:54:22 +0000 | [diff] [blame] | 36 | install: all |
David Reiss | d09f09c | 2010-05-18 21:32:16 +0000 | [diff] [blame] | 37 | mkdir -p $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift) ; \ |
| 38 | mkdir -p $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift)/ebin ; \ |
| 39 | mkdir -p $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift)/include ; \ |
| 40 | mkdir -p $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift)/src ; \ |
| 41 | for p in ebin/*.app* ebin/*.beam include/*.hrl src/*.erl ; \ |
| 42 | do $(INSTALL) $$p $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift)/$$p ; \ |
David Reiss | 9e2fd79 | 2010-05-18 16:52:48 +0000 | [diff] [blame] | 43 | done |
Bryan Duxbury | 7173bd9 | 2010-05-02 22:54:22 +0000 | [diff] [blame] | 44 | |
| 45 | uninstall: |
David Reiss | d09f09c | 2010-05-18 21:32:16 +0000 | [diff] [blame] | 46 | rm -rf $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift) |
Bryan Duxbury | 7173bd9 | 2010-05-02 22:54:22 +0000 | [diff] [blame] | 47 | |
Anthony F. Molinaro | 917d898 | 2011-06-21 06:20:18 +0000 | [diff] [blame] | 48 | clean: |
| 49 | rm .generated |
| 50 | ./rebar clean |
Bryan Duxbury | 7173bd9 | 2010-05-02 22:54:22 +0000 | [diff] [blame] | 51 | |
David Reiss | 9e2fd79 | 2010-05-18 16:52:48 +0000 | [diff] [blame] | 52 | maintainer-clean-local: |
Anthony F. Molinaro | 917d898 | 2011-06-21 06:20:18 +0000 | [diff] [blame] | 53 | rm -f test/secondService_* \ |
| 54 | test/aService_* \ |
| 55 | test/serviceForExceptionWithAMap_* \ |
| 56 | test/annotationTest_* \ |
| 57 | test/service_* \ |
| 58 | test/constantsDemo_* \ |
| 59 | test/smallService_* \ |
| 60 | test/smallTest_* \ |
| 61 | test/debugProtoTest_* \ |
| 62 | test/srv_* \ |
| 63 | test/denseLinkingTest_* \ |
| 64 | test/stressTest_* \ |
| 65 | test/docTest_* \ |
| 66 | test/emptyService_* \ |
| 67 | test/inherited_* \ |
| 68 | test/javaBeansTest_* \ |
| 69 | test/thrift1151_* \ |
| 70 | test/javaBeansTest_* \ |
| 71 | test/manyTypedefs_* \ |
| 72 | test/thriftTest_* \ |
| 73 | test/optionalRequiredTest_* \ |
| 74 | test/yowza_* \ |
| 75 | test/reverseOrderService_* |
David Reiss | 9e2fd79 | 2010-05-18 16:52:48 +0000 | [diff] [blame] | 76 | rm -rf ebin |
Bryan Duxbury | 7173bd9 | 2010-05-02 22:54:22 +0000 | [diff] [blame] | 77 | |
Anthony F. Molinaro | 917d898 | 2011-06-21 06:20:18 +0000 | [diff] [blame] | 78 | EXTRA_DIST = include src rebar rebar.config |
David Reiss | 653eada | 2010-10-05 02:38:58 +0000 | [diff] [blame] | 79 | |
Bryan Duxbury | 7173bd9 | 2010-05-02 22:54:22 +0000 | [diff] [blame] | 80 | MAINTAINERCLEANFILES = Makefile.in |