Commit 80071c56 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Pre-process <pcre2.h> for FlexeLint

parent 6014912e
......@@ -6,12 +6,27 @@ if [ "x$1" = "x-ok" -a -f _.fl ] ; then
exit 0
fi
d=$(dirname $0)
l=1
if [ $d = ../../tools ] ; then
l=2
IARG="-I. -I../../include -I../.."
else
l=1
IARG="-I. -I../include -I.."
fi
IARG="${IARG} -I/usr/local/include"
# Flexelint do not grok the macro-stacking in pcre2.h
# Solve it by running it through CPP first.
echo '
#include "config.h"
#include <pcre2.h>
' | cc $IARG -E - |
sed '/^# [0-9]/d' > pcre2.h
flexelint \
-D__FLEXELINT__ \
$(if [ $l -eq 2 ] ; then echo ../../flint.lnt ; fi) \
......@@ -19,18 +34,12 @@ flexelint \
flint.lnt \
-zero \
-I. \
$(if [ $l -eq 2 ] ; then
echo -I../../include
echo -I../..
else
echo -I../include
echo -I..
fi
) \
-I/usr/local/include \
${IARG} \
$FLOPS \
2>&1 | tee _.fl
rm -f pcre2.h
if [ -f _.fl.old ] ; then
diff -u _.fl.old _.fl
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment