diff options
author | Andrew Stitcher <astitcher@apache.org> | 2011-11-09 19:38:16 +0000 |
---|---|---|
committer | Andrew Stitcher <astitcher@apache.org> | 2011-11-09 19:38:16 +0000 |
commit | 508a252054004669c3c17da39891d3c066360da7 (patch) | |
tree | 971190d112afb01f536b8b06895199229ee61dbb /cpp/bindings/qpid | |
parent | d1410955e1a1522716a66e19130db0e2263575dd (diff) | |
download | qpid-python-508a252054004669c3c17da39891d3c066360da7.tar.gz |
QPID-3464: Build improvements (autotools) [from Jan-Marek Glogowski]
- Improved the perl bindings build
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1199929 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qpid')
-rw-r--r-- | cpp/bindings/qpid/Makefile.am | 44 | ||||
-rw-r--r-- | cpp/bindings/qpid/perl/Makefile.PL.in | 18 | ||||
-rw-r--r-- | cpp/bindings/qpid/perl/Makefile.am | 42 |
3 files changed, 61 insertions, 43 deletions
diff --git a/cpp/bindings/qpid/Makefile.am b/cpp/bindings/qpid/Makefile.am index 31bce5d1d5..eaf45c2076 100644 --- a/cpp/bindings/qpid/Makefile.am +++ b/cpp/bindings/qpid/Makefile.am @@ -32,7 +32,49 @@ SUBDIRS += python endif if HAVE_PERL_DEVEL -SUBDIRS += perl + +INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src -I$(top_builddir)/src -I$(PERL_INC) + +EXTRA_DIST += perl/perl.i +BUILT_SOURCES = perl/cqpid_perl.cpp +SWIG_FLAGS = -w362,401 + +perl/cqpid_perl.cpp: $(srcdir)/perl/perl.i $(srcdir)/qpid.i $(srcdir)/../swig_perl_typemaps.i + $(SWIG) -perl -c++ $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o perl/cqpid_perl.cpp $(srcdir)/perl/perl.i + +perl/Makefile: perl/cqpid_perl.cpp + cd perl; \ + $(PERL) Makefile.PL PREFIX=$(prefix) LIB=$(PERL_ARCHLIB) ; \ + cd .. + +all-local: perl/Makefile + cd perl; \ + $(MAKE) OPTIMIZE="$(CXXFLAGS)" ; \ + cd .. + +install-exec-local: + cd perl ; \ + $(MAKE) pure_install DESTDIR=$(prefix) ; \ + cd .. + +clean-local: + cd perl ; \ + $(MAKE) clean ; \ + cd .. + +distclean-local: + cd perl ; \ + $(MAKE) distclean ; \ + cd .. + +maintainer-clean-local: + cd perl ; \ + $(PERL) maintainer-clean ; \ + cd .. + +DISTCLEANFILES = perl/Makefile.PL +CLEANFILES = perl/cqpid_perl.cpp perl/Makefile.old perl/cqpid_perl.pm + endif endif diff --git a/cpp/bindings/qpid/perl/Makefile.PL.in b/cpp/bindings/qpid/perl/Makefile.PL.in new file mode 100644 index 0000000000..0e6fb9f0a6 --- /dev/null +++ b/cpp/bindings/qpid/perl/Makefile.PL.in @@ -0,0 +1,18 @@ +#!/usr/bin/perl -w + +use strict; + +use ExtUtils::MakeMaker; +use Config; + +WriteMakefile( + NAME => 'cqpid_perl', + PREREQ_PM => {}, + AUTHOR => 'Jan-Marek Glogowski <glogow@fbihome.de>', + LIBS => ["-L@top_builddir@/src/.libs -lqpidmessaging -lqpidtypes"], + DEFINE => '', + INC => '-I@top_srcdir@/include -I@top_builddir@/include -I@top_srcdir@/src -I@top_builddir@/src -I@PERL_INC@', + C => ['cqpid_perl.cpp'], + # Un-comment this if you add C files to link with later: + OBJECT => 'cqpid_perl.o', +); diff --git a/cpp/bindings/qpid/perl/Makefile.am b/cpp/bindings/qpid/perl/Makefile.am deleted file mode 100644 index da082896e8..0000000000 --- a/cpp/bindings/qpid/perl/Makefile.am +++ /dev/null @@ -1,42 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -if HAVE_PERL_DEVEL - -INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/src -I$(top_builddir)/src -I$(PERL_INC) - -EXTRA_DIST = CMakeLists.txt perl.i -BUILT_SOURCES = cqpid_perl.cpp -SWIG_FLAGS = -w362,401 - -cqpid_perl.cpp: $(srcdir)/perl.i $(srcdir)/../qpid.i $(srcdir)/../../swig_perl_typemaps.i - $(SWIG) -perl -c++ $(SWIG_FLAGS) $(INCLUDES) $(QPID_CXXFLAGS) -I/usr/include -o cqpid_perl.cpp $(srcdir)/perl.i - -lib_LTLIBRARIES = libcqpid_perl.la -cqpid_perl_PERL = cqpid_perl.pm - -libcqpid_perl_la_LDFLAGS = -avoid-version -shared -libcqpid_perl_la_LIBADD = -L$(top_builddir)/src/.libs -lqpidmessaging -lqpidtypes \ - $(top_builddir)/src/libqpidmessaging.la $(top_builddir)/src/libqpidtypes.la -libcqpid_perl_la_CXXFLAGS = $(INCLUDES) -fno-strict-aliasing -nodist_libcqpid_perl_la_SOURCES = cqpid_perl.cpp - -CLEANFILES = cqpid_perl.cpp cqpid_perl.pm - -endif # HAVE_PERL_DEVEL |