ensure that Python.h gets included before any system headers

git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1750 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
calvin 2004-09-06 15:19:23 +00:00
parent f32459e6b0
commit fb260882cb
3 changed files with 12 additions and 3 deletions

View file

@ -1,8 +1,8 @@
# this parser needs flex >= 2.5.xx from http://lex.sf.net/
# for reentrant bison parser support!
FLEX=flex
PYVER=2.3
PYTHON=python$(PYVER)
FLEX = flex
PYVER = 2.3
PYTHON = python$(PYVER)
all: htmllex.c htmlparse.c
@ -16,6 +16,7 @@ htmllex.l: htmlparse.h
htmllex.c: htmllex.l htmlsax.h
$(FLEX) htmllex.l
awk -f fixincludes.awk htmllex.c > htmllex.c.fixed; mv -f htmllex.c.fixed htmllex.c
clean:
rm -f htmlparse.c htmlparse.h htmllex.c *.o *.so *.pyc *.pyo *.output

View file

@ -0,0 +1,7 @@
# Add htmlsax.h include as first line of file. This is needed to let
# Python.h be included before any system headers.
# See also http://docs.python.org/api/includes.html
BEGIN {
print "#include \"htmlsax.h\"";
}
{ print; }

View file

@ -1,3 +1,4 @@
#include "htmlsax.h"
#line 2 "htmllex.c"
#line 4 "htmllex.c"