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