24 lines
347 B
Bash
Executable file
24 lines
347 B
Bash
Executable file
#!/bin/sh
|
|
# $Id$
|
|
|
|
(
|
|
echo '/* This file is generated from '$1'; do not edit */'
|
|
|
|
cat $1 |
|
|
grep '^\.Wn' |
|
|
sed '
|
|
s/.*"/#define /
|
|
'
|
|
|
|
echo '#define warning(n) do_warn((n), __LINE__, __FILE__)'
|
|
) >\#warn.h
|
|
|
|
if # the new one unchanged
|
|
cmp -s \#warn.h warn.h
|
|
then # throw it away
|
|
rm \#warn.h
|
|
else # overwrite old version
|
|
mv \#warn.h warn.h
|
|
fi
|
|
|