use warnings FATAL => 'all';
use ExtUtils::Manifest 'maniadd';
+use Getopt::Long qw(:config gnu_getopt);
+
+GetOptions(
+ "d|distdir=s" => \my $distdir,
+ "m|manifest=s" => \my $manifest,
+) or die("Error in command line arguments\n");
+if (defined $distdir) {
+ chdir $distdir;
+}
+if (defined $manifest) {
+ $ExtUtils::Manifest::MANIFEST = $manifest;
+}
for my $file (@ARGV) {
eval { maniadd({ $file => "$file file (added by Distar)"}) }
$(DISTVNAME)/README: $(VERSION_FROM)
$(NOECHO) $(MKPATH) $(DISTVNAME)
pod2text $(VERSION_FROM) >$(DISTVNAME)/README
- $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) ../Distar/helpers/add-to-manifest README
+ $(NOECHO) $(ABSPERLRUN) Distar/helpers/add-to-manifest -d $(DISTVNAME) README
disttest: distmanicheck
distmanicheck: create_distdir
cd $(DISTVNAME) && $(ABSPERLRUN) "-MExtUtils::Manifest=manicheck" -e "exit manicheck"