Ticket #2310 (closed defect: fixed)

Opened 6 years ago

Last modified 3 years ago

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

Changed 5 years ago by dmorissette

  • 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.

Changed 5 years ago by dmorissette

  • milestone changed from 5.2 release to 5.4 release

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

Changed 4 years ago by warmerdam

  • status changed from new to assigned
  • milestone changed from 5.6 release to 6.0 release

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.

Changed 3 years ago by warmerdam

  • keywords maplexer added
  • status changed from assigned to closed
  • resolution set to fixed

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.