summaryrefslogtreecommitdiff
path: root/tools/release/manuals.pl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/release/manuals.pl')
-rwxr-xr-xtools/release/manuals.pl36
1 files changed, 17 insertions, 19 deletions
diff --git a/tools/release/manuals.pl b/tools/release/manuals.pl
index 923cacf747..61d298fd38 100755
--- a/tools/release/manuals.pl
+++ b/tools/release/manuals.pl
@@ -1,8 +1,7 @@
1#!/usr/bin/perl 1#!/usr/bin/perl -w
2require "./tools/builds.pm";
2 3
3$version="3.15"; 4require "./tools/builds.pm";
4
5require "tools/builds.pm";
6 5
7my $verbose; 6my $verbose;
8if($ARGV[0] eq "-v") { 7if($ARGV[0] eq "-v") {
@@ -10,21 +9,16 @@ if($ARGV[0] eq "-v") {
10 shift @ARGV; 9 shift @ARGV;
11} 10}
12 11
13my $doonly; 12my $tag = $ARGV[0];
14if($ARGV[0]) { 13my $version = $ARGV[1];
15 $doonly = $ARGV[0]; 14
16 print "only build $doonly\n" if($verbose); 15my $outdir = "output/manuals";
17}
18 16
19# made once for all targets 17# made once for all targets
20sub runone { 18sub runone {
21 my ($dir)=@_; 19 my ($dir)=@_;
22 my $a; 20 my $a;
23 21
24 if($doonly && ($doonly ne $dir)) {
25 return;
26 }
27
28 mkdir "buildm-$dir"; 22 mkdir "buildm-$dir";
29 chdir "buildm-$dir"; 23 chdir "buildm-$dir";
30 print "Build in buildm-$dir\n" if($verbose); 24 print "Build in buildm-$dir\n" if($verbose);
@@ -34,16 +28,18 @@ sub runone {
34 28
35 chdir ".."; 29 chdir "..";
36 30
37 my $o="buildm-$dir/manual/rockbox-build.pdf"; 31 my $o="buildm-$dir/rockbox-$dir-$version.pdf";
38 if (-f $o) { 32 if (-f $o) {
39 my $newo="output/rockbox-$dir-$version.pdf"; 33 my $newo="$outdir/rockbox-$dir-$version.pdf";
40 system("mv $o $newo"); 34 system("mv $o $newo");
41 print "moved $o to $newo\n" if($verbose); 35 print "moved $o to $newo\n" if($verbose);
36 } else {
37 print "buildm-$dir/rockbox-$dir-$version.pdf not found\n";
42 } 38 }
43 39
44 $o="buildm-$dir/rockbox-manual.zip"; 40 $o="buildm-$dir/rockbox-manual.zip";
45 if (-f $o) { 41 if (-f $o) {
46 my $newo="output/rockbox-$dir-$version-html.zip"; 42 my $newo="$outdir/rockbox-$dir-$version-html.zip";
47 system("mv $o $newo"); 43 system("mv $o $newo");
48 print "moved $o to $newo\n" if($verbose); 44 print "moved $o to $newo\n" if($verbose);
49 } 45 }
@@ -64,18 +60,20 @@ sub buildit {
64 print "C: $c\n" if($verbose); 60 print "C: $c\n" if($verbose);
65 `$c`; 61 `$c`;
66 62
67 print "Run 'make'\n" if($verbose); 63 print "Run 'make manual'\n" if($verbose);
68 `make manual VERSION=$version 2>/dev/null`; 64 `make manual VERSION=$version 2>/dev/null`;
69 65
70 print "Run 'make manual-zip'\n" if($verbose); 66 print "Run 'make manual-zip'\n" if($verbose);
71 `make manual-zip VERSION=$version 2>/dev/null`; 67 `make manual-zip VERSION=$version 2>/dev/null`;
72} 68}
73 69
70`git checkout $tag`;
71
74# run make in tools first to make sure they're up-to-date 72# run make in tools first to make sure they're up-to-date
75`(cd tools && make ) >/dev/null 2>&1`; 73`(cd tools && make ) >/dev/null 2>&1`;
76 74
77for my $b (&stablebuilds) { 75`mkdir -p $outdir`;
78 next if (length($builds{$b}{configname}) > 0); # no variants
79 76
77for my $b (&usablebuilds) {
80 runone($b); 78 runone($b);
81} 79}