line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package MyModuleBuilder; |
2
|
1
|
|
|
1
|
|
1735
|
use Module::Build; |
|
1
|
|
|
|
|
189636
|
|
|
1
|
|
|
|
|
51
|
|
3
|
|
|
|
|
|
|
@ISA = qw(Module::Build); |
4
|
1
|
|
|
1
|
|
1892
|
use File::stat; |
|
1
|
|
|
|
|
21484
|
|
|
1
|
|
|
|
|
9
|
|
5
|
1
|
|
|
1
|
|
78
|
use File::Basename; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
100
|
|
6
|
1
|
|
|
1
|
|
1501
|
use ExtUtils::Install; |
|
1
|
|
|
|
|
30005
|
|
|
1
|
|
|
|
|
1390
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub process_elc_files { |
9
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
10
|
0
|
0
|
|
|
|
0
|
if ( exists $self->{args}{noelc} ) { |
11
|
0
|
|
|
|
|
0
|
return; |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
# Files to ignore byte-compile |
14
|
0
|
|
|
|
|
0
|
my @ignore = qw(pde-load.el pde-loaddefs.el pde-patch.el); |
15
|
0
|
|
|
|
|
0
|
my @el = glob("lisp/*.el"); |
16
|
0
|
|
|
|
|
0
|
foreach my $el ( @el ) { |
17
|
0
|
0
|
|
|
|
0
|
next if grep { basename($el) eq $_ } @ignore; |
|
0
|
|
|
|
|
0
|
|
18
|
0
|
|
|
|
|
0
|
my $elc = $el."c"; |
19
|
0
|
0
|
0
|
|
|
0
|
unless ( -e $elc && stat($elc)->mtime > stat($el)->mtime ) { |
20
|
0
|
|
|
|
|
0
|
my $cmd = qq/emacs -q -batch --no-site-file --eval="(setq load-path (append load-path '(\\".\\" \\"contrib\\")))" -f batch-byte-compile $el/; |
21
|
0
|
|
|
|
|
0
|
print $cmd, "\n"; |
22
|
0
|
|
|
|
|
0
|
system($cmd); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
} |
25
|
0
|
|
|
|
|
0
|
unlink("lisp/tools/perldoc-cache.el"); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub ACTION_test { |
29
|
1
|
|
|
1
|
0
|
6061
|
my ($emacs_version) = `emacs --version`; |
30
|
1
|
50
|
|
|
|
171
|
if ( $emacs_version =~ /GNU Emacs/ ) { |
31
|
0
|
0
|
|
|
|
0
|
if ( $emacs_version =~ /2[23]/ ) { |
32
|
0
|
|
|
|
|
0
|
print "Seem everything is Ok\n"; |
33
|
|
|
|
|
|
|
} else { |
34
|
0
|
|
|
|
|
0
|
print "Your emacs version is too low, PDE may not work. Consider upgrade it.\n" |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
else { |
38
|
1
|
|
|
|
|
25
|
print "No emacs found in your system.\n"; |
39
|
|
|
|
|
|
|
} |
40
|
1
|
|
|
|
|
45
|
return 1; |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub ACTION_fakeinstall { |
44
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
45
|
0
|
|
|
|
|
|
$self->SUPER::ACTION_install(@_); |
46
|
0
|
|
|
|
|
|
my $home = $ENV{HOME}; |
47
|
0
|
|
0
|
|
|
|
my $elispdir = $self->{args}{elispdir} || "$home/.emacs.d/pde"; |
48
|
0
|
|
0
|
|
|
|
ExtUtils::Install::install( {lisp => $elispdir}, !$self->quiet, 1, |
49
|
|
|
|
|
|
|
$self->{args}{uninst} || 0 ); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub ACTION_install { |
53
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
54
|
0
|
|
|
|
|
|
$self->SUPER::ACTION_install(@_); |
55
|
0
|
|
|
|
|
|
my $home = $ENV{HOME}; |
56
|
0
|
|
0
|
|
|
|
my $elispdir = $self->{args}{elispdir} || "$home/.emacs.d/pde"; |
57
|
0
|
|
0
|
|
|
|
ExtUtils::Install::install( {lisp => $elispdir}, !$self->quiet, 0, |
58
|
|
|
|
|
|
|
$self->{args}{uninst} || 0 ); |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
sub ACTION_info { |
62
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
63
|
0
|
|
|
|
|
|
my $texi = "lisp/doc/pde.texi"; |
64
|
0
|
|
|
|
|
|
my $info = "lisp/doc/pde.info"; |
65
|
0
|
0
|
0
|
|
|
|
if ( !-e $info || stat($texi)->mtime > stat($info)->mtime ) { |
66
|
0
|
|
|
|
|
|
print qq/makeinfo --fill-column=70 $texi\n/; |
67
|
0
|
|
|
|
|
|
system("makeinfo", "--fill-column=70", "-o", $info, $texi); |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
else { |
70
|
0
|
|
|
|
|
|
print "$info is already updated to date\n"; |
71
|
|
|
|
|
|
|
} |
72
|
0
|
|
|
|
|
|
return; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub ACTION_disthtml { |
76
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
77
|
0
|
|
|
|
|
|
$self->depends_on('muse'); |
78
|
0
|
|
|
|
|
|
my $html = 'lisp/doc/pde.html'; |
79
|
0
|
|
|
|
|
|
my $htmldir = 'lisp/doc/pde'; |
80
|
0
|
|
|
|
|
|
my $texi = "lisp/doc/pde.texi"; |
81
|
0
|
0
|
0
|
|
|
|
if ( !-e $html || stat($texi)->mtime > stat($html)->mtime ) { |
82
|
0
|
|
|
|
|
|
print qq/makeinfo --no-split --html -o $html $texi\n/; |
83
|
0
|
|
|
|
|
|
system("makeinfo", "--no-split", "--html", "-o", $html, $texi); |
84
|
0
|
|
|
|
|
|
print qq/makeinfo --html -o $htmldir $texi\n/; |
85
|
0
|
|
|
|
|
|
system("makeinfo", "--html", "-o", $htmldir, $texi); |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
else { |
88
|
0
|
|
|
|
|
|
print "html documents is updated to date.\n"; |
89
|
|
|
|
|
|
|
} |
90
|
0
|
|
|
|
|
|
return; |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
sub ACTION_muse { |
94
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
95
|
0
|
|
|
|
|
|
my @muse = ('misc/QuickStart.muse', 'misc/QuickStartEn.muse'); |
96
|
0
|
|
|
|
|
|
my @otherlib = ( |
97
|
|
|
|
|
|
|
'/home/ywb/.emacs.d/site-lisp/mycontrib/dot-emacs-helper.el', |
98
|
|
|
|
|
|
|
"/home/ywb/.emacs.d/config/muse-init.el", |
99
|
|
|
|
|
|
|
"/home/ywb/proj/darcs/pde/misc/muse-myhtml.el" |
100
|
|
|
|
|
|
|
); |
101
|
0
|
|
|
|
|
|
foreach my $muse ( @muse ) { |
102
|
0
|
|
|
|
|
|
(my $html = 'lisp/doc/'.basename($muse)) =~ s/\.muse/.html/; |
103
|
0
|
0
|
0
|
|
|
|
if ( !-e $html || stat($muse)->mtime > stat($muse)->mtime ) { |
104
|
0
|
|
|
|
|
|
system("emacs", "-q", "-batch", |
105
|
0
|
|
|
|
|
|
(map { +"-l" => $_ } @otherlib), |
106
|
|
|
|
|
|
|
"-f", "muse-project-batch-publish", "PDE"); |
107
|
|
|
|
|
|
|
} |
108
|
|
|
|
|
|
|
else { |
109
|
0
|
|
|
|
|
|
print "$html is updated to date.\n"; |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
} |
112
|
0
|
|
|
|
|
|
return; |
113
|
|
|
|
|
|
|
} |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
sub ACTION_dist { |
116
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
117
|
0
|
|
|
|
|
|
$self->depends_on('info'); |
118
|
0
|
|
|
|
|
|
$self->depends_on('disthtml'); |
119
|
0
|
|
|
|
|
|
return $self->SUPER::ACTION_dist(@_); |
120
|
|
|
|
|
|
|
} |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
1; |