diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2012-03-27 16:57:31 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-28 10:10:56 +0100 |
commit | 9e9d3d452806d62821028e709147376ff01f326d (patch) | |
tree | 7dc16e9845491010a4cf88cd560a5349e7f52bde /scripts | |
parent | c718c10b4b323bdae9f788300110111d61b0d1a3 (diff) | |
download | poky-9e9d3d452806d62821028e709147376ff01f326d.tar.gz |
scripts/bitbake: Update to help rebuild pseudo-native
Attempt to detect when pseudo-native has been updated. If it has been updated,
or if the user is attempting an operation with pseudo-native in the name, force
a build of pseudo-native, prior to running the main build.
Note: This causes a build, then clean in the case of
bitbake -c cleansstate pseudo-native
(From OE-Core rev: f79184d4000708020f76d82330428b5e7a803642)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/bitbake | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/scripts/bitbake b/scripts/bitbake index 45c869799d..eb9e14fae1 100755 --- a/scripts/bitbake +++ b/scripts/bitbake | |||
@@ -55,21 +55,47 @@ fi | |||
55 | buildpseudo="1" | 55 | buildpseudo="1" |
56 | if [ $needpseudo = "1" ] && [ -e "$BUILDDIR/pseudodone" ]; then | 56 | if [ $needpseudo = "1" ] && [ -e "$BUILDDIR/pseudodone" ]; then |
57 | PSEUDOBINDIR=`cat $BUILDDIR/pseudodone` | 57 | PSEUDOBINDIR=`cat $BUILDDIR/pseudodone` |
58 | if [ -e "$PSEUDOBINDIR/pseudo" -a -e "$PSEUDOBINDIR/tar" -a "$needtar" = "1" ]; then | 58 | if [ -e "$PSEUDOBINDIR/pseudo" ]; then |
59 | buildpseudo="0" | 59 | buildpseudo="0" |
60 | fi | 60 | fi |
61 | if [ -e "$PSEUDOBINDIR/pseudo" -a $needtar = "0" ]; then | 61 | |
62 | buildpseudo="0" | 62 | # Verify that the pseudo recipes are older then the pseudodone file |
63 | PSEUDO_RECIPE="`dirname $0`/../meta/recipes-devtools/pseudo" | ||
64 | if [ $buildpseudo -eq 0 ] && [ ! -d "$PSEUDO_RECIPE" ]; then | ||
65 | echo "Unable to verify if pseudo-native is up to date..." >&2 | ||
66 | elif [ $buildpseudo -eq 0 ]; then | ||
67 | PSEUDO_NEWER=`find $PSEUDO_RECIPE -type f -newer $BUILDDIR/pseudodone` | ||
68 | if [ -n "$PSEUDO_NEWER" ]; then | ||
69 | buildpseudo="2" | ||
70 | fi | ||
63 | fi | 71 | fi |
64 | fi | 72 | fi |
73 | |||
74 | # If tar is already built, we don't want to do it again... | ||
75 | if [ -e "$PSEUDOBINDIR/tar" -a "$needtar" = "1" ]; then | ||
76 | needtar="0" | ||
77 | fi | ||
78 | |||
65 | if [ $needpseudo = "0" ]; then | 79 | if [ $needpseudo = "0" ]; then |
66 | buildpseudo="0" | 80 | buildpseudo="0" |
67 | fi | 81 | fi |
68 | 82 | ||
83 | # If pseudo-native is an argument, assume the user wants to build pseudo-native! | ||
84 | if [ $needpseudo != "0" -a $buildpseudo -eq 0 ]; then | ||
85 | for opt in $@; do | ||
86 | if [ "$opt" = "pseudo-native" ]; then | ||
87 | buildpseudo="3" | ||
88 | break | ||
89 | fi | ||
90 | done | ||
91 | fi | ||
92 | |||
69 | OLDPATH=$PATH | 93 | OLDPATH=$PATH |
70 | export PATH=`echo $PATH | sed s#[^:]*/scripts:##` | 94 | export PATH=`echo $PATH | sed s#[^:]*/scripts:##` |
71 | if [ $buildpseudo = "1" ]; then | 95 | if [ $buildpseudo -gt 0 ]; then |
72 | echo "Pseudo is not present but is required, building this first before the main build" | 96 | [ $buildpseudo -eq 1 ] && echo "Pseudo is not present but is required, building this first before the main build" |
97 | [ $buildpseudo -eq 2 ] && echo "Pseudo may be out of date, rebuilding pseudo before the main build" | ||
98 | [ $buildpseudo -eq 3 ] && echo "Building pseudo-native before main build" | ||
73 | export PSEUDO_BUILD=1 | 99 | export PSEUDO_BUILD=1 |
74 | TARTARGET="tar-replacement-native" | 100 | TARTARGET="tar-replacement-native" |
75 | if [ $needtar = "0" ]; then | 101 | if [ $needtar = "0" ]; then |