summaryrefslogtreecommitdiffstats
path: root/RPM4/src/Makefile.PL
diff options
context:
space:
mode:
authornanardon <nanardon@971eb68f-4bfb-0310-8326-d2484c010a4c>2005-12-19 12:16:18 +0000
committernanardon <nanardon@971eb68f-4bfb-0310-8326-d2484c010a4c>2005-12-19 12:16:18 +0000
commit8cbf04cef93a5e6fe5dbdf7a587e16010b4d857f (patch)
tree3acac8edb9bba737f599107e5909b57a92bc4a6e /RPM4/src/Makefile.PL
parent175c7917338ac3198ef95f00e1ffb1fe9b30ab99 (diff)
downloadperl-RPM4-8cbf04cef93a5e6fe5dbdf7a587e16010b4d857f.tar
perl-RPM4-8cbf04cef93a5e6fe5dbdf7a587e16010b4d857f.tar.gz
perl-RPM4-8cbf04cef93a5e6fe5dbdf7a587e16010b4d857f.tar.bz2
perl-RPM4-8cbf04cef93a5e6fe5dbdf7a587e16010b4d857f.tar.xz
perl-RPM4-8cbf04cef93a5e6fe5dbdf7a587e16010b4d857f.zip
- improve makefile
git-svn-id: svn+ssh://haiku.zarb.org/home/projects/rpm4/svn/trunk@76 971eb68f-4bfb-0310-8326-d2484c010a4c
Diffstat (limited to 'RPM4/src/Makefile.PL')
-rw-r--r--RPM4/src/Makefile.PL27
1 files changed, 13 insertions, 14 deletions
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 = <<RPMCONST
-rpmconstant.c: ../../rpmconstant/rpmconstant.c
- cp -a \$< \$@
-
-rpmconstant.h: ../../rpmconstant/rpmconstant.h
- cp -a \$< \$@
-
-rpmconstant_internal.c: ../../rpmconstant/rpmconstant_internal.c
- cp -a \$< \$@
-
-rpmh2tbl: ../../rpmconstant/rpmh2tbl
- cp -a \$< \$@
-RPMCONST
+ foreach (@rpmconstantfiles) {
+ $second .= "$_: ../../rpmconstant/$_\n\tcp -a \$< \$@\n\n";
+ }
}
$first . $second
@@ -76,4 +74,5 @@ WriteMakefile(
INC => '-I/usr/include/rpm',
LIBS => "-lrpm -lrpmio -lrpmdb -lrpmbuild -lpopt -lz -lbz2 $ldd",
'CCFLAGS' => $fl,
+ depend => { "RPM4.xs" => join(" ", @rpmconstantfiles) },
);