summaryrefslogtreecommitdiff
path: root/tools/release/manuals.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/release/manuals.pl')
-rwxr-xr-xtools/release/manuals.pl99
1 files changed, 99 insertions, 0 deletions
diff --git a/tools/release/manuals.pl b/tools/release/manuals.pl
new file mode 100755
index 0000000000..4867a17920
--- /dev/null
+++ b/tools/release/manuals.pl
@@ -0,0 +1,99 @@
1#!/usr/bin/perl
2
3$version="3.0";
4
5my $verbose;
6if($ARGV[0] eq "-v") {
7 $verbose =1;
8 shift @ARGV;
9}
10
11my $doonly;
12if($ARGV[0]) {
13 $doonly = $ARGV[0];
14 print "only build $doonly\n" if($verbose);
15}
16
17# made once for all targets
18sub runone {
19 my ($dir, $conf, $nl)=@_;
20 my $a;
21
22 if($doonly && ($doonly ne $dir)) {
23 return;
24 }
25
26 mkdir "buildm-$dir";
27 chdir "buildm-$dir";
28 print "Build in buildm-$dir\n" if($verbose);
29
30 # build the manual(s)
31 $a = buildit($dir, $conf, $nl);
32
33 chdir "..";
34
35 my $o="buildm-$dir/manual/rockbox-build.pdf";
36 if (-f $o) {
37 my $newo="output/rockbox-$dir-$version.pdf";
38 system("mv $o $newo");
39 print "moved $o to $newo\n" if($verbose);
40 }
41
42 $o="buildm-$dir/rockbox-manual.zip";
43 if (-f $o) {
44 my $newo="output/rockbox-$dir-$version-html.zip";
45 system("mv $o $newo");
46 print "moved $o to $newo\n" if($verbose);
47 }
48
49 print "remove all contents in buildm-$dir\n" if($verbose);
50 system("rm -rf buildm-$dir");
51
52 return $a;
53};
54
55sub buildit {
56 my ($target, $confnum, $newl)=@_;
57
58 `rm -rf * >/dev/null 2>&1`;
59
60 my $c = sprintf('echo -e "%s\n%sm\n" | ../tools/configure',
61 $confnum, $newl?'\n':'');
62
63 print "C: $c\n" if($verbose);
64 `$c`;
65
66 print "Run 'make'\n" if($verbose);
67 `make manual 2>/dev/null`;
68
69 print "Run 'make manual-zip'\n" if($verbose);
70 `make manual-zip 2>/dev/null`;
71}
72
73# run make in tools first to make sure they're up-to-date
74`(cd tools && make ) >/dev/null 2>&1`;
75
76runone("player", "player", 1);
77runone("recorder", "recorder", 1);
78runone("fmrecorder", "fmrecorder", 1);
79runone("recorderv2", "recorderv2", 1);
80runone("ondiosp", "ondiosp", 1);
81runone("ondiofm", "ondiofm", 1);
82runone("h100", "h100");
83#runone("h120", 9);
84runone("h300", "h300");
85runone("ipodcolor", "ipodcolor");
86runone("ipodnano", "ipodnano");
87runone("ipod4gray", "ipod4g");
88runone("ipodvideo", "ipodvideo", 1);
89runone("ipod3g", "ipod3g");
90runone("ipod1g2g", "ipod1g2g");
91runone("iaudiox5", "x5");
92runone("iaudiom5", "m5");
93runone("ipodmini2g", "ipodmini2g");
94runone("h10", "h10");
95runone("h10_5gb", "h10_5gb");
96runone("gigabeatf", "gigabeatf");
97runone("sansae200", "e200");
98runone("sansac200", "c200");
99runone("mrobe100", "mrobe100");