Opened 17 years ago

Closed 14 years ago

#2310 closed defect (fixed)

maplexer.c often corrupted by svn updates

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone: 6.0 release
Component: Build Problems Version: svn-trunk (development)
Severity: normal Keywords: maplexer
Cc: sdlime, dmorissette

Description

I propose to alter the makefile so that running flex and bison does not occur by default as touched on in this exchange:

Normand Savard wrote:
>
> maplexer.o
> maplexer.l:46: error: syntax error before '<<' token
> maplexer.l: In function `msyylex':
> maplexer.l:111: error: syntax error before '<<' token

This is an annoying side-effect of the current build setup and of the fact that we store the generated maplexer.* and mapparser.* files in SVN. You'll get this once in a while because a previous build has regenerated maplexer.c and mapparser.c locally, and then a svn update tries to merge changes from the repository and you end up with a conflict.

The fix is to remove maplexer.c, mapparser.c and mapparser.h, svn update, and restart your build.

Daniel

....
Frank Warmerdam wrote:
>
> It is my humble opinion that we should remove this rule from the Makefile:
>
> maplexer.c: maplexer.l
>     $(LEX) --nounistd -Pmsyy -i -omaplexer.c maplexer.l
>
> And instead just make a virtual target.  Something like:
>
> lexer:
>     $(LEX) --nounistd -Pmsyy -i -omaplexer.c maplexer.l
>
> This will mean those changing the lexer need to actually manually do
> "make lexer" but it avoids the problem we are seeing.  In particular I
> hate the current situation which can easily bugger up my automated builds. 

Change History (4)

comment:1 by dmorissette, 16 years ago

Cc: dmorissette added

If we remove the default rule then I'd suggest that we add a very visible comment at the top of maplexer.l reminding developers that they need to run 'make lexer' after modifying this file for their changes to take effect.

comment:2 by dmorissette, 16 years ago

Milestone: 5.2 release5.4 release

Too late for 5.2. Shoudl we still consider this for 5.4?

comment:3 by warmerdam, 15 years ago

Milestone: 5.6 release6.0 release
Status: newassigned

There is no pressing rush for this ticket. I'd like to have done it for 5.6, but it would have been better applied before beta1.

comment:4 by warmerdam, 14 years ago

Keywords: maplexer added
Resolution: fixed
Status: assignedclosed

I have made the planned changes in trunk (r10064), including the comment in maplexer.l and also added a note to be reported by make if maplexer.c appears to be out of date relative to maplexer.l.

Note: See TracTickets for help on using tickets.