Hi,
I'm wondering why the Makefiles of some suckless programs (and libs) have the
special target `.POSIX` in them and some don't.
For example, dwm doesn't have it in it's Makefile but there isn't a single
non-POSIX feature used. I think it would be better to include the `.POSIX`
target
simply to
I agree that it shall be added to all Makefile, because
“otherwise, the behavior of make is unspecified.”
(Quote from the POSIX specifications)
Probably missing because people don't usually learn
make(1) by reading the entire manual.
.POSIX can be used as long a the makefile does not
use any feat
>I agree that it shall be added to all Makefile, because
>otherwise the behavior of make is unspecified.
>(Quote from the POSIX specifications)
I'm sure you meant it like that, but just to clarify it:
It is only unspecified if it doesn't appear as the first non-comment line,
has prerequisites or co
On Thu, 30 Dec 2021 17:49:23 +0100
crae...@gmail.com wrote:
Dear craekz,
> As far as I can see, we could add `.POSIX` to the following programs:
> dwm, dmenu, dwmstatus, sent and tabbed
> I've just looked over the Makefiles very briefly, so I may have
> overseen something. Note: I just picked out
On Thu, 30 Dec 2021 21:07:06 +0100
Laslo Hunhold wrote:
> On Thu, 30 Dec 2021 17:49:23 +0100
> crae...@gmail.com wrote:
>
> Dear craekz,
>
> > As far as I can see, we could add `.POSIX` to the following programs:
> > dwm, dmenu, dwmstatus, sent and tabbed
> > I've just looked over the Makefiles
On Thu, 30 Dec 2021 21:17:32 +0100
Mattias Andrée wrote:
Dear Mattias,
> I've actually being thinking of writing a makefile linter.
> How interested would people be in such a tool?
very interested! Even though, when you implement the logic, you might
as well go all the way and offer a make(1) t
On Thu, 30 Dec 2021 23:07:35 +0100
Laslo Hunhold wrote:
> On Thu, 30 Dec 2021 21:17:32 +0100
> Mattias Andrée wrote:
>
> Dear Mattias,
>
> > I've actually being thinking of writing a makefile linter.
> > How interested would people be in such a tool?
>
> very interested! Even though, when y
On Thu, Dec 30, 2021 at 09:17:32PM +0100, Mattias Andrée wrote:
> I've actually being thinking of writing a makefile linter.
> How interested would people be in such a tool?
>
> The reason to have a linter separate from a make utility itself
> is that it would not have to reject non-standard featu
On Fri, Dec 31, 2021 at 12:49:46PM +0600, NRK wrote:
> What would be a posix replacement for `?=` ? I assume something like:
>
> VAR = $$(if test -n "$$VAR"; then printf "%s" "$$VAR"; else printf
> "fallback"; fi)
>
Now that I think about it, posix shell has parameter expansion that
could
On Fri, 31 Dec 2021 12:49:46 +0600
NRK wrote:
Dear NRK,
> Hmm, I was under the impression that `?=` was accepted into POSIX.
> But I cannot find any mention of it in the posix manpage (man 1p
> make) so I guess I was wrong.
>
> What would be a posix replacement for `?=` ? I assume something lik
I too fell victim to the GNU trap and thought "?=" was standard and
actually useful.
> and want to "dynamically" override it (e.g. in a build system context)
> when the environment already specifies PREFIX, you either do
>
>make -e
Completely forgot about the -e flag. Now I need to go update
On Fri, Dec 31, 2021 at 01:52:42AM -0800, Arthur Williams wrote:
> I too fell victim to the GNU trap and thought "?=" was standard and
> actually useful.
>
> > and want to "dynamically" override it (e.g. in a build system context)
> > when the environment already specifies PREFIX, you either do
>
On Fri, 31 Dec 2021 01:52:42 -0800
Arthur Williams wrote:
Dear Arthur,
> I too fell victim to the GNU trap and thought "?=" was standard and
> actually useful.
hehe this thread here feels like a self-help-thread of the newly
POSIX-make-awakened!
> Completely forgot about the -e flag. Now I nee
On Fri, 31 Dec 2021 11:16:18 +0100
Hiltjo Posthuma wrote:
Dear Hiltjo,
> In my opinion a practical way is to really test it on different
> systems (bleeding edge Linux, older Debian stable, NetBSD, OpenBSD)
> and GNU/Make, different BSD make programs.
>
> This doesn't cover the POSIX compatibil
On Fri, Dec 31, 2021 at 11:33:21AM +0100, Laslo Hunhold wrote:
> On Fri, 31 Dec 2021 11:16:18 +0100
> Hiltjo Posthuma wrote:
>
> Dear Hiltjo,
>
> > In my opinion a practical way is to really test it on different
> > systems (bleeding edge Linux, older Debian stable, NetBSD, OpenBSD)
> > and GNU/
> Yeah you make a strong argument. I too think a linting tool would be
> useful. I imagine it would function like shellcheck does for shells. If
> nothing else it would really help people identify GNU extensions vs
> portable behavior.
Something like shellcheck would be awesome! Given that the POSI
On Fri, 31 Dec 2021 12:53:59 +0100
crae...@gmail.com wrote:
> > Yeah you make a strong argument. I too think a linting tool would be
> > useful. I imagine it would function like shellcheck does for shells. If
> > nothing else it would really help people identify GNU extensions vs
> > portable beha
On 2021-12-30, NRK wrote:
> Hmm, I was under the impression that `?=` was accepted into POSIX. But I
> cannot find any mention of it in the posix manpage (man 1p make) so I
> guess I was wrong.
It is accepted for the upcoming POSIX issue 8:
https://austingroupbugs.net/view.php?id=330
I just started implementing a linter[0]. Even though I just
started it today, I think that's enough for this year.
Happy New Year!
Mattias Andrée
[0] https://github.com/maandree/makelint/
On Thu, 30 Dec 2021 21:17:32 +0100
Mattias Andrée wrote:
> On Thu, 30 Dec 2021 21:07:06 +0100
> Laslo Hun
On Fri, Dec 31, 2021 at 11:29:11PM +0100, Mattias Andrée wrote:
> I just started implementing a linter[0]. Even though I just
> started it today, I think that's enough for this year.
>
> Happy New Year!
> Mattias Andrée
>
> [0] https://github.com/maandree/makelint/
Thank you very much, I'll keep
Thanks for pointing that it, I didn't find it in my search.
I renamed it to mklint.
Regards,
Mattias Andrée
On Sat, 1 Jan 2022 14:43:15 +0600
NRK wrote:
> On Fri, Dec 31, 2021 at 11:29:11PM +0100, Mattias Andrée wrote:
> > I just started implementing a linter[0]. Even though I just
> > starte
On Sat, 1 Jan 2022 10:33:22 +0100
Mattias Andrée wrote:
Dear Mattias,
first off, happy new year to all of you!
> Thanks for pointing that it, I didn't find it in my search.
> I renamed it to mklint.
This is also confusing as mk(1) by plan9 exists, but you explicitly
target POSIX make(1).
make
> I'd definitely be interested in such a tool. Weather it be in form of
> a make implementation or linter doesn't matter a whole lot to me as
> long as the end goal of having a tool to help write portable makefile
> is achieved.
This is my take, too --- I'd get plenty of use out of either version,
On Sat, 1 Jan 2022 13:01:05 +0100
Laslo Hunhold wrote:
> On Sat, 1 Jan 2022 10:33:22 +0100
> Mattias Andrée wrote:
>
> Dear Mattias,
>
> first off, happy new year to all of you!
>
> > Thanks for pointing that it, I didn't find it in my search.
> > I renamed it to mklint.
>
> This is also c
On Sat, 1 Jan 2022 13:22:48 +0100
Mattias Andrée wrote:
Dear Mattias,
> libzahl is my only project with a German name, and it's was called
> libzahl because the bold Z used represent the integers stands for
> Zahl, but I do have projects with names in different languages (I
> also have libskrift
Hi Mattias,
Happy New Year!
> But I also like makel, but I will give it some more though before I
rename it a second time.
So... makellint? :D
I like it; it seems 'makel' is unused as a project name.
Are there any suggestions for handling out-of-source builds using
POSIX makefiles? I recently
On Sat, 1 Jan 2022 14:08:24 +0100
Ralph Eastwood wrote:
Dear Ralph,
> So... makellint? :D
> I like it; it seems 'makel' is unused as a project name.
and even if, it's not like names are reserved. When some 13-year-old
kid dumps some Rust-crap with a name on GitHub I wouldn't see it as
reserved.
Hi Laslo,
> and then in config.mk have a variable
>
>TARGET = arm
>
> and then in the Makefile have a line
>
>include target/$TARGET.mk
Thanks for pointing out that technique, I've utilised it in the past and
it's a shame that it's not more well-known... I've seen many a GNUism
in its pla
On Sat, 1 Jan 2022 17:03:41 +0100
Ralph Eastwood wrote:
Dear Ralph,
> Thanks for pointing out that technique, I've utilised it in the past
> and it's a shame that it's not more well-known... I've seen many a
> GNUism in its place...
yeah, it makes a lot of sense and is nice and simple.
> The i
.POSIX:
CC = c99
# Required as POSIX doesn't mandate that it is defined by default
OBJ =\
alpha.o\
beta.o\
gamma.o
LINUX_AMD64_OBJ = $(OBJ:.o=.linux-amd64-o)
OPENBSD_AMD64_OBJ = $(OBJ:.o=.openbsd-amd64-o)
all: myproj-linux-amd64 myproj-openbsd-amd64
myproj-linux-amd64:
Hi Laslo and Mattias,
On Sat, 1 Jan 2022 at 19:05, Laslo Hunhold wrote:
> If you think about it, a better approach in this case would be to pack
> these things into a static library (which is basically a collection of
> object files). So you would have a target
On Sat, 1 Jan 2022 at 20:10, Matti
On Sat, 1 Jan 2022 23:30:39 +0100
Ralph Eastwood wrote:
Dear Ralph,
> Those are both useful suggestions! Thank you!
you're very welcome! :)
With best regards
Laslo
On Sat, Jan 01, 2022 at 08:09:38PM +0100, Mattias Andrée wrote:
> .POSIX:
>
> CC = c99
> # Required as POSIX doesn't mandate that it is defined by default
>
> OBJ =\
> alpha.o\
> beta.o\
> gamma.o
>
> LINUX_AMD64_OBJ = $(OBJ:.o=.linux-amd64-o)
> OPENBSD_AMD64_OBJ = $(OBJ:.o=.openb
On Mon, 3 Jan 2022 11:16:48 +0100
Markus Wichmann wrote:
> On Sat, Jan 01, 2022 at 08:09:38PM +0100, Mattias Andrée wrote:
> > .POSIX:
> >
> > CC = c99
> > # Required as POSIX doesn't mandate that it is defined by default
> >
> > OBJ =\
> > alpha.o\
> > beta.o\
> > gamma.o
> >
> > LIN
El vie, 31 dic 2021 a la(s) 09:30, Laslo Hunhold (d...@frign.de) escribió:
>
> On Fri, 31 Dec 2021 12:49:46 +0600
> NRK wrote:
>
> Dear NRK,
>
> > Hmm, I was under the impression that `?=` was accepted into POSIX.
> > But I cannot find any mention of it in the posix manpage (man 1p
> > make) so I
35 matches
Mail list logo