Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate parser.c in Makefile when grammar changes #231

Merged
merged 1 commit into from
Sep 11, 2022

Conversation

alex-pinkus
Copy link
Owner

Currently, a non-clean build after updating grammar.js will not pick up any new changes. This happens because as far as the makefile is concerned, parser.c is a source file, and it has not been updated.

To fix this, we simply add a rule that can generate parser.c. If someone runs make install after npm install, this rule will do nothing, because the output file will already be newer. However, if someone updates the repo, this will ensure all artifacts get updated.

Fixes #229

Currently, a non-clean build after updating `grammar.js` will not pick
up any new changes. This happens because as far as the makefile is
concerned, `parser.c` is a source file, and it has not been updated.

To fix this, we simply add a rule that can generate `parser.c`. If
someone runs `make install` after `npm install`, this rule will do
nothing, because the output file will already be newer. However, if
someone updates the repo, this will ensure all artifacts get updated.

Fixes #229
@alex-pinkus alex-pinkus merged commit d256a6d into main Sep 11, 2022
@alex-pinkus alex-pinkus deleted the regenerate-parser-c-in-makefile branch September 11, 2022 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make install builds an inconsistent dylib when grammar.js changes
1 participant