OSSP CVS Repository

ossp - Check-in [5164]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 5164
Date: 2005-Sep-02 20:47:53 (local)
2005-Sep-02 18:47:53 (UTC)
User:rse
Branch:
Comment: support that the C API is built in an arbitrary subdir
Tickets:
Inspections:
Files:
ossp-pkg/uuid/perl/Makefile.PL      1.8 -> 1.9     9 inserted, 2 deleted

ossp-pkg/uuid/perl/Makefile.PL 1.8 -> 1.9

--- Makefile.PL  2005/09/02 17:22:05     1.8
+++ Makefile.PL  2005/09/02 18:47:53     1.9
@@ -32,17 +32,24 @@
 use Config;
 use ExtUtils::MakeMaker;
 
+#   determine source directory
+my ($srcdir) = map { my $d = $_; $d =~ s/\/libuuid\.la$//; $d }
+               grep { -f $_ } ("../libuuid.la", glob("../*/libuuid.la"))
+    or die "no source directory found (where libuuid.la is located)";
+
+#   determine extra build options
 my $compat = 0;
 @ARGV = grep { $_ =~ m/^COMPAT=(\d+)$/i ? ($compat = $1, 0) : 1 } @ARGV;
 
+#   generate Makefile
 WriteMakefile(
     NAME              => 'OSSP::uuid',
     VERSION_FROM      => 'uuid.pm',
     ABSTRACT_FROM     => 'uuid.pod',
     PREREQ_PM         => {},
-    LIBS              => [ '-L../.libs -luuid' ],
+    LIBS              => [ "-L$srcdir/.libs -L$srcdir -luuid" ],
     DEFINE            => '',
-    INC               => '-I. -I..',
+    INC               => "-I. -I$srcdir",
     PM                => { 'uuid.pm'   => '$(INST_LIBDIR)/uuid.pm',
                            'uuid.pod'  => '$(INST_LIBDIR)/uuid.pod',
                            ($compat ? ('uuid_compat.pm'  => '$(INST_LIBDIR)/../Data/UUID.pm')  : ()),

CVSTrac 2.0.1