blob: fd780a2cda16085bc44a5fc84330173b6210af9a [file] [log] [blame]
Bryan Duxbury7173bd92010-05-02 22:54:22 +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
Anthony F. Molinaro917d8982011-06-21 06:20:18 +000020THRIFT = ../../compiler/cpp/thrift
21#THRIFT_FILES = ../../test/ThriftTest.thrift \
22# ../../test/Stress.thrift
23THRIFT_FILES = $(wildcard ../../test/*.thrift) \
24 $(wildcard test/*.thrift)
25
26.generated: $(THRIFT_FILES)
27 for f in $(THRIFT_FILES) ; do \
28 $(THRIFT) --gen erl -out test $$f ; \
29 done ; \
30 touch .generated
31
32all: .generated
33 ./rebar compile
34
35check: .generated
Roger Meiere594bf72011-06-22 23:01:02 +000036 ./rebar eunit
Bryan Duxbury7173bd92010-05-02 22:54:22 +000037
Bryan Duxbury7173bd92010-05-02 22:54:22 +000038install: all
David Reissd09f09c2010-05-18 21:32:16 +000039 mkdir -p $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift) ; \
40 mkdir -p $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift)/ebin ; \
41 mkdir -p $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift)/include ; \
42 mkdir -p $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift)/src ; \
43 for p in ebin/*.app* ebin/*.beam include/*.hrl src/*.erl ; \
44 do $(INSTALL) $$p $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift)/$$p ; \
David Reiss9e2fd792010-05-18 16:52:48 +000045 done
Bryan Duxbury7173bd92010-05-02 22:54:22 +000046
47uninstall:
David Reissd09f09c2010-05-18 21:32:16 +000048 rm -rf $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift)
Bryan Duxbury7173bd92010-05-02 22:54:22 +000049
Anthony F. Molinaro917d8982011-06-21 06:20:18 +000050clean:
51 rm .generated
52 ./rebar clean
Bryan Duxbury7173bd92010-05-02 22:54:22 +000053
David Reiss9e2fd792010-05-18 16:52:48 +000054maintainer-clean-local:
Anthony F. Molinaro917d8982011-06-21 06:20:18 +000055 rm -f test/secondService_* \
56 test/aService_* \
57 test/serviceForExceptionWithAMap_* \
58 test/annotationTest_* \
59 test/service_* \
60 test/constantsDemo_* \
61 test/smallService_* \
62 test/smallTest_* \
63 test/debugProtoTest_* \
64 test/srv_* \
65 test/denseLinkingTest_* \
66 test/stressTest_* \
67 test/docTest_* \
68 test/emptyService_* \
69 test/inherited_* \
70 test/javaBeansTest_* \
71 test/thrift1151_* \
72 test/javaBeansTest_* \
73 test/manyTypedefs_* \
74 test/thriftTest_* \
75 test/optionalRequiredTest_* \
76 test/yowza_* \
77 test/reverseOrderService_*
David Reiss9e2fd792010-05-18 16:52:48 +000078 rm -rf ebin
Bryan Duxbury7173bd92010-05-02 22:54:22 +000079
Anthony F. Molinaro917d8982011-06-21 06:20:18 +000080EXTRA_DIST = include src rebar rebar.config
David Reiss653eada2010-10-05 02:38:58 +000081
Bryan Duxbury7173bd92010-05-02 22:54:22 +000082MAINTAINERCLEANFILES = Makefile.in