File: Makefile.PL

package info (click to toggle)
libpdl-vectorvalued-perl 1.0.23-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 232 kB
  • sloc: perl: 377; makefile: 3
file content (83 lines) | stat: -rw-r--r-- 1,791 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
use ExtUtils::MakeMaker;

##-- put 'realclean_files' in a variable: avoid MakeMaker puking with:
##     ERROR from evaluation of .../ccsutils/Makefile.PL:
##     Modification of a read-only value attempted at /usr/share/perl/5.8/Carp/Heavy.pm line 45.
our $realclean_files = '*~ *.tmp';
our $has_readme_pod  = grep {-e $_ } (<README.pod>, <README.POD>, <README.rpod>);
our $has_pdlpp       = grep {-e $_ } (<*.pd>);
WriteMakefile(
	      NAME=>'PDL::VectorValued::Dev',
	      VERSION_FROM => '../VectorValued.pm',
	      LICENSE => 'perl',
	      #PM => { (map {$_=>"\$(INST_LIBDIR)/CCS/$_"} <*.pm>), },
	      realclean=>{ FILES=>$realclean_files, },
	      DIR =>[
		     #'my_subdir',
		    ],
	      NO_MYMETA => 1,
	     );

##-- overrides
sub MY::depend {
  package MY;
  my $inherited = shift->SUPER::depend(@_);
  if ($::has_readme_pod) {
    $inherited .= (
		   "\n\n"
		   ."dist: README.txt\n"
		   ."\n"
		   ."create_distdir: README.txt\n"
		   ."\n"
		   ."distcheck: README.txt\n"
		   ."\n"
		   ."manicheck: README.txt\n"
		   ."\n"
		  );
  }
  return $inherited;
}

sub MY::special_targets {
  package MY;
  my $inherited = shift->SUPER::special_targets(@_);
  #$inherited =~ s/^(\.SUFFIXES\s*:.*)$/$1 .pod .pm .man .txt .html;/
  $inherited .=
"
.SUFFIXES: .pm .pod .rpod .man .txt .html

.pm.html:
\tpod2html --outfile \$@ \$<

.pm.txt:
\tpod2text \$< \$@

.pod.html:
\tpod2html --outfile \$@ \$<

.pod.txt:
\tpod2text \$< \$@

.rpod.html:
\tpod2html --outfile \$@ \$<

.rpod.txt:
\tpod2text \$< \$@

";
  return $inherited;
}


sub MY::top_targets {
  package MY;
  my $inherited = shift->SUPER::top_targets(@_);
  return $inherited;
}

sub MY::postamble {
  if ($::has_pdlpp) {
    return pdlpp_postamble($package); ##-- for PDL::PP (sub-)modules
  }
  return '';
}