blob: af6a0c1ba456199a439669cf07f0b3f7d13b0cbb [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
Anthony F. Molinaro49c06dd2011-06-22 16:44:19 +000036
37# FIXME: build breaks on apache build system because it doesn't have eunit
38# ./rebar eunit
Bryan Duxbury7173bd92010-05-02 22:54:22 +000039
Bryan Duxbury7173bd92010-05-02 22:54:22 +000040install: all
David Reissd09f09c2010-05-18 21:32:16 +000041 mkdir -p $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift) ; \
42 mkdir -p $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift)/ebin ; \
43 mkdir -p $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift)/include ; \
44 mkdir -p $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift)/src ; \
45 for p in ebin/*.app* ebin/*.beam include/*.hrl src/*.erl ; \
46 do $(INSTALL) $$p $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift)/$$p ; \
David Reiss9e2fd792010-05-18 16:52:48 +000047 done
Bryan Duxbury7173bd92010-05-02 22:54:22 +000048
49uninstall:
David Reissd09f09c2010-05-18 21:32:16 +000050 rm -rf $(DESTDIR)$(ERLANG_INSTALL_LIB_DIR_thrift)
Bryan Duxbury7173bd92010-05-02 22:54:22 +000051
Anthony F. Molinaro917d8982011-06-21 06:20:18 +000052clean:
53 rm .generated
54 ./rebar clean
Bryan Duxbury7173bd92010-05-02 22:54:22 +000055
David Reiss9e2fd792010-05-18 16:52:48 +000056maintainer-clean-local:
Anthony F. Molinaro917d8982011-06-21 06:20:18 +000057 rm -f test/secondService_* \
58 test/aService_* \
59 test/serviceForExceptionWithAMap_* \
60 test/annotationTest_* \
61 test/service_* \
62 test/constantsDemo_* \
63 test/smallService_* \
64 test/smallTest_* \
65 test/debugProtoTest_* \
66 test/srv_* \
67 test/denseLinkingTest_* \
68 test/stressTest_* \
69 test/docTest_* \
70 test/emptyService_* \
71 test/inherited_* \
72 test/javaBeansTest_* \
73 test/thrift1151_* \
74 test/javaBeansTest_* \
75 test/manyTypedefs_* \
76 test/thriftTest_* \
77 test/optionalRequiredTest_* \
78 test/yowza_* \
79 test/reverseOrderService_*
David Reiss9e2fd792010-05-18 16:52:48 +000080 rm -rf ebin
Bryan Duxbury7173bd92010-05-02 22:54:22 +000081
Anthony F. Molinaro917d8982011-06-21 06:20:18 +000082EXTRA_DIST = include src rebar rebar.config
David Reiss653eada2010-10-05 02:38:58 +000083
Bryan Duxbury7173bd92010-05-02 22:54:22 +000084MAINTAINERCLEANFILES = Makefile.in