annotate make/make.sh @ 12:b7f376e957ac

Fix two bugs, one of them apparently in bash.
author Rob Landley <rob@landley.net>
date Thu, 02 Aug 2007 21:29:26 -0400
parents af7d7a237911
children 3c78854053e3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
34a037d461f9 Some random infrastructure to build documentation from source.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/bin/bash
34a037d461f9 Some random infrastructure to build documentation from source.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
9
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
3 echo Update linux kernel from kernel.org Mercurial repository
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
4 # mkdir -p ~/linux/hg
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
5 # hg clone http://kernel.org/hg/linux-2.6
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
6 cd ~/linux/hg/linux-2.6
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
7 hg pull -u
1
34a037d461f9 Some random infrastructure to build documentation from source.
Rob Landley <rob@landley.net>
parents:
diff changeset
8
9
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
9 echo Install updated Documentation
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
10 rm -rf ~/www/kdocs/Documentation/
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
11 cp -a ~/linux/hg/linux-2.6/Documentation ~/www/kdocs/Documentation
1
34a037d461f9 Some random infrastructure to build documentation from source.
Rob Landley <rob@landley.net>
parents:
diff changeset
12
9
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
13 echo Build htmldocs and xhtml-nochunks
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
14 rm -rf ~/linux/temp
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
15 cd ~/linux/hg/linux-2.6
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
16 mkdir ~/linux/temp
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
17 make allnoconfig O=~/linux/temp
10
72ac28634233 Take advantage of my laptop's core 2 duo.
Rob Landley <rob@landley.net>
parents: 9
diff changeset
18
72ac28634233 Take advantage of my laptop's core 2 duo.
Rob Landley <rob@landley.net>
parents: 9
diff changeset
19 # I have a dual processor laptop, so overlap work here. Generate the xml
72ac28634233 Take advantage of my laptop's core 2 duo.
Rob Landley <rob@landley.net>
parents: 9
diff changeset
20 # first, then have make htmldocs produce split-up versions in the background
72ac28634233 Take advantage of my laptop's core 2 duo.
Rob Landley <rob@landley.net>
parents: 9
diff changeset
21 # while a script produces nochunks versions in the foreground.
9
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
22 cd ~/linux/temp
10
72ac28634233 Take advantage of my laptop's core 2 duo.
Rob Landley <rob@landley.net>
parents: 9
diff changeset
23 make -j 2 xmldocs
72ac28634233 Take advantage of my laptop's core 2 duo.
Rob Landley <rob@landley.net>
parents: 9
diff changeset
24 make -j 2 htmldocs &
9
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
25 cd Documentation/DocBook
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
26 for i in *.xml
12
b7f376e957ac Fix two bugs, one of them apparently in bash.
Rob Landley <rob@landley.net>
parents: 11
diff changeset
27 do
b7f376e957ac Fix two bugs, one of them apparently in bash.
Rob Landley <rob@landley.net>
parents: 11
diff changeset
28 echo "Converting $i"
b7f376e957ac Fix two bugs, one of them apparently in bash.
Rob Landley <rob@landley.net>
parents: 11
diff changeset
29 xmlto xhtml-nochunks $i -o xhtml-nochunks
9
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
30 done
10
72ac28634233 Take advantage of my laptop's core 2 duo.
Rob Landley <rob@landley.net>
parents: 9
diff changeset
31 # Wait for background task to finish before retrieving result
11
af7d7a237911 Untangle while loop slightly.
Rob Landley <rob@landley.net>
parents: 10
diff changeset
32 while [ $(jobs | wc -l) -ne 0 ]
af7d7a237911 Untangle while loop slightly.
Rob Landley <rob@landley.net>
parents: 10
diff changeset
33 do
af7d7a237911 Untangle while loop slightly.
Rob Landley <rob@landley.net>
parents: 10
diff changeset
34 sleep 1
12
b7f376e957ac Fix two bugs, one of them apparently in bash.
Rob Landley <rob@landley.net>
parents: 11
diff changeset
35 # Without this next line, bash never notices a change in the number of jobs.
b7f376e957ac Fix two bugs, one of them apparently in bash.
Rob Landley <rob@landley.net>
parents: 11
diff changeset
36 # Bug noticed in Ubuntu 7.04
b7f376e957ac Fix two bugs, one of them apparently in bash.
Rob Landley <rob@landley.net>
parents: 11
diff changeset
37 jobs > /dev/null
11
af7d7a237911 Untangle while loop slightly.
Rob Landley <rob@landley.net>
parents: 10
diff changeset
38 done
9
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
39 mv xhtml-nochunks/*.html .
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
40 rmdir xhtml-nochunks
1
34a037d461f9 Some random infrastructure to build documentation from source.
Rob Landley <rob@landley.net>
parents:
diff changeset
41
9
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
42 echo Install htmldocs
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
43 rm -rf ~/www/kdocs/htmldocs
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
44 cp -a ~/linux/temp/Documentation/DocBook ~/www/kdocs/htmldocs
12
b7f376e957ac Fix two bugs, one of them apparently in bash.
Rob Landley <rob@landley.net>
parents: 11
diff changeset
45 echo "Done with kdocs"