Build backend/parser/scan.l and interfaces/ecpg/preproc/pgc.l standalone.
Now that we know about the %top{} trick, we can revert to building flex
lexers as separate .o files. This is worth doing for a couple of reasons
besides sheer cleanliness. We can narrow the scope of the -Wno-error flag
that's forced on scan.c. Also, since these grammar and lexer files are
so large, splitting them into separate build targets should have some
advantages in build speed, particularly in parallel or ccache'd builds.
We have quite a few other .l files that could be changed likewise, but the
above arguments don't apply to them, so the benefit of fixing them seems
pretty minimal. Leave the rest for some other day.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/72b1e3a21f0540ffa5c1f8f474b6c52097a368bb
Modified Files
--------------
src/backend/parser/Makefile | 9 +++------
src/backend/parser/gram.y | 10 ----------
src/backend/parser/scan.l | 9 +++++----
src/interfaces/ecpg/preproc/Makefile | 7 ++-----
src/interfaces/ecpg/preproc/ecpg.trailer | 8 --------
src/interfaces/ecpg/preproc/pgc.l | 14 +++++++++++++-
6 files changed, 23 insertions(+), 34 deletions(-)