-
Notifications
You must be signed in to change notification settings - Fork 21
Add meson.build script #59
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
base: master
Are you sure you want to change the base?
Conversation
I think using a Makefile would be a better idea because |
I'm not sure the difference between meson and make is really valuable here in terms of portability. But the Makefile PR doesn't support tests, nor does it respect |
+1 for using meson, by now it's available on about every platform since many popular packages require it. It's also a fair bit more maintainable IMHO. |
You claim that it's more portable but I count 3 distinctive errors in your Makefile that make it not even work on the most boring and common platform of all -- Debian Linux amd64. The meson.build solves all 3 errors (two of them intrinsically by meson itself, and one of them by the specific implementation of |
I mean to say that |
I will fix this. Thanks! |
I don't think it's worth investing time and energy into a sinking ship. Make isn't a build system, it's a low-level dependency graph actualizer. I've seen thousands of people claim that "it's so simple to write a simple POSIX makefile" and I can count on the fingers of one hand, the number of people who were able to do it correctly. Using a real build system such as autotools or meson allows you to avoid making those mistakes in the first place. I hate to say it but the existing criticism to which you replied
is nickle-and-diming. The fact that you didn't even get the first and most fundamental part of writing a "simple Makefile" correct doesn't fill me with confidence that you're approaching this from the correct attitude of writing a build system, and I don't want to spend all my time explaining repeatedly why things are important and "it's not that simple" when you end up using Makefiles as a dependency graph actualizer loosely untethered to things such as standards. Maintaining a raw Makefile requires actually understanding these nuances. Contributing one, even if it was correct in the first place, doesn't mean it will be maintained properly in the future (raw Makefiles rarely are) and especially doesn't mean other people will maintain it correctly. If you're adamant that what the world really needs is more build systems that run on SCO OpenServer, IRIX, SunOS (pre Solaris), and Tru64 with "just POSIX utilities and Make" then please, do everyone a favor and utilize autotools. If you just want it to run on Alpine Linux without having to apk add any additional packages then please understand that this motivation is entirely backwards. ... Even if I assumed the Makefile was actually correct, it's actually undesirably painful by sheer virtue of it being a Makefile. Linux distros can automatically package any software that utilizes a script called |
Thank you for the informative comment and bestowing me with your knowledge of build systems! I think using this PR would be a better approach. I hadn't understood the purpose of autotools until you mentioned it. I will take this as an opportunity learn more about how to use it in projects. |
b72a949
to
3a6516b
Compare
@Cogitri Hello, are there plans to merge this PR? |
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 my god, I forgot to actually submit the review comments I made 7 months ago, sorry! Please take a look at them now that I actually published them :)
@@ -1,9 +1,9 @@ | |||
#!/usr/bin/env bash | |||
#!@WGETPASTE_SHEBANG@ |
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'm probably just ignorant, but do we really have to make the shebang configurable? Isn't /usr/bin/env
supposed to be universal?
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'm probably just ignorant, but do we really have to make the shebang configurable? Isn't /usr/bin/env supposed to be universal?
The configuration is optional. If the builder does not set WGETPASTE_SHEBANG
it defaults to /usr/bin/env bash
.
/usr/bin/env
does depend on the environment variable PATH being correctly set to find bash. Generally this isn't a problem, but on the few occasions it is, this option allows a downstream builder to hard code the correct path for bash.
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.
If a bash script happens to use features of Bash 4.x then using /usr/bin/env bash
is unreliable and will break on systems such as macOS where you must guarantee that the "correct, new enough* version of bash is utilized regardless of how the user configures $PATH
.
0fed49a
to
45ef476
Compare
Closes: issue zlin#58 Signed-off-by: Nicholas Vinson <[email protected]>
Closes: issue #58