Mercurial > hg > aboriginal
annotate sources/include.sh @ 1744:4c3164f0d2c2 draft
As long as current kernels have an overlay filesystem, might as well enable it.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 22 Feb 2015 17:22:00 -0600 |
parents | 6cef85eefede |
children |
rev | line source |
---|---|
840 | 1 #!/bin/echo "This file is sourced, not run" |
2 | |
1623
6cef85eefede
Break out variable setting into sources/variables.sh
Rob Landley <rob@landley.net>
parents:
1607
diff
changeset
|
3 # This is the top level include file sourced by each build stage. |
6cef85eefede
Break out variable setting into sources/variables.sh
Rob Landley <rob@landley.net>
parents:
1607
diff
changeset
|
4 |
6cef85eefede
Break out variable setting into sources/variables.sh
Rob Landley <rob@landley.net>
parents:
1607
diff
changeset
|
5 # Guard against multiple inclusion |
6cef85eefede
Break out variable setting into sources/variables.sh
Rob Landley <rob@landley.net>
parents:
1607
diff
changeset
|
6 |
1207
4021fb1183d7
Environment sanitizing screwed up the cross-compiler.sh wrapper. Fix it, rename PROGRAM_PREFIX to TOOLCHAIN_PREFIX, and put a guard around sources/include.sh so it's safe to include multiple times.
Rob Landley <rob@landley.net>
parents:
1187
diff
changeset
|
7 if ! already_included_this 2>/dev/null |
4021fb1183d7
Environment sanitizing screwed up the cross-compiler.sh wrapper. Fix it, rename PROGRAM_PREFIX to TOOLCHAIN_PREFIX, and put a guard around sources/include.sh so it's safe to include multiple times.
Rob Landley <rob@landley.net>
parents:
1187
diff
changeset
|
8 then |
1504
eb4d0124767a
Fix record-commands.sh regression with oldpath going recursive when sources/incldue.sh is source twice.
Rob Landley <rob@landley.net>
parents:
1502
diff
changeset
|
9 alias already_included_this=true |
1207
4021fb1183d7
Environment sanitizing screwed up the cross-compiler.sh wrapper. Fix it, rename PROGRAM_PREFIX to TOOLCHAIN_PREFIX, and put a guard around sources/include.sh so it's safe to include multiple times.
Rob Landley <rob@landley.net>
parents:
1187
diff
changeset
|
10 |
840 | 11 # Set up all the environment variables and functions for a build stage. |
138
7dffe9648a56
Installing bash but not using it. Yeah, there's a political agenda at work
Rob Landley <rob@landley.net>
parents:
125
diff
changeset
|
12 |
1623
6cef85eefede
Break out variable setting into sources/variables.sh
Rob Landley <rob@landley.net>
parents:
1607
diff
changeset
|
13 source config |
1253
d4b251e78fc0
Break out download_functions.sh into their own file.
Rob Landley <rob@landley.net>
parents:
1229
diff
changeset
|
14 source sources/utility_functions.sh |
744
759adf5a0fe9
Refactor so include.sh mostly just sets environment variables. Move read_arch_dir to function and call it explicitly (no more need for $NO_ARCH). Make blank_tempdir a function, called explicitly by stages when needed, with some sanity checks. Insert prerequisite tests to later stages so they can detect failure early and provide an explicit erro rmessage, and have those tests happen before blanking $WORK dir, to preserve debugging info. Make buildall.sh depend on prerequisite tests rather than trying to avoid calling later stages (and thus do flow control from asynchronous context). Add FAIL_QUIET option so buildall.sh doesn't spam the log with the new prerequisite error messages.
Rob Landley <rob@landley.net>
parents:
743
diff
changeset
|
15 source sources/functions.sh |
1253
d4b251e78fc0
Break out download_functions.sh into their own file.
Rob Landley <rob@landley.net>
parents:
1229
diff
changeset
|
16 source sources/download_functions.sh |
1623
6cef85eefede
Break out variable setting into sources/variables.sh
Rob Landley <rob@landley.net>
parents:
1607
diff
changeset
|
17 source sources/variables.sh |
352
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
18 |
897
850da666acc6
Redo command recording: no longer RECORD_COMMMANDS config entry, now sources/more/record-commands.sh run to set up the wrapper (either before or after host-tools.sh). General cleanup and simplification of code this interacted with, plus clean up bit rot in the reporting.
Rob Landley <rob@landley.net>
parents:
854
diff
changeset
|
19 # Create files with known permissions |
850da666acc6
Redo command recording: no longer RECORD_COMMMANDS config entry, now sources/more/record-commands.sh run to set up the wrapper (either before or after host-tools.sh). General cleanup and simplification of code this interacted with, plus clean up bit rot in the reporting.
Rob Landley <rob@landley.net>
parents:
854
diff
changeset
|
20 umask 022 |
608
ab76d4cdd392
Jean Wolter pointed out that running RECORD_COMMANDS=1 twice could create circular symlinks. Hopefully fixed now, and some related cleanups/clarifications.
Rob Landley <rob@landley.net>
parents:
597
diff
changeset
|
21 |
897
850da666acc6
Redo command recording: no longer RECORD_COMMMANDS config entry, now sources/more/record-commands.sh run to set up the wrapper (either before or after host-tools.sh). General cleanup and simplification of code this interacted with, plus clean up bit rot in the reporting.
Rob Landley <rob@landley.net>
parents:
854
diff
changeset
|
22 # Tell bash not to cache the $PATH because we modify it. (Without this, bash |
850da666acc6
Redo command recording: no longer RECORD_COMMMANDS config entry, now sources/more/record-commands.sh run to set up the wrapper (either before or after host-tools.sh). General cleanup and simplification of code this interacted with, plus clean up bit rot in the reporting.
Rob Landley <rob@landley.net>
parents:
854
diff
changeset
|
23 # won't find new executables added after startup.) |
850da666acc6
Redo command recording: no longer RECORD_COMMMANDS config entry, now sources/more/record-commands.sh run to set up the wrapper (either before or after host-tools.sh). General cleanup and simplification of code this interacted with, plus clean up bit rot in the reporting.
Rob Landley <rob@landley.net>
parents:
854
diff
changeset
|
24 set +h |
352
1782b77fae15
Add command logging. Set RECORD_COMMANDS=1 to log every command line run
Rob Landley <rob@landley.net>
parents:
351
diff
changeset
|
25 |
897
850da666acc6
Redo command recording: no longer RECORD_COMMMANDS config entry, now sources/more/record-commands.sh run to set up the wrapper (either before or after host-tools.sh). General cleanup and simplification of code this interacted with, plus clean up bit rot in the reporting.
Rob Landley <rob@landley.net>
parents:
854
diff
changeset
|
26 # Disable internationalization so sort and sed and such can cope with ASCII. |
850da666acc6
Redo command recording: no longer RECORD_COMMMANDS config entry, now sources/more/record-commands.sh run to set up the wrapper (either before or after host-tools.sh). General cleanup and simplification of code this interacted with, plus clean up bit rot in the reporting.
Rob Landley <rob@landley.net>
parents:
854
diff
changeset
|
27 |
850da666acc6
Redo command recording: no longer RECORD_COMMMANDS config entry, now sources/more/record-commands.sh run to set up the wrapper (either before or after host-tools.sh). General cleanup and simplification of code this interacted with, plus clean up bit rot in the reporting.
Rob Landley <rob@landley.net>
parents:
854
diff
changeset
|
28 export LC_ALL=C |
1207
4021fb1183d7
Environment sanitizing screwed up the cross-compiler.sh wrapper. Fix it, rename PROGRAM_PREFIX to TOOLCHAIN_PREFIX, and put a guard around sources/include.sh so it's safe to include multiple times.
Rob Landley <rob@landley.net>
parents:
1187
diff
changeset
|
29 |
4021fb1183d7
Environment sanitizing screwed up the cross-compiler.sh wrapper. Fix it, rename PROGRAM_PREFIX to TOOLCHAIN_PREFIX, and put a guard around sources/include.sh so it's safe to include multiple times.
Rob Landley <rob@landley.net>
parents:
1187
diff
changeset
|
30 fi # already_included_this |