[PATCH] A few build.sh features
Ian Romanick
idr at freedesktop.org
Mon Feb 16 11:15:57 PST 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Brian Rogers wrote:
> Here are a few patches that do things I found useful.
>
>
> 1. Specify -p to run 'git pull' on each component before building it.
NAK. You really want 'git fetch ; git rebase origin/<current branch>'.
git-pull really is the wrong thing to do here! I have a separate
script that does this for everything in the tree. The function that
does the fetch / rebase is:
function do_fetch_rebase
{
if [ -d $1 ]; then
pushd $1 > /dev/null
git-fetch
echo Updating component ${1}...
branch=$(git-branch | grep '^\* ' | sed 's/. //')
if [ $branch = master ]; then
git-rebase origin
else
git-rebase origin/$branch
fi
popd > /dev/null
fi
}
I patch that does something similar along with a check to make sure the
directory is a git tree (testing for .git should be sufficient) would be
more acceptable.
> 2. Specify -j <number> to pass the same parameter to make for parallel
> building.
NAK. Just set the MAKEFLAGS environment variable. I used to have a
similar patch until I discovered MAKEFLAGS.
> 3. Specify -o <module/component> to build just that component.
>
>
> 1 and 3 are useful in combination to issue a single command to update,
> build, and install a particular component.
Ironically, I was just thinking about adding a flag like that the other
day. Thanks for being less lazy than I. :)
Acked-by: Ian Romanick <ian.d.romanick at intel.com>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkmZu20ACgkQX1gOwKyEAw+nLwCgipzoECslaiFqzB/XoEsbLPAQ
BMcAoJ4pWN9Kku7oDULvCXwt5aB79wKw
=xpXy
-----END PGP SIGNATURE-----
More information about the xorg-devel
mailing list