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 | a25345ca75d0134c372e274dff15b9ff291ac853 (patch) | |
tree | 53d14079c453b2edaec235c1fe9e4eea6df239fe | |
parent | 350d72e7de9b9840894ca921fb94b3f6462e88a6 (diff) | |
download | qpid-python-a25345ca75d0134c372e274dff15b9ff291ac853.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@1199929 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/cpp/bindings/qpid/Makefile.am | 44 | ||||
-rw-r--r-- | qpid/cpp/bindings/qpid/perl/Makefile.PL.in | 18 | ||||
-rw-r--r-- | qpid/cpp/bindings/qpid/perl/Makefile.am | 42 | ||||
-rw-r--r-- | qpid/cpp/configure.ac | 5 |
4 files changed, 64 insertions, 45 deletions
diff --git a/qpid/cpp/bindings/qpid/Makefile.am b/qpid/cpp/bindings/qpid/Makefile.am index 31bce5d1d5..eaf45c2076 100644 --- a/qpid/cpp/bindings/qpid/Makefile.am +++ b/qpid/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/qpid/cpp/bindings/qpid/perl/Makefile.PL.in b/qpid/cpp/bindings/qpid/perl/Makefile.PL.in new file mode 100644 index 0000000000..0e6fb9f0a6 --- /dev/null +++ b/qpid/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/qpid/cpp/bindings/qpid/perl/Makefile.am b/qpid/cpp/bindings/qpid/perl/Makefile.am deleted file mode 100644 index da082896e8..0000000000 --- a/qpid/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 diff --git a/qpid/cpp/configure.ac b/qpid/cpp/configure.ac index 3fbd228f60..245269c32f 100644 --- a/qpid/cpp/configure.ac +++ b/qpid/cpp/configure.ac @@ -223,7 +223,8 @@ if test -n "$PERL"; then PERL_ARCHLIB=`perl -MConfig -e 'print "$Config{archlib}";'` AC_CHECK_FILE( ["$PERL_ARCHLIB/CORE/perl.h"], [AC_SUBST([PERL_INC], ["$PERL_ARCHLIB/CORE"])] ) -fi + AC_SUBST(PERL_ARCHLIB) +fi AM_CONDITIONAL([HAVE_PERL_DEVEL], [test -n "$PERL" && test -n "$SWIG" && test -n "$PERL_INC"]) specdir=`pwd`/$srcdir/../specs @@ -525,7 +526,7 @@ AC_CONFIG_FILES([ bindings/qpid/Makefile bindings/qpid/ruby/Makefile bindings/qpid/python/Makefile - bindings/qpid/perl/Makefile + bindings/qpid/perl/Makefile.PL bindings/qpid/dotnet/Makefile bindings/qmf/Makefile bindings/qmf/ruby/Makefile |