diff options
author | nanardon <nanardon@971eb68f-4bfb-0310-8326-d2484c010a4c> | 2005-12-19 12:16:18 +0000 |
---|---|---|
committer | nanardon <nanardon@971eb68f-4bfb-0310-8326-d2484c010a4c> | 2005-12-19 12:16:18 +0000 |
commit | 8cbf04cef93a5e6fe5dbdf7a587e16010b4d857f (patch) | |
tree | 3acac8edb9bba737f599107e5909b57a92bc4a6e | |
parent | 175c7917338ac3198ef95f00e1ffb1fe9b30ab99 (diff) | |
download | perl-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
-rw-r--r-- | RPM4/MANIFEST | 1 | ||||
-rw-r--r-- | RPM4/Makefile.PL | 6 | ||||
-rw-r--r-- | RPM4/src/Makefile.PL | 27 |
3 files changed, 18 insertions, 16 deletions
diff --git a/RPM4/MANIFEST b/RPM4/MANIFEST index a598f3f..8e6b79d 100644 --- a/RPM4/MANIFEST +++ b/RPM4/MANIFEST @@ -6,7 +6,6 @@ src/Makefile.PL src/RPM4.h src/RPM4.xs src/RPM4sign.c -src/constant.c src/rpmconstant.c src/rpmconstant.h src/rpmconstant_internal.c diff --git a/RPM4/Makefile.PL b/RPM4/Makefile.PL index c36f295..34988e4 100644 --- a/RPM4/Makefile.PL +++ b/RPM4/Makefile.PL @@ -14,7 +14,10 @@ BARF sub MY::postamble { <<MAKECHANGELOG; -.PHONY: ChangeLog +.PHONY: ChangeLog copyrpmconstant + +copyrpmconstant: + make -C src copyrpmconstant ChangeLog: LC_ALL=C svn update && LC_ALL=C svn log --verbose > \$@ @@ -29,4 +32,5 @@ WriteMakefile( VERSION_FROM => 'lib/RPM4.pm', DIR => [ 'src' ], 'EXE_FILES' => [ qw(bin/rpm_produced bin/rpmresign bin/hrpmreb) ], + depend => { dist => 'copyrpmconstant' }, ); 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) }, ); |