Mercurial > hg > aboriginal
annotate buildall.sh @ 658:dc5512d734f0
Actually put MANIFEST into mini-native.
author | Rob Landley <rob@landley.net> |
---|---|
date | Fri, 27 Mar 2009 23:18:24 -0500 |
parents | 0e8a887f9d8b |
children | 1cf41855bb85 |
rev | line source |
---|---|
610
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
1 #!/bin/bash |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
3 # Build every target architecture, creating out-$ARCH.txt log files. |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
4 # If $FORK is set, build them in parallel. |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
5 |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
6 . sources/functions.sh |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
7 |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
8 # Build one architecture, capturing log output. |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
9 |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
10 buildit() |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
11 { |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
12 (time ./build.sh $1) 2>&1 | tee out-$1.txt |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
13 } |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
14 |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
15 # Build in the background or foreground depending on $FORK |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
16 |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
17 buildlog() |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
18 { |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
19 [ ! -z "$FORK" ] && (buildit $i | grep '^===' &) || buildit $i |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
20 } |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
21 |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
22 # Perform initial setup that doesn't parallelize well. Download source, |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
23 # build host tools, extract source. |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
24 |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
25 (./download.sh && ./host-tools.sh && ./download.sh --extract ) 2>&1 | tee out-host.txt |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
26 |
630
0e8a887f9d8b
buildall.sh should create the README file in the output directory.
Rob Landley <rob@landley.net>
parents:
610
diff
changeset
|
27 # Create README file (requires build/sources to be extracted) |
0e8a887f9d8b
buildall.sh should create the README file in the output directory.
Rob Landley <rob@landley.net>
parents:
610
diff
changeset
|
28 |
0e8a887f9d8b
buildall.sh should create the README file in the output directory.
Rob Landley <rob@landley.net>
parents:
610
diff
changeset
|
29 (do_readme && cat sources/toys/README.footer) | tee build/README |
0e8a887f9d8b
buildall.sh should create the README file in the output directory.
Rob Landley <rob@landley.net>
parents:
610
diff
changeset
|
30 |
610
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
31 # Build architectures |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
32 |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
33 for i in $(cd sources/targets/; ls | grep -v '^hw-') |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
34 do |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
35 buildlog $i |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
36 done |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
37 |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
38 # Wait for architectures to complete |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
39 |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
40 wait4background 0 |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
41 |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
42 # Now build hardware targets |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
43 |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
44 for i in $(cd sources/targets; ls | grep '^hw-') |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
45 do |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
46 buildlog $i |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
47 done |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
48 |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
49 # Wait for hardware targets to complete |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
50 |
a47844b73616
New simple buildall.sh that's a wrapper around build.sh. (Chop out half of build-all-targets, need to make a separate script to build static toolchains.)
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
51 wait4background 0 |