mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-05-05 05:04:46 +00:00
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:
parent
f32459e6b0
commit
fb260882cb
3 changed files with 12 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
7
linkcheck/HtmlParser/fixincludes.awk
Normal file
7
linkcheck/HtmlParser/fixincludes.awk
Normal 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; }
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
#include "htmlsax.h"
|
||||
#line 2 "htmllex.c"
|
||||
|
||||
#line 4 "htmllex.c"
|
||||
|
|
|
|||
Loading…
Reference in a new issue