blob: 9d762b410184ba7c3176cafcea09775bf7777b97 [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
James E. King IIIbbc13772019-01-14 12:07:10 -050020SUBDIRS = t
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
Thomas63f04582024-03-21 22:51:07 +090039distdir:
40 $(MAKE) $(AM_MAKEFLAGS) distdir-am
41
David Reiss48141bf2009-03-18 23:59:56 +000042EXTRA_DIST = \
jfarrellf13e4312015-08-25 00:39:29 -040043 coding_standards.md \
Jens Geyerf3a29742017-11-30 22:30:03 +010044 build-cpan-dist.sh \
Jens Geyer79f988c2014-10-03 20:42:54 +020045 Makefile.PL \
Jens Geyer2ef01132021-02-04 22:41:50 +010046 MANIFEST.SKIP \
Jens Geyer79f988c2014-10-03 20:42:54 +020047 test.pl \
48 lib/Thrift.pm \
49 lib/Thrift.pm \
50 lib/Thrift/BinaryProtocol.pm \
51 lib/Thrift/BufferedTransport.pm \
Jens Geyerf3a29742017-11-30 22:30:03 +010052 lib/Thrift/Exception.pm \
Jens Geyer79f988c2014-10-03 20:42:54 +020053 lib/Thrift/FramedTransport.pm \
54 lib/Thrift/HttpClient.pm \
55 lib/Thrift/MemoryBuffer.pm \
Jens Geyerc2145722015-04-02 22:54:02 +020056 lib/Thrift/MessageType.pm \
57 lib/Thrift/MultiplexedProcessor.pm \
58 lib/Thrift/MultiplexedProtocol.pm \
Jens Geyer79f988c2014-10-03 20:42:54 +020059 lib/Thrift/Protocol.pm \
Jens Geyerc2145722015-04-02 22:54:02 +020060 lib/Thrift/ProtocolDecorator.pm \
Jens Geyer79f988c2014-10-03 20:42:54 +020061 lib/Thrift/Server.pm \
jfarrellf13e4312015-08-25 00:39:29 -040062 lib/Thrift/ServerSocket.pm \
Jens Geyer79f988c2014-10-03 20:42:54 +020063 lib/Thrift/Socket.pm \
jfarrellf13e4312015-08-25 00:39:29 -040064 lib/Thrift/SSLSocket.pm \
65 lib/Thrift/SSLServerSocket.pm \
Nobuaki Sukegawa834f1b42016-03-19 22:31:40 +090066 lib/Thrift/UnixServerSocket.pm \
67 lib/Thrift/UnixSocket.pm \
Jens Geyerf3a29742017-11-30 22:30:03 +010068 lib/Thrift/Type.pm \
Jens Geyer79f988c2014-10-03 20:42:54 +020069 lib/Thrift/Transport.pm \
Jens Geyer2ef01132021-02-04 22:41:50 +010070 tools/FixupDist.pl \
Jens Geyer79f988c2014-10-03 20:42:54 +020071 README.md
Nobuaki Sukegawa33331a32016-03-10 09:26:53 +090072
73THRIFT = @top_builddir@/compiler/cpp/thrift
Jens Geyerf066d842022-06-13 23:37:25 +020074THRIFT_IF = @top_srcdir@/test/v0.16/ThriftTest.thrift
Nobuaki Sukegawa33331a32016-03-10 09:26:53 +090075NAME_BENCHMARKSERVICE = @top_srcdir@/lib/rb/benchmark/Benchmark.thrift
76NAME_AGGR = @top_srcdir@/contrib/async-test/aggr.thrift
77
78THRIFTTEST_GEN = \
79 gen-perl/ThriftTest/Constants.pm \
80 gen-perl/ThriftTest/SecondService.pm \
81 gen-perl/ThriftTest/ThriftTest.pm \
82 gen-perl/ThriftTest/Types.pm
83
84BENCHMARK_GEN = \
85 gen-perl/BenchmarkService.pm \
86 gen-perl/Constants.pm \
87 gen-perl/Types.pm
88
89AGGR_GEN = \
90 gen-perl2/Aggr.pm \
91 gen-perl2/Constants.pm \
92 gen-perl2/Types.pm
93
94PERL_GEN = \
95 $(THRIFTTEST_GEN) \
96 $(BENCHMARK_GEN) \
97 $(AGGR_GEN)
98
99BUILT_SOURCES = $(PERL_GEN)
100
101check-local: $(PERL_GEN)
102 $(PERL) -Iblib/lib -I@abs_srcdir@ -I@builddir@/gen-perl2 -I@builddir@/gen-perl \
James E. King IIIbbc13772019-01-14 12:07:10 -0500103 @abs_srcdir@/test.pl @abs_srcdir@/t/*.t
Nobuaki Sukegawa33331a32016-03-10 09:26:53 +0900104
105$(THRIFTTEST_GEN): $(THRIFT_IF) $(THRIFT)
106 $(THRIFT) --gen perl $<
107
108$(BENCHMARK_GEN): $(NAME_BENCHMARKSERVICE) $(THRIFT)
109 $(THRIFT) --gen perl $<
110
111$(AGGR_GEN): $(NAME_AGGR) $(THRIFT)
112 $(MKDIR_P) gen-perl2
113 $(THRIFT) -out gen-perl2 --gen perl $<