[Libguestfs] [PATCH 1/2] Revert "perl: Fix build and test to work with separated builds."

Hilko Bengen bengen at hilluzination.de
Tue May 28 23:05:19 UTC 2013


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. at MAX_PROC_NR@',
 
-    LIBS => '-L at abs_top_builddir@/src/.libs -lguestfs',
-    INC => '-I at abs_top_builddir@/src -I at abs_top_srcdir@/src',
+    LIBS => '-L at top_builddir@/src/.libs -lguestfs',
+    INC => '-I at top_builddir@/src -I at 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




More information about the Libguestfs mailing list