[git commit] buildsys: add cppcheck wrapper script
Mike Frysinger
vapier at gentoo.org
Wed Jan 18 12:19:32 UTC 2012
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20120118/020d281f/attachment.asc>
More information about the uClibc
mailing list