On 18 January 2012 13:19, Mike Frysinger <[email protected]> wrote:
> On Wednesday 18 January 2012 02:44:39 Bernhard Reutner-Fischer wrote:
>> --- /dev/null
>> +++ b/extra/scripts/cppcheck.sh
>> @@ -0,0 +1,23 @@
>> +#! /bin/sh
>> +
>> +${REAL_CC-gcc} $*
>
> $* -> "$@"
>
> the rest of our build system uses ${CC} rather than ${REAL_CC} ...
make REAL_CC=gcc-HEAD CC=/src/uClibc/extra/scripts/cppcheck.sh
>
>> +for i in $*
>
> for i in "$@"
>
>> +do
>> + if [ $add_next -eq 1 ] ; then
>> + [ "x$args" = "x" ] && args="$i" || args="$args $i"
>> + add_next=0
>> + continue
>> + fi
>> + case "/$i" in
>> + /-c) add_next=1 ;;
>> + /-D*|/-I*|/-inc) [ "x$args" = "x" ] && args="$i" || args="$args $i" ;;
>> + /-dumpversion|/--print*) ${CC-gcc} $i ; exit 0 ;;
That's definitely not the version of the script i was using normally,
that certainly has REAL_CC for the dump/print args above.
I must have picked an old version it seems. But you get the idea..
>> + *) ;;
>> + esac
>> +done
>
> this doesn't propagate proper quoting, but i don't see a clean solution to
> that without utilizing bash (for its arrays)
right, it worked good enough for a start (at least the right script,
that i ment to checkin)
>
>> +cppcheck $args
>
> exec cppcheck $args
nod
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc