-
Notifications
You must be signed in to change notification settings - Fork 42
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
Support a custom includes path #25
Conversation
@tj any thoughts on this? I have a project waiting on this feature for its build pipeline. |
hmm not something I need personally. I'm not a huge fan of replacing pkg-level globals from an API, but I think otherwise looks decent to me! I kinda feel like using |
Thank you for the feedback! I'm trying to use |
resolver/resolver.go
Outdated
// GetIncludePath allows the include path to be overridden. | ||
func GetIncludePath(args []string) string { | ||
// always reset the global IncludePath to the default | ||
IncludePath = DefaultIncludePath |
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.
is this line necessary if it's defaulted above?
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.
That's a good question. I know I had a reason for doing it this way, but that reason escapes me at this moment. I'll have to take a closer look at the whole diff when I get back to a computer.
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.
I think I added this line so the test results would be consistent. Without it, the expected outcome for later tests would not match. This being the case, I'll just reset IncludePath
in the test instead.
SGTM! just one question about the one line but otherwise I'll merge! |
@tj this should be good to go now. Thanks! |
@tj any other objections? |
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.
Per #34, I'm merging approved features to tidy up PR/issues.
Looks good @codekoala, thank you for the feature.
I'm considering submitting a PR later that makes this functionality available via an env variable MMAKE_INCLUDE
. I know for my own environment I like to isolate where things are installed.... so default would stay the same but if MMAKE_INCLUDE
is set then I could setup ~/.config/mmake/include
as the storage location.
(Looks like my conflict resolution in GH interface failed on CI. Will pull down and re-do).
Squashing and merging this and pushing a follow on commit to fix test reporting that changed. Thanks @codekoala! |
Thank you for merging!!!
…On Sat, Sep 21, 2019, 16:23 Zander Hill ***@***.***> wrote:
Squashing and merging this and pushing a follow on commit to fix test
reporting that changed. Thanks @codekoala <https://github.com/codekoala>!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#25?email_source=notifications&email_token=AAAL4OQ4QAKJC6OAW2ZK4LTQKZ7EFA5CNFSM4ED2BXX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7IZAZY#issuecomment-533827687>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAL4OS5DWKODXT6HEOOYOTQKZ7EFANCNFSM4ED2BXXQ>
.
|
👍 💃 |
This adds support for a custom includes path. This helps when you do not have permission to modify
/usr/local/include
, for example.It relies on the standard
-I
flag, so something likemake -I /tmp/custom/path
andmake -I/var/lib/whatever
work.