-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Change Linux Makefile to match the Windows and Mac ones #5973
Conversation
You need a double space between "VERSION" and "*", |
Thanks, you are of course right:
Fixed. Seems my Copy/Paste went wrong earlier somehow, probably for the same reason as you couldn't show a double space in your comment ;-) |
958e2b7
to
ee04566
Compare
Makefile
Outdated
@@ -20,7 +20,7 @@ | |||
CPUS := $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1) | |||
|
|||
PREFIX = "/usr/local" | |||
VERSION = `cmake -P config.cmake | grep -oP "VERSION\s+\K.*"` | |||
VERSION = `cmake -P config.cmake | sed -n -e "s/^.*VERSION *//p"` |
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.
Doesn't matter too much here, but generally it's better to use :=
than =
for assignment and $(shell <cmd>)
rather than backticks. See https://stackoverflow.com/a/1435867
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 like that much better. Works with GNU make only though. Not sure we can take that for granted everywhere?
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.
It's already used to set CPUS
a few lines above and nobody has complained yet.
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.
Sure, for Linux (and I guess *BSD too). For Windows/MinGW most probably too, not so sure about Mac though?
Well, just let's do it ;-)
follow up for PR musescore#5928 and just for consistency. Also improve the syntax for all 3.
follow up for PR #5928 and just for consistency