3 ms·
> It works perfectly fine with things other than space. Cool, sounds like a really robust idea. Let's try some dollars or semicolons, then. I'm sure the next s
by jstimpfle 9y ago
> It works perfectly fine with things other than space.
Cool, sounds like a really robust idea. Let's try some dollars or semicolons, then. I'm sure the next shell will be happy. (I don't even think that this is Make's biggest weakness. I can usually get along with that, as long as I get to choose the filenames and don't need any fancy strings otherwise. It's just a testament to what a poor programming model macros are).
> Text files aren't really any more fragile than any other way to tranfer the state
It's not about plain text files for transferring "state" (e.g. a list of fixed strings), which work fine for many cases and do have considerable advantages. This is about combining a cryptic shell language with a lousy build system macro syntax and semantics.
> This is why the GNU Make has a fantastic manual, I suggest you check it out: https://gnu.org/s/make/manual https://gnu.org/s/make/manual
As I wrote many times, I do actually know Make and have read much of the manual. Can't you believe me?
> It still gives you a standard interface that packagers and users would expect for build software
Believe me, packagers are indeed able to run a python script as opposed to only a make script. (Yes, if my intent was to have a software packaged by independent maintainers, I should add a "clean" routine as well. And offer some knobs for compiler flags - but this is already veering into fragile land, since the developer can't know what unexpected compiler options package maintainers will come up with).
> What integration do you want that you had in your silly hand written one?
Now I can't parse this sentence, but I sense that it's not a polite one.
> You can either construct a macro to do this or you can just give the data space delimited to python and change the spaces to commas there.
Oh, come on. I do not want to put in so much work (it's not a one-time thing - you have to do that every time you transfer a list) for such a poor, fragile result.
> Surely you know how to do it with python so why are you insisting on doing it with make?
I do not want to mess with Make at all. This should not be news.
> You also require your own library.
You can easily replace that with csv or json (both will be more robust than Make), or just put the data as literals into the python script, as I stated. My script is not intended as a finished thing for other people to use. This should not be news, either.
- lolikoisuru 9y ago>This is about combining a cryptic shell language with a lousy build system macro syntax and semantics. Get over the shell part. You don't have to use Unix shells. >As I wrote many times, I do actually know Make and have read much of the manual. Can't you believe me? If you think the macro names are somhow cryptic, no I can't believe you. There are only a few of them to remember. >Now I can't parse this sentence, but I sense that it's not a polite one. You were complaining that languages other than sh integrate with Make worse than sh does. What integration do you need. The integration with sh is pretty much limited to some predefined macros such as $(CP) and $(RM). >Oh, come on. I do not want to put in so much work (it's not a one-time thing - you have to do that every time you transfer a list) for such a poor, fragile result. Then define a function to do it. Surely you know how to do that as a mighty python programmer, right? >I do not want to mess with Make at all. This should not be news. Your complaints about make make it seem like you think that when using make you have to do everything with it and shell. If you don't want to mess with make then mess with python.
- jstimpfle 9y ago> Get over the shell part. You don't have to use Unix shells. I HAVE HEARD YOU. You've said that countless times. It doesn't change anything. There's the fundamental problem that the shell statement is a single string. You combine strings with Make to form a single string (it's a form of templating, recognizing some custom sequences), and then rely on a shell on the other end to parse it to the correct list/structure of tokens. The same fragile approach has lead to many, many SQL injection vulnerabilities (or simply fragilities) in the past. It's fundamentally not a solid approach. And there is no way to fix that. There's a reason I haven't seen a usage of a Makefile using a different shell than sh in the wild. sh is the one language whose super minimal syntax plays best with that cheap sort of templating. It works typically, but it's a fragile construction that is relying on suitable inputs. > If you think the macro names are somhow cryptic, no I can't believe you. There are only a few of them to remember. It's not about the few named built-in functions. It's about the weird macro expansion model that does not even have a solid list data structure, and about the many cryptic non-identifier shorthands. And about the total lack of the slightest support for creating solid building blocks. A list structure and a way to define functions and I would be almost happy. But it's not there, and I'm not going to mess with this: https://www.gnu.org/software/make/manual/make.html#Call-Function https://www.gnu.org/software/make/manual/make.html#Call-Func... . And it's not even portable. > The integration By integration I meant the interplay that you get by overlaying two syntaxes (that of the shell, whatever it may be, and that of Make splicing things in). Mixing syntaxes has been a bad idea in the past, and always will be. > Then define a function to do it. Surely you know how to do that as a mighty python programmer, right? So I'm supposed to define the function with each invocation? Or define a special shell that pre-defines the function? And even then each line will look something like do_your_thing_with(splitfiles("""$(MYMAKEMACRO)""")) And it will still be fragile. I simply don't think this is a good idea. > Your complaints about make make it seem like you think that when using make you have to do everything with it and shell. If you don't want to mess with make then mess with python. No, for the last time. I get what you say (I'm not dumb) and I don't think it's a good idea. At all. If you want to continue tinkering with macros, let's simply agree to disagree. Ok?
- lolikoisuru 9y ago