blob: 2fb8c5aebaca099c1ea08a265a3088d7839ee373 [file] [log] [blame]
David Reissea2cba82009-03-30 21:35:00 +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
David Reiss4b86e622009-05-22 19:52:06 +000020SUBDIRS = test
T Jake Luciani1952e542009-02-01 04:47:30 +000021
22Makefile-perl.mk : Makefile.PL
Jens Geyer79f988c2014-10-03 20:42:54 +020023 $(PERL) Makefile.PL MAKEFILE=Makefile-perl.mk INSTALLDIRS=$(INSTALLDIRS) INSTALL_BASE=$(PERL_PREFIX)
T Jake Luciani1952e542009-02-01 04:47:30 +000024
25all-local: Makefile-perl.mk
Nobuaki Sukegawa33331a32016-03-10 09:26:53 +090026 $(MAKE) -f $<
Jens Geyer79f988c2014-10-03 20:42:54 +020027 find blib -name 'Makefile*' -exec rm -f {} \;
T Jake Luciani1952e542009-02-01 04:47:30 +000028
T Jake Luciani1952e542009-02-01 04:47:30 +000029install-exec-local: Makefile-perl.mk
Nobuaki Sukegawa33331a32016-03-10 09:26:53 +090030 $(MAKE) -f $< install DESTDIR=$(DESTDIR)/
T Jake Luciani1952e542009-02-01 04:47:30 +000031
David Reiss067c9af2009-02-11 01:11:54 +000032clean-local:
Jens Geyer79f988c2014-10-03 20:42:54 +020033 if test -f Makefile-perl.mk ; then \
34 $(MAKE) -f Makefile-perl.mk clean ; \
35 fi
Nobuaki Sukegawa33331a32016-03-10 09:26:53 +090036 $(RM) Makefile-perl.mk.old
37 $(RM) -r gen-perl gen-perl2
T Jake Luciani1952e542009-02-01 04:47:30 +000038
David Reiss48141bf2009-03-18 23:59:56 +000039EXTRA_DIST = \
jfarrellf13e4312015-08-25 00:39:29 -040040 coding_standards.md \
Jens Geyer79f988c2014-10-03 20:42:54 +020041 Makefile.PL \
42 test.pl \
43 lib/Thrift.pm \
44 lib/Thrift.pm \
45 lib/Thrift/BinaryProtocol.pm \
46 lib/Thrift/BufferedTransport.pm \
47 lib/Thrift/FramedTransport.pm \
48 lib/Thrift/HttpClient.pm \
49 lib/Thrift/MemoryBuffer.pm \
Jens Geyerc2145722015-04-02 22:54:02 +020050 lib/Thrift/MessageType.pm \
51 lib/Thrift/MultiplexedProcessor.pm \
52 lib/Thrift/MultiplexedProtocol.pm \
Jens Geyer79f988c2014-10-03 20:42:54 +020053 lib/Thrift/Protocol.pm \
Jens Geyerc2145722015-04-02 22:54:02 +020054 lib/Thrift/ProtocolDecorator.pm \
Jens Geyer79f988c2014-10-03 20:42:54 +020055 lib/Thrift/Server.pm \
jfarrellf13e4312015-08-25 00:39:29 -040056 lib/Thrift/ServerSocket.pm \
Jens Geyer79f988c2014-10-03 20:42:54 +020057 lib/Thrift/Socket.pm \
jfarrellf13e4312015-08-25 00:39:29 -040058 lib/Thrift/SSLSocket.pm \
59 lib/Thrift/SSLServerSocket.pm \
Jens Geyer79f988c2014-10-03 20:42:54 +020060 lib/Thrift/Transport.pm \
61 README.md
Nobuaki Sukegawa33331a32016-03-10 09:26:53 +090062
63THRIFT = @top_builddir@/compiler/cpp/thrift
64THRIFT_IF = @top_srcdir@/test/ThriftTest.thrift
65NAME_BENCHMARKSERVICE = @top_srcdir@/lib/rb/benchmark/Benchmark.thrift
66NAME_AGGR = @top_srcdir@/contrib/async-test/aggr.thrift
67
68THRIFTTEST_GEN = \
69 gen-perl/ThriftTest/Constants.pm \
70 gen-perl/ThriftTest/SecondService.pm \
71 gen-perl/ThriftTest/ThriftTest.pm \
72 gen-perl/ThriftTest/Types.pm
73
74BENCHMARK_GEN = \
75 gen-perl/BenchmarkService.pm \
76 gen-perl/Constants.pm \
77 gen-perl/Types.pm
78
79AGGR_GEN = \
80 gen-perl2/Aggr.pm \
81 gen-perl2/Constants.pm \
82 gen-perl2/Types.pm
83
84PERL_GEN = \
85 $(THRIFTTEST_GEN) \
86 $(BENCHMARK_GEN) \
87 $(AGGR_GEN)
88
89BUILT_SOURCES = $(PERL_GEN)
90
91check-local: $(PERL_GEN)
92 $(PERL) -Iblib/lib -I@abs_srcdir@ -I@builddir@/gen-perl2 -I@builddir@/gen-perl \
93 @abs_srcdir@/test.pl @abs_srcdir@/test/*.t
94
95$(THRIFTTEST_GEN): $(THRIFT_IF) $(THRIFT)
96 $(THRIFT) --gen perl $<
97
98$(BENCHMARK_GEN): $(NAME_BENCHMARKSERVICE) $(THRIFT)
99 $(THRIFT) --gen perl $<
100
101$(AGGR_GEN): $(NAME_AGGR) $(THRIFT)
102 $(MKDIR_P) gen-perl2
103 $(THRIFT) -out gen-perl2 --gen perl $<