Hilko Bengen
2013-May-28 23:05 UTC
[Libguestfs] [PATCH 1/2] Revert "perl: Fix build and test to work with separated builds."
This reverts commit 4ea016dae96ed4fc3ca6d057f17fde9697f0e627. --- .gitignore | 1 - configure.ac | 2 -- perl/Makefile.PL.in | 6 +++--- perl/Makefile.am | 14 ++------------ perl/run-perl-tests | 21 +++++++++++++++++++++ perl/run-perl-tests.in | 21 --------------------- run.in | 4 ++-- 7 files changed, 28 insertions(+), 41 deletions(-) create mode 100755 perl/run-perl-tests delete mode 100755 perl/run-perl-tests.in diff --git a/.gitignore b/.gitignore index 135e80b..bf9d280 100644 --- a/.gitignore +++ b/.gitignore @@ -287,7 +287,6 @@ Makefile.in /perl/MYMETA.json /perl/MYMETA.yml /perl/pm_to_blib -/perl/run-perl-tests /php/extension/acinclude.m4 /php/extension/aclocal.m4 /php/extension/autom4te.cache diff --git a/configure.ac b/configure.ac index d1f91ab..32eb255 100644 --- a/configure.ac +++ b/configure.ac @@ -1557,8 +1557,6 @@ AC_CONFIG_FILES([appliance/libguestfs-make-fixed-appliance], [chmod +x,-w appliance/libguestfs-make-fixed-appliance]) AC_CONFIG_FILES([inspector/test-xmllint.sh], [chmod +x,-w inspector/test-xmllint.sh]) -AC_CONFIG_FILES([perl/run-perl-tests], - [chmod +x,-w perl/run-perl-tests]) AC_CONFIG_FILES([pick-guests.pl], [chmod +x,-w pick-guests.pl]) AC_CONFIG_FILES([podwrapper.pl], diff --git a/perl/Makefile.PL.in b/perl/Makefile.PL.in index 4f12bc0..59b00d6 100644 --- a/perl/Makefile.PL.in +++ b/perl/Makefile.PL.in @@ -19,13 +19,13 @@ use Config; use ExtUtils::MakeMaker; WriteMakefile ( - FIRST_MAKEFILE => '@abs_builddir@/Makefile-pl', + FIRST_MAKEFILE => 'Makefile-pl', NAME => 'Sys::Guestfs', VERSION => '0.@MAX_PROC_NR@', - LIBS => '-L@abs_top_builddir@/src/.libs -lguestfs', - INC => '-I@abs_top_builddir@/src -I@abs_top_srcdir@/src', + LIBS => '-L@top_builddir@/src/.libs -lguestfs', + INC => '-I@top_builddir@/src -I@top_srcdir@/src', TYPEMAPS => [ '@srcdir@/typemap' ], CCFLAGS => $Config{ccflags} . ' -DGUESTFS_PRIVATE=1 @CFLAGS@', ); diff --git a/perl/Makefile.am b/perl/Makefile.am index 780024f..7b8f5d3 100644 --- a/perl/Makefile.am +++ b/perl/Makefile.am @@ -64,20 +64,10 @@ TESTS_ENVIRONMENT = $(top_builddir)/run --test INSTALLDIRS = site all: Makefile-pl src_deps - $(MAKE) -C $(srcdir) -f $(abs_builddir)/Makefile-pl \ - INST_ARCHLIB=$(abs_builddir)/blib/arch \ - INST_SCRIPT=$(abs_builddir)/blib/script \ - INST_BIN=$(abs_builddir)/blib/bin \ - INST_LIB=$(abs_builddir)/blib/lib \ - INST_MAN1DIR=$(abs_builddir)/blib/man1 \ - INST_MAN3DIR=$(abs_builddir)/blib/man3 \ - TEST_FILES=$(abs_srcdir)/t/*.t + $(MAKE) -f Makefile-pl Makefile-pl: Makefile.PL - cd $(srcdir); \ - perl $(abs_builddir)/Makefile.PL \ - INSTALLDIRS=$(INSTALLDIRS) PREFIX=$(prefix) - sed -i 's,Makefile.PL,$(abs_builddir)/Makefile.PL,' $@ + perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS) PREFIX=$(prefix) # No! Otherwise it is deleted before the clean-local rule runs. #CLEANFILES = Makefile-pl diff --git a/perl/run-perl-tests b/perl/run-perl-tests new file mode 100755 index 0000000..0e7e9ab --- /dev/null +++ b/perl/run-perl-tests @@ -0,0 +1,21 @@ +#!/bin/sh - +# libguestfs Perl bindings +# Copyright (C) 2009 Red Hat Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +set -e + +make -f Makefile-pl test "$@" diff --git a/perl/run-perl-tests.in b/perl/run-perl-tests.in deleted file mode 100755 index 11278a8..0000000 --- a/perl/run-perl-tests.in +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -# libguestfs Perl bindings -# Copyright (C) 2009 Red Hat Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -set -e - -make -C $srcdir -f @abs_builddir@/Makefile-pl test "$@" diff --git a/run.in b/run.in index ebdec65..ebd1225 100755 --- a/run.in +++ b/run.in @@ -90,9 +90,9 @@ export LD_LIBRARY_PATH # For Perl. if [ -z "$PERL5LIB" ]; then - PERL5LIB="$s/perl/lib:$b/perl/blib/lib:$b/perl/blib/arch" + PERL5LIB="$b/perl/blib/lib:$b/perl/blib/arch" else - PERL5LIB="$s/perl/lib:$b/perl/blib/lib:$b/perl/blib/arch:$PERL5LIB" + PERL5LIB="$b/perl/blib/lib:$b/perl/blib/arch:$PERL5LIB" fi export PERL5LIB -- 1.7.10.4
Hilko Bengen
2013-May-28 23:05 UTC
[Libguestfs] [PATCH 2/2] perl: Use symlink hack from hivex
--- perl/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/perl/Makefile.am b/perl/Makefile.am index 7b8f5d3..1eb0469 100644 --- a/perl/Makefile.am +++ b/perl/Makefile.am @@ -67,6 +67,7 @@ all: Makefile-pl src_deps $(MAKE) -f Makefile-pl Makefile-pl: Makefile.PL + -[ $(srcdir) != $(builddir) ] && cp -rsu $(abs_srcdir)/. $(builddir)/. perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS) PREFIX=$(prefix) # No! Otherwise it is deleted before the clean-local rule runs. -- 1.7.10.4
Richard W.M. Jones
2013-Jun-03 13:49 UTC
Re: [Libguestfs] [PATCH 1/2] Revert "perl: Fix build and test to work with separated builds."
On Wed, May 29, 2013 at 01:05:19AM +0200, Hilko Bengen wrote:> This reverts commit 4ea016dae96ed4fc3ca6d057f17fde9697f0e627.ACK to this one, but ... Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW
Richard W.M. Jones
2013-Jun-03 13:51 UTC
Re: [Libguestfs] [PATCH 2/2] perl: Use symlink hack from hivex
On Wed, May 29, 2013 at 01:05:20AM +0200, Hilko Bengen wrote:> --- > perl/Makefile.am | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/perl/Makefile.am b/perl/Makefile.am > index 7b8f5d3..1eb0469 100644 > --- a/perl/Makefile.am > +++ b/perl/Makefile.am > @@ -67,6 +67,7 @@ all: Makefile-pl src_deps > $(MAKE) -f Makefile-pl > > Makefile-pl: Makefile.PL > + -[ $(srcdir) != $(builddir) ] && cp -rsu $(abs_srcdir)/. $(builddir)/. > perl Makefile.PL INSTALLDIRS=$(INSTALLDIRS) PREFIX=$(prefix)OK after discussion on IRC, ACK to this one too. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
Seemingly Similar Threads
- [PATCH 1/2] Revert "perl: Fix build and test to work with separated builds."
- [PATCH] Build and test Perl bindings out-of-tree.
- [PATCH hivex] build: pass $(MAKE) to run-perl-tests
- [PATCH 1/2] golang: Fix for out-of-tree builds
- hivex: revert much of " Build and test Perl bindings out-of-tree." (887466794a40f57b84ce32524e1a650d6674c7e6)?