2004-08-16 19:28:42 +00:00
|
|
|
# this parser needs flex >= 2.5.xx from http://lex.sf.net/
|
|
|
|
|
# for reentrant bison parser support!
|
2004-09-06 15:19:23 +00:00
|
|
|
FLEX = flex
|
2005-10-11 16:15:00 +00:00
|
|
|
PYVER = 2.4
|
2004-09-06 15:19:23 +00:00
|
|
|
PYTHON = python$(PYVER)
|
2005-10-11 16:15:55 +00:00
|
|
|
SPARSE=sparse
|
2004-08-16 19:28:42 +00:00
|
|
|
|
|
|
|
|
all: htmllex.c htmlparse.c
|
|
|
|
|
|
|
|
|
|
%.o: %.c
|
2004-12-08 09:09:06 +00:00
|
|
|
gcc -g -std=c99 -O3 -Wall -pedantic -Wstrict-prototypes -fPIC -I. -I/usr/include/$(PYTHON) -c $< -o $@
|
2004-08-16 19:28:42 +00:00
|
|
|
|
2005-10-11 16:15:00 +00:00
|
|
|
sparse:
|
2005-11-03 16:53:26 +00:00
|
|
|
$(SPARSE) -D__STDC__ -I. -I/usr/include/$(PYTHON) -I/usr/lib/gcc/i486-linux-gnu/4.0.3/include s_util.h s_util.c htmlsax.h htmlparse.h htmlparse.c htmllex.c
|
2005-10-11 16:15:00 +00:00
|
|
|
|
2004-08-16 19:28:42 +00:00
|
|
|
htmlparse.h htmlparse.c: htmlparse.y htmlsax.h
|
|
|
|
|
bison htmlparse.y
|
|
|
|
|
|
|
|
|
|
htmllex.l: htmlparse.h
|
|
|
|
|
|
|
|
|
|
htmllex.c: htmllex.l htmlsax.h
|
|
|
|
|
$(FLEX) htmllex.l
|
2004-09-06 15:19:23 +00:00
|
|
|
awk -f fixincludes.awk htmllex.c > htmllex.c.fixed; mv -f htmllex.c.fixed htmllex.c
|
2004-08-16 19:28:42 +00:00
|
|
|
|
|
|
|
|
clean:
|
|
|
|
|
rm -f htmlparse.c htmlparse.h htmllex.c *.o *.so *.pyc *.pyo *.output
|
|
|
|
|
|
|
|
|
|
splint:
|
|
|
|
|
splint -initallelements +posixlib -I/usr/include/linux -I. -I/usr/include/$(PYTHON) htmllex.c | less
|