annotate make/make.sh @ 11:af7d7a237911

Untangle while loop slightly.
author Rob Landley <rob@landley.net>
date Thu, 02 Aug 2007 19:44:18 -0400
parents 72ac28634233
children b7f376e957ac
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
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
27 do xmlto xhtml-nochunks $i -o xhtml-nochunks
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
28 done
10
72ac28634233 Take advantage of my laptop's core 2 duo.
Rob Landley <rob@landley.net>
parents: 9
diff changeset
29 # Wait for background task to finish before retrieving result
11
af7d7a237911 Untangle while loop slightly.
Rob Landley <rob@landley.net>
parents: 10
diff changeset
30 while [ $(jobs | wc -l) -ne 0 ]
af7d7a237911 Untangle while loop slightly.
Rob Landley <rob@landley.net>
parents: 10
diff changeset
31 do
af7d7a237911 Untangle while loop slightly.
Rob Landley <rob@landley.net>
parents: 10
diff changeset
32 sleep 1
af7d7a237911 Untangle while loop slightly.
Rob Landley <rob@landley.net>
parents: 10
diff changeset
33 done
9
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
34 mv xhtml-nochunks/*.html .
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
35 rmdir xhtml-nochunks
1
34a037d461f9 Some random infrastructure to build documentation from source.
Rob Landley <rob@landley.net>
parents:
diff changeset
36
9
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
37 echo Install htmldocs
b1f967311862 Update the build infrastructure. Documentation is still just copied, but
Rob Landley <rob@landley.net>
parents: 1
diff changeset
38 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
39 cp -a ~/linux/temp/Documentation/DocBook ~/www/kdocs/htmldocs