Commit Graph

2 Commits

Author SHA1 Message Date
John Beard 5e705347bb Libeval: Use add_custom_target so grammar.c won't be cleaned
If you use add_custom_command to generate the grammar file,
it can be removed by "make clean". This then means the user will
need to get it back from Git, or regenerate it with Lemon.

Changing to add_custom_command removes the output file
from the clean list. The incantation to rebuild the grammar
remains the same: "make libeval_grammar", and it is still not
required to have lemon installed for a normal build.

Fixes: lp:1809610
* https://bugs.launchpad.net/kicad/+bug/1809610
2019-01-05 07:44:06 -08:00
John Beard f30f5b3249 Build: Add a CMake target libeval lemon grammar
The libeval grammar can now be rebuilt with "make libeval_grammar".
This is only possible when lemon is installed.

Also a couple of modifications to the lemon grammar to
account for external changes since the grammer was last generated.

Also move the grammar defines into grammar.h - this is how
Lemon produces them, and by manually copying into the target .cpp,
it make automated regeneration impossible.
2018-12-03 08:39:27 +01:00