-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
Implement INCLUDE_ONCE
directive
#1481
Conversation
Thank you for this contribution! However, it's somewhat premature; a feature-request issue is already open, and the blocker is "getting community confirmation that this is worth adding", not "being able to implement it technically". |
INCLUDE_ONCE
directive
I pushed to this myself to update the man page wording/formatting a bit. Edit: And to fix the failing test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your work on this! Looks good to me, if we choose to add this feature. Pending @ISSOtm's approval as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about a.asm
includes d/b.inc
then b.inc
, with -I d
?
Furthermore, what about |
|
This reverts commit 5f07095.
Fixes #1478.
This behaves like regular
include
the first time a file is included, except the name of the file is added to a list. The next time usingINCLUDE_ONCE
on that file, the file will not be included.INCLUDE_ONCE
does not take symlinks into account. The string that is registered, is the one entered into the directive.This is effectively an include guard, not unlike C/C++
#PRAGMA ONCE
.