Live data from Hacker News

Public domain POSIX make

frippery.org

31–40 of 41 posts

Re: Public domain POSIX make

#31
post #21
post #16

Earlier quoted context omitted.

That's not wrong. It's something that not everybody will like, but as long as the extensions don't conflict with anything specified by POSIX, that is permitted. To me, the decision to let POSIX mode turn off extensions that are so widely available in other implementations that they have been approved for the next version of POSIX is an odd one. There is little reason not to already use those features today: using the…

I agree that disabling will-be-posix extensions in POSIX mode sounds like an extreme idea, but seriously, such strictness is the main point of the pdpmake. It ensures that implementation conform to the current standard, not draft which may change quite often.

It turns out it's actually pdpmake-build-time-configurable. If you build with -DENABLE_FEATURE_MAKE_EXTENSIONS -DENABLE_FEATURE_MAKE_POSIX_202X, extensions are enabled by default, and .POSIX only flags non-POSIX-202x extensions. I don't know what, if anything, this says about the main point of pdpmake, but I'm glad with this mode.

Re: Public domain POSIX make

#32
post #30

That's pretty neat! But is there a link to the “future POSIX standard”? A few months ago I tried looking for it on https://pubs.opengroup.org/ , but couldn't.

To answer my own question, if this[1] StackExchange to be believed, you need to join the mailing list of something called “The Austin Group”. Although some fairly informative meeting minutes are available publicly here[2].

[1]: https://unix.stackexchange.com/q/607333/105635

[2]: https://www.opengroup.org/austin/docreg.html

Re: Public domain POSIX make

#33
post #32
post #30

That's pretty neat! But is there a link to the “future POSIX standard”? A few months ago I tried looking for it on https://pubs.opengroup.org/ , but couldn't.

To answer my own question, if this[1] StackExchange to be believed, you need to join the mailing list of something called “The Austin Group”. Although some fairly informative meeting minutes are available publicly here[2]. [1]: https://unix.stackexchange.com/q/607333/105635 [2]: https://www.opengroup.org/austin/docreg.html

And from the most recent minutes:

> Bug 805: Add Make conditionals Rejected

> https://austingroupbugs.net/view.php?id=805

> As the behavior described in the desired action hasn't actually been implemented, to our knowledge, and there is insufficient consensus amongst the variants that have been implemented to pick one as the de facto standard this request is being rejected. Should the industry come to a consensus a new bug reflecting that should be filed.

TL;DR: no way forward for adding if/else statements to make for now.

Re: Public domain POSIX make

#34
post #32

Earlier quoted context omitted.

To answer my own question, if this[1] StackExchange to be believed, you need to join the mailing list of something called “The Austin Group”. Although some fairly informative meeting minutes are available publicly here[2]. [1]: https://unix.stackexchange.com/q/607333/105635 [2]: https://www.opengroup.org/austin/docreg.html

And from the most recent minutes: > Bug 805: Add Make conditionals Rejected > https://austingroupbugs.net/view.php?id=805 > As the behavior described in the desired action hasn't actually been implemented, to our knowledge, and there is insufficient consensus amongst the variants that have been implemented to pick one as the de facto standard this request is being rejected. Should the industry come to a consensus a n…

To be fair, if you need conditionals in target bodies, you're probably better off putting the body into a separate file as a shell script. And if you need conditionals in macros, there's the old macro-in-macro approach:

  DEBUG = 0
  DEBUG_FLAG_0 =
  DEBUG_FLAG_1 = --debug

  # …

  main.bin: 1.o 2.o # …
          build $(DEBUG_FLAG_$(DEBUG)) -o main.bin # …
I'm not saying that it's a good way, but it is a way.

Re: Public domain POSIX make

#35
post #17

Earlier quoted context omitted.

Yeah I'm left scratching my head at the purpose of this project. I wrote 3 GNU makefiles from scratch (a few hundred lines each) starting in ~2016 for https://www.oilshell.org/ , and regret it. I switched to Python + Ninja, and I should have just used that all along. So I think GNU make is already pretty old and regretted, and POSIX make even more so. CMake + Ninja seems be pretty common these days, but for my projec…

How do you do parallel builds with a shell script?

Right now I don't, because the project takes ~30 seconds to build serially... There are a few options:

1. Put the Ninja support in the tarball (which is trivial, but I guess I was paranoid about the extra dependency for a low level tool like shell). I think Ninja is supported everywhere now, including on Windows and BSDs. It's easier to build that GNU make itself, etc.

2. The last time I looked, the toybox project had some sort of "parallel job server" type thing in shell, to avoid GNU make.

3. Maybe do something simpler with "xargs -P" (non POSIX)

I'd probably go for the first option just because it's the least custom code to solve this particular problem. If the build was slower, it might be different ... although if speed is really an issue, then Ninja is the best option out of all of these, AND GNU make!

----

edit: I should also note that in practice I think many users and especially distros do NOT pass -j $N to GNU make because it's not reliable. If upstream didn't test with it, there can be bugs that result in incorrect builds. So distros often just use serial builds.

On the other hand, paralllel builds with Ninja are the default, so upstream will have tested in that mode.

Re: Public domain POSIX make

#36
post #20
post #19

Earlier quoted context omitted.

Thank you! I was not aware of ibara’s port of OpenBSD’s m4, so now I can drop my own ugly 15-minute hack. Is there a good source for finding strict POSIX tools rather than just go digging? Sad sidenote on m4, that even with strict POSIX [1], you still have no clue if `define` will turn into “” or “define” due to a split between AT&T on one hand and GNU and BSD (all of them?) on the other that POSIX did not rule one w…

> Is there a good source for finding strict POSIX tools rather than just go digging? Some communities(iglunix, kisslinux, carbs linux, wyvertux, oasis linux, ...) are actively researching alternatives to the "standard" coreutils. You could check what they use, perhaps you'll find something interesting and strict. But general source is digging of course :) > But I guess this can be expected when you are dealing with a…

I didn't know about these projects; GNU-less Linux is something I've wanted for a long time. Thanks. Are there any other projects you know of (as indicated by your ellipsis)?

Re: Public domain POSIX make

#37
post #19

Earlier quoted context omitted.

Thank you! I was not aware of ibara’s port of OpenBSD’s m4, so now I can drop my own ugly 15-minute hack. Is there a good source for finding strict POSIX tools rather than just go digging? Sad sidenote on m4, that even with strict POSIX [1], you still have no clue if `define` will turn into “” or “define” due to a split between AT&T on one hand and GNU and BSD (all of them?) on the other that POSIX did not rule one w…

Solaris had all the POSIX userland tools separated from the Sun mainline versions in the /usr/xpg4 and xpg6 directories. They can be a source for replacements.

Do those work on anything that isn't Solaris/Illumos?

Re: Public domain POSIX make

#38
post #2

>This version is also dedicated to the public domain IANAL but under US copyright law this is a meaningless statement as it's not possible to disclaim ownership. You can only permissively license - though reading the LICENSE file, this is what they are doing in practice.

I thought that was a problem for other countries? In the US I’m pretty sure dedicating something to the public domain actually places it there.

Nope. I think people are misunderstanding the difference between courts interpreting "putting something in the public domain" as a permissive license and actually severing the copyright from your legal person. There's no current provision for severing those rights under the current law so it may be possible for them (or their heirs) to claw a work back from the public domain using copyright termination/relicensing provisions of the law [1].

The way copyright termination works is a big risk to opensource either way because in theory any open source license could be revoked after enough decades.

[1] https://www.techdirt.com/2015/01/23/why-we-still-cant-really...

Re: Public domain POSIX make

#39
post #13

Genuine question: what's wrong with GNU make?

Mostly nothing, but writing a makefile and only evaluating against it makes it difficult to guarantee that you will see the same behaviour on a non-GNU system (which has become more relevant these days as even systems based on the Linux kernel are no longer guaranteed to run a GNU userland). What makes matters worse is that even if you grab a BSD make implementation (there are several ), there are no guarantees there…

> but writing a makefile and only evaluating against it makes it difficult to guarantee that you will see the same behaviour on a non-GNU system

This would only be true if the entirety of thr GNU suite were necessary for GNU make to work. But it's not, so I always find this kind of argument really weird.

I mean it's not necessarily completely irrelevant criticism, but I somehow only see this level of criticism aimed at GNU tools.

I haven't seen many "you know let's make a variant of ninja because the current one is too ideological let's find another one that's still ninja but has slight differences that we 'all' agree are more basic or standardised somehow".

Re: Public domain POSIX make

#40
post #13

Earlier quoted context omitted.

Mostly nothing, but writing a makefile and only evaluating against it makes it difficult to guarantee that you will see the same behaviour on a non-GNU system (which has become more relevant these days as even systems based on the Linux kernel are no longer guaranteed to run a GNU userland). What makes matters worse is that even if you grab a BSD make implementation (there are several ), there are no guarantees there…

> but writing a makefile and only evaluating against it makes it difficult to guarantee that you will see the same behaviour on a non-GNU system This would only be true if the entirety of thr GNU suite were necessary for GNU make to work. But it's not, so I always find this kind of argument really weird. I mean it's not necessarily completely irrelevant criticism, but I somehow only see this level of criticism aimed…

You are being overly defensive here. What I wrote had nothing to do with GNU in particular, as I hope I made clear in the very next sentence after the one you cited by stating that the same is true for BSD make implementations and portability. The parent asked about GNU make, thus I logically kept on talking about GNU make.
Post reply on HN