[postgis-commits] svn - r2820 - in trunk: . liblwgeom
postgis-commits at postgis.refractions.net
postgis-commits at postgis.refractions.net
Thu Jul 3 02:28:39 PDT 2008
Author: mcayland
Date: 2008-07-03 02:28:38 -0700 (Thu, 03 Jul 2008)
New Revision: 2820
Modified:
trunk/configure.ac
trunk/liblwgeom/Makefile.in
Log:
Add the parser build rules back into the liblwgeom Makefile, so now any changes to either the lexer or parser source files will automatically invoke a rebuild of the relevant output files during make
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2008-07-01 14:15:33 UTC (rev 2819)
+++ trunk/configure.ac 2008-07-03 09:28:38 UTC (rev 2820)
@@ -47,6 +47,16 @@
dnl
+dnl Search for flex/bison to build the parser
+dnl
+
+AC_PROG_LEX
+AC_PROG_YACC
+AC_SUBST([LEX])
+AC_SUBST([YACC])
+
+
+dnl
dnl Search for xsltproc which is required for building documentation
dnl
Modified: trunk/liblwgeom/Makefile.in
===================================================================
--- trunk/liblwgeom/Makefile.in 2008-07-01 14:15:33 UTC (rev 2819)
+++ trunk/liblwgeom/Makefile.in 2008-07-03 09:28:38 UTC (rev 2820)
@@ -13,6 +13,9 @@
CC=@CC@
CFLAGS=@CFLAGS@ @PICFLAGS@ @WARNFLAGS@
+YACC=@YACC@
+LEX=@LEX@
+
# Standalone LWGEOM objects
SA_OBJS=measures.o \
box2d.o \
@@ -48,4 +51,13 @@
# Command to build each of the .o files
$(SA_OBJS): %.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
+
+# Commands to generate the lexer and parser from input files
+wktparse.tab.c: wktparse.y
+ $(YACC) -vd -p lwg_parse_yy wktparse.y
+ mv -f y.tab.c wktparse.tab.c
+ mv -f y.tab.h wktparse.tab.h
+lex.yy.c: wktparse.lex wktparse.tab.c
+ $(LEX) -Plwg_parse_yy -i -f -o 'lex.yy.c' wktparse.lex
+
More information about the postgis-commits
mailing list