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} ...

> +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 ;;
> +  *) ;;
> +  esac
> +done

this doesn't propagate proper quoting, but i don't see a clean solution to 
that without utilizing bash (for its arrays)

> +cppcheck $args

exec cppcheck $args
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to