Support building with --disable-maintainer-mode and source != build dir#3518
Merged
itchyny merged 1 commit intojqlang:masterfrom Apr 8, 2026
Merged
Support building with --disable-maintainer-mode and source != build dir#3518itchyny merged 1 commit intojqlang:masterfrom
itchyny merged 1 commit intojqlang:masterfrom
Conversation
If --disable-maintainer-mode is enabled, then the rules for generating parser.[ch] and lexer.[ch] did nothing. This worked fine if the source and build directories are the same as the pre-generated parser.c and lexer.c files would suffice. However, if the build directory is not the same as the source directory, then the rest of the Make rules expect parser.[ch] and lexer.[ch] to have been created in the build directory if their source files (parser.y and lexer.l) are newer than the target files, which can happen in case the source is fetched using Git. Avoid the problem by copying the files to the build directory if needed.
Contributor
|
This PR introduces GNU make extensions in our Makefile.am for the first time. |
Contributor
Author
According to https://pubs.opengroup.org/onlinepubs/009695399/utilities/make.html, the use of variables such as So unless you are referring to something other than those automatic variables, I believe this should be ok. |
Contributor
|
Ah, sorry. I was wrong. |
Contributor
|
This fixes #3371, right? |
Contributor
Author
Yes, it appears that it does. :) |
Contributor
|
Thank you. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If --disable-maintainer-mode is enabled, then the rules for generating parser.[ch] and lexer.[ch] did nothing. This worked fine if the source and build directories are the same as the pre-generated parser.c and lexer.c files would suffice. However, if the build directory is not the same as the source directory, then the rest of the Make rules expect parser.[ch] and lexer.[ch] to have been created in the build directory if their source files (parser.y and lexer.l) are newer than the target files, which can happen in case the source is fetched using Git.
Avoid the problem by copying the files to the build directory if needed.