2003-03-16 14:21:21 +00:00
|
|
|
# use beta flex from http://lex.sf.net/ for reentrant
|
2002-11-23 23:09:11 +00:00
|
|
|
# bison parser support
|
2003-04-17 13:16:34 +00:00
|
|
|
FLEX=flex
|
2003-08-11 11:19:38 +00:00
|
|
|
PYTHON=python2.3
|
2002-11-23 23:09:11 +00:00
|
|
|
|
|
|
|
|
all: htmllex.c htmlparse.c
|
|
|
|
|
|
|
|
|
|
%.o: %.c
|
2003-02-02 10:59:13 +00:00
|
|
|
gcc -g -O -Wall -pedantic -Wstrict-prototypes -fPIC -I. -I/usr/include/$(PYTHON) -c $< -o $@
|
2002-11-23 23:09:11 +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
|
|
|
|
|
|
|
|
|
|
test: testsax
|
|
|
|
|
cat test.html | ./testsax
|
|
|
|
|
|
|
|
|
|
clean:
|
|
|
|
|
rm -f htmlparse.c htmlparse.h htmllex.c *.o *.output
|