Make gccx consider filepaths independently.
authorJean Privat <jean@pryen.org>
Thu, 25 Dec 2008 19:33:48 +0000 (14:33 -0500)
committerJean Privat <jean@pryen.org>
Thu, 25 Dec 2008 19:33:48 +0000 (14:33 -0500)
bin/gccx

index e89833f..93a0009 100755 (executable)
--- a/bin/gccx
+++ b/bin/gccx
@@ -83,7 +83,8 @@ fi
 for i in "$@"; do
        j=`basename "$i" .c`
        found="false"
-       cksum=`gcc -E $OPTS $i 2> /dev/null | $CKSUM`
+       # We remove starting # to be path independent (after preprocess, there are the only # remainings)
+       cksum=`gcc -E $OPTS $i 2> /dev/null | grep -v "^#" | $CKSUM`
        for e in $ext; do
                o="$dir$j.$e.o"
                cksumfile="$dir$j.$e.cksum"