build(clean): ignore and remove generated MySQL parser artifacts

Context:
- Bison/Flex-generated parser files in `lib/` can be created locally during parser work.
- These files are generated artifacts and should not be tracked.

Changes:
- Add generated parser artifacts to `.gitignore`:
  - `lib/MySQL_Lexer.yy.c`
  - `lib/MySQL_Parser.output`
  - `lib/MySQL_Parser.tab.c`
  - `lib/MySQL_Parser.tab.h`
- Extend `lib/Makefile` `clean` target to remove the same generated files.

Why:
- Prevent accidental inclusion of regenerated parser outputs in feature commits.
- Keep worktrees clean and make `make clean` deterministic for parser-related changes.
pull/5391/head
Rene Cannao 2 months ago
parent 1edf1f8e86
commit 20d6282a60

6
.gitignore vendored

@ -177,6 +177,12 @@ test/tap/tests/test_cluster_sync_config/test_cluster_sync.cnf
.aider*
GEMINI.md
# generated MySQL parser artifacts
lib/MySQL_Lexer.yy.c
lib/MySQL_Parser.output
lib/MySQL_Parser.tab.c
lib/MySQL_Parser.tab.h
# Database discovery output files
discovery_*.md
database_discovery_report.md

@ -121,7 +121,8 @@ $(ODIR):
clean:
rm -rf *.pid $(ODIR)/*.oo $(ODIR)/*.o $(ODIR)/*.gcno $(ODIR)/*.gcda *.ko *.so *~ core libproxysql.a $(ODIR)
rm -rf *.pid $(ODIR)/*.oo $(ODIR)/*.o $(ODIR)/*.gcno $(ODIR)/*.gcda *.ko *.so *~ core libproxysql.a $(ODIR) \
MySQL_Lexer.yy.c MySQL_Parser.output MySQL_Parser.tab.c MySQL_Parser.tab.h
## self note

Loading…
Cancel
Save