]> git.wh0rd.org Git - fontconfig.git/commitdiff
Replace makealias pattern with something supported by POSIX grep (bug 11083)
authorKeith Packard <keithp@koto.keithp.com>
Thu, 25 Oct 2007 07:22:04 +0000 (00:22 -0700)
committerKeith Packard <keithp@koto.keithp.com>
Thu, 25 Oct 2007 07:22:04 +0000 (00:22 -0700)
The suggested replacement in the bug was not supported by GNU grep, so I
created something that should be supported everywhere (famous last words).

src/makealias

index ef4d3c297c23375b453cf4cf873e90b0536c2262..bbc90f0a8d3a2c76bb25850cbe38888126289484 100755 (executable)
@@ -15,7 +15,7 @@ while read name; do
                hattr='__attribute((visibility("hidden")))'
                echo "extern __typeof ($name) $alias $hattr;" >> $HEAD
                echo "#define $name $alias" >> $HEAD
-               grep -l '^'$name'\>' "$SRCDIR"/*.c | head -1 | sed -e 's/^.*\/\([^.]*\)\.c/#ifdef __\1__/' >> $TAIL
+               grep -l '^'$name'[ (]' "$SRCDIR"/*.c | head -1 | sed -e 's/^.*\/\([^.]*\)\.c/#ifdef __\1__/' >> $TAIL
                echo "#undef $name" >> $TAIL
                cattr='__attribute((alias("'$alias'"), visibility("default")))'
                echo "extern __typeof ($name) $name $cattr;" >> $TAIL