-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fix build on WSL and remove Python #85
base: master
Are you sure you want to change the base?
Conversation
@@ -6,6 +6,20 @@ | |||
# except according to those terms. | |||
|
|||
local_dir := $(dir $(lastword $(MAKEFILE_LIST))) | |||
toolchain := $$CXX_FRC |
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 correct, or should be $(CXX_FRC)
?
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.
Sadly, thats correct. Makefiles have weird syntax and work with their own variable system.
If I were to try referencing an environment variable the regular way, it would start parsing and give up when it realizes there are no makefile variables that could fit. So if I had defined CXX2
before hand, it would give up half way through and delete the characters up to the point where it failed. The resulting line would become toolchain := _FRC
. A second $
acts as an escape character and allows it to be read like any other shell command. Thats also why I included two on line 20.
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.
Oh, right. I think the better way to deal with this would be to use ?=
.
Say, why do we even copy headers in the first place? The correct way to get clang to target non-host is to pass |
The previous version would attempt to fetch the required headers from every include folder, overwriting the previous results as it went and in my case, stumbling over broken symlinks in duplicate folders.
The python script would return all of the include folders (example result):
Since the python script just ran a command and trimmed the results, I moved the functionality to the makefile instead and was able to make it more verbose as a result.