Image-Base-Other

 view release on metacpan or  search on metacpan

inc/MyMakeMakerExtras.pm  view on Meta::CPAN

    $post .= "MY_HTML_FILES = " . join(' ', keys %html_files) . "\n";
    $post .= <<'HERE';
html: $(MY_HTML_FILES)
HERE
  }

  $post .= <<'HERE';

#------------------------------------------------------------------------------
# development stuff -- from inc/MyMakeMakerExtras.pm

version:
	$(NOECHO)$(ECHO) $(VERSION)

HERE

  my $lint_files = $my_options{'MyMakeMakerExtras_LINT_FILES'};
  if (! defined $lint_files) {
    $lint_files = 'Makefile.PL $(EXE_FILES) $(TO_INST_PM)';
    # would prefer not to lock down the 't' dir existance at ./Makefile.PL
    # time, but it's a bit hard without without GNU make extensions
    if (-d 't') { $lint_files .= ' t/*.t'; }
    if (-d 'xt') { $lint_files .= ' xt/*.t'; }

    my ($dir, $pattern);
    foreach $dir ('t', 'xt', 'examples', 'devel') {
      foreach $pattern ("$dir/*.pl", "$dir/*.pm") {
        my @glob = glob($pattern);
        ### $pattern
        ### @glob
        if (@glob) {
          $lint_files .= " $pattern";
          ### $lint_files
        }
      }
    }
  }

  $post .= "LINT_FILES = $lint_files\n"
    . <<'HERE';
lint:
	perl -MO=Lint $(LINT_FILES)
HERE

  # ------ pc: ------
  $post .= <<'HERE';
pc:
HERE
  # ------ pc: test vars ------
  # the "." obscures it from MyExtractUse.pm
  $post .= "\t-\$(PERLRUNINST) -e 'use "."Test::Vars; all_vars_ok()'\n";

  # ------ pc: podcoverage ------
  foreach (@{$my_options{'MyMakeMakerExtras_Pod_Coverage'}}) {
    my $class = $_;
    # the "." obscures it from MyExtractUse.pm
    $post .= "\t-\$(PERLRUNINST) -e 'use "."Pod::Coverage package=>$class'\n";
  }
  # ------ pc: podlinkcheck ------
  $post .= <<'HERE';
	-podlinkcheck -I lib `ls $(LINT_FILES) | grep -v '\.bash$$|\.desktop$$\.png$$|\.xpm$$'`
HERE
  # ------ pc: podchecker ------
  # "podchecker -warnings -warnings" too much reporting every < and >
  $post .= <<'HERE';
	-podchecker `ls $(LINT_FILES) | grep -v '\.bash$$|\.desktop$$\.png$$|\.xpm$$'`
	perlcritic $(LINT_FILES)
HERE

  # ------ check-copyright-years ------
  $post .= <<'HERE';

HERE

  $post .= "\n";
  $post .= ("MY_EXTRA_FILE_PART_OF = " 
            . ($my_options{'MY_EXTRA_FILE_PART_OF'}||'')
            . "\n");
  $post .= <<'HERE';
check-file-part-of:
	if grep --text 'This file is'' part of ' -r . | egrep -iv '$(DISTNAME)$(MY_EXTRA_FILE_PART_OF)'; then false; else true; fi

HERE

  {
    my $list_html = join(' ',@exefiles_html);
    if (! $list_html && @pmfiles_html <= 3) {
      $list_html = join(' ',@pmfiles_html);
    }
    if (! -e 'inc/my_pod2html') {
      $list_html = '';
    }
    my $make_list_html = ($list_html ? "\n\tmake $list_html" : "");
    $post .= <<"HERE";
my-list:$make_list_html
	ls -l -U $list_html \$(EXE_FILES) *.tar.gz *.deb
HERE
    $post .= <<'HERE';
	@echo -n '$(DEBFILE) '
	@dpkg-deb -f $(DEBFILE) | grep Installed-Size
HERE
    if ($list_html) {
      $post .= "\trm -f $list_html\n";
    }
  }

  return $post;
}

1;
__END__




# Old stuff:

# #------------------------------------------------------------------------------
# # META_MERGE
# 
# sub _meta_merge_req_add {
#   my $req = shift;
#   ### MyMakeMakerExtras META_MERGE: @_
#   while (@_) {
#     my $module = shift;
#     my $version = shift;



( run in 1.310 second using v1.01-cache-2.11-cpan-5837b0d9d2c )