From 8cbf04cef93a5e6fe5dbdf7a587e16010b4d857f Mon Sep 17 00:00:00 2001 From: nanardon Date: Mon, 19 Dec 2005 12:16:18 +0000 Subject: - improve makefile git-svn-id: svn+ssh://haiku.zarb.org/home/projects/rpm4/svn/trunk@76 971eb68f-4bfb-0310-8326-d2484c010a4c --- RPM4/src/Makefile.PL | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'RPM4/src/Makefile.PL') diff --git a/RPM4/src/Makefile.PL b/RPM4/src/Makefile.PL index fe8fbc0..e01eade 100644 --- a/RPM4/src/Makefile.PL +++ b/RPM4/src/Makefile.PL @@ -32,6 +32,13 @@ print $FH "\n#endif\n"; close($FH); if ($rebh) { exit 0 }; +my @rpmconstantfiles = qw( + rpmconstant.c + rpmconstant.h + rpmconstant_internal.c + rpmh2tbl + ); + my ($obj, $ldd, $fl) = -f '/usr/include/rpmconstant/rpmconstant.h' ? ('', '-lrpmconstant', '-DHAVE_RPMCONSTANT') : @@ -44,26 +51,17 @@ rpmversion.h: rpmconstanttbl.c: Makefile rpmh2tbl perl rpmh2tbl /usr/include/rpm/*.h > \$@ + RPMCONSTTBL # This code is to reduce duplication of files # in fact it is only usefull for the maintainers of this module # if you get the module from CPAN, those files are allready here # if you're building from svn, you need rpmconstant directory - my $second = ""; + my $second = "copyrpmconstant: " . join(" ", @rpmconstantfiles) ."\n\n"; if(-d '../../rpmconstant') { - $second = < '-I/usr/include/rpm', LIBS => "-lrpm -lrpmio -lrpmdb -lrpmbuild -lpopt -lz -lbz2 $ldd", 'CCFLAGS' => $fl, + depend => { "RPM4.xs" => join(" ", @rpmconstantfiles) }, ); -- cgit v1.2.1