[PATCH 09] bootstrap: handy --root switch for bootstrapping subdirs

Daniel Hellstrom daniel at gaisler.com
Fri Feb 3 14:41:46 UTC 2012


On 02/03/2012 03:17 PM, Daniel Hellstrom wrote:
> On 02/03/2012 03:12 PM, Joel Sherrill wrote:
>> My comments are (1) that it should take all short forms
>> of --root like the other commands do.
>>
>> -r |--ro|--roo|--root)
>>
>> (2) and the new argument should be added to usage message.
>>
>> Any other comments?

will add -b|--ba|--bas|--base instead since -r was already taken, -r is undocumented in usage help though.

>
> Good points, will update patch and resubmit it to the list.
>
> Daniel
>
>>
>> On 02/02/2012 08:46 AM, Daniel Hellstrom wrote:
>>> Use the "--root DIR" to process only a subdir, for example
>>>   $ ./bootstrap --root c/src/lib/libbsp/sparc
>>> will only generate Makefiles for all SPARC BSPs, saves some
>>> time when working with a specific BSP.
>>>
>>> Signed-off-by: Daniel Hellstrom<daniel at gaisler.com>
>>> ---
>>>   bootstrap |   10 +++++++---
>>>   1 files changed, 7 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/bootstrap b/bootstrap
>>> index 1a2a424..472416d 100755
>>> --- a/bootstrap
>>> +++ b/bootstrap
>>> @@ -18,6 +18,7 @@ top_srcdir=`dirname $0`
>>>   verbose="";
>>>   quiet="false"
>>>   mode="autoreconf"
>>> +root=.
>>>
>>>   usage()
>>>   {
>>> @@ -92,6 +93,9 @@ case $1 in
>>>   -g|--ge|--gen|--gene|--gener|--genera|--generat|--generate)
>>>     mode="generate";
>>>     shift;;
>>> +--root)
>>> +  root=$2;
>>> +  shift 2;;
>>>   -*) echo "unknown option $1" ;
>>>     usage ;;
>>>   *) echo "invalid parameter $1" ;
>>> @@ -101,7 +105,7 @@ done
>>>
>>>   case $mode in
>>>   preinstall)
>>> -  confs=`find . -name Makefile.am -exec grep -l 'include .*/preinstall\.am' {} \;`
>>> +  confs=`find $root -name Makefile.am -exec grep -l 'include .*/preinstall\.am' {} \;`
>>>     for i in $confs; do
>>>       dir=$(dirname $i);
>>>       test "$quite" = "true" || echo "Generating $dir/preinstall.am"
>>> @@ -141,7 +145,7 @@ generate)
>>>       ;;
>>>     esac
>>>
>>> -  confs=`find . \( -name 'configure.in' -o -name 'configure.ac' \) -print`
>>> +  confs=`find $root \( -name 'configure.in' -o -name 'configure.ac' \) -print`
>>>     for i in $confs; do
>>>     dir=`dirname $i`;
>>>     configure=`basename $i`;
>>> @@ -173,7 +177,7 @@ autoreconf)
>>>       exit 1
>>>     fi
>>>
>>> -  confs=`find . -name 'configure.ac' -print`
>>> +  confs=`find . -name 'configure.ac' -print $maxdepth`
>>>     for i in $confs; do
>>>     dir=`dirname $i`;
>>>     configure=`basename $i`;
>>
>>
>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel
>
>




More information about the devel mailing list