diff options
author | Kay Sievers <kay.sievers@suse.de> | 2005-09-12 15:26:33 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2005-09-12 15:26:33 +0200 |
commit | a8b38f1c44c8a925bef467c7fbca7812dfbf86f8 (patch) | |
tree | db18eab90df9a6d5bc2c31f19c3cd03b8dacb212 /make_gcov.sh | |
parent | 852cc0f58dba9d101abf86880aaea4880222de47 (diff) |
fic gcov use and move it into the Makefile
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'make_gcov.sh')
-rw-r--r-- | make_gcov.sh | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/make_gcov.sh b/make_gcov.sh deleted file mode 100644 index e3ceb96d07..0000000000 --- a/make_gcov.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# -# gcov capability for udev -# -# Provides code coverage analysis for udev. -# -# make_gcov.sh assumes the same same default parameters as make, but also -# accepts the same parameters as make (see README file in udev/ for -# parameter info). There is one exception, klibc can not be used with -# gcov as it will not compile cleanly. -# -# make_gcov.sh then overrides CFLAGS to strip out optimization in order -# for gcov to get correct code coverage analysis. -# -# Leann Ogasawara <ogasawara@osdl.org>, April 2004 - -# clean up udev dir -clean_udev () { - find -name "*.gcno" -exec rm -f "{}" \; - find -name "*.gcda" -exec rm -f "{}" \; - find -name "*.gcov" -exec rm -f "{}" \; - rm -f udev_gcov.txt - make clean -} - -PWD=`pwd` -GCCINCDIR=`gcc -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp"` -LIBSYSFS="-I$PWD/libsysfs/sysfs -I$PWD/libsysfs" -WARNINGS="-Wall -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations" -GCC="-I$GCCINCDIR" -USE_LOG="-DUSE_LOG" -DEBUG="-D_GNU_SOURCE" -GCOV_FLAGS="-pipe -fprofile-arcs -ftest-coverage" - -for i in $*; do - pre=`echo $i | sed 's/=.*//g'` - post=`echo $i | sed 's/.*=//g'` - if [ $pre = "USE_KLIBC" ] && [ $post = "true" ]; then - echo "cannot use gcov with klibc, will not compile" - exit - elif [ $pre = "USE_LOG" ] && [ $post = "false" ]; then - USE_LOG="" - elif [ $pre = "DEBUG" ] && [ $post = "true" ]; then - DEBUG="-g -DDEBUG -D_GNU_SOURCE" - elif [ $pre = "clean" ]; then - clean_udev - exit - fi -done - -clean_udev - -make $* CFLAGS="$WARNINGS $GCOV_FLAGS $USE_LOG $DEBUG $GCC $LIBSYSFS" LDFLAGS="-Wl,-warn-common -fprofile-arcs" |