~bitfehler/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH] Make Makefile POSIX-compliant

Details
Message ID
<20220928150159.12016-1-txgk@bk.ru>
DKIM signature
missing
Download raw message
Patch: +9 -8
This makes Makefile POSIX-compliant by getting rid of non-standard
operators. When there's a need for an user to build project with
values from environment variables, they can pass -e flag to make.
---
 Makefile | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index d4a9da4..1636f09 100644
--- a/Makefile
+++ b/Makefile
@@ -1,12 +1,13 @@
.POSIX:
VERSION=1.0.0
CFLAGS?=-g
MAINFLAGS:=-DVERSION='"$(VERSION)"' -Wall -Wextra -Werror -Wno-unused-parameter
LDFLAGS+=-static
INCLUDE+=-Iinclude
PREFIX?=/usr/local
BINDIR?=$(PREFIX)/bin
MANDIR?=$(PREFIX)/share/man
PCDIR?=$(PREFIX)/share/pkgconfig
CFLAGS=-g
MAINFLAGS=-DVERSION='"$(VERSION)"' -Wall -Wextra -Werror -Wno-unused-parameter
LDFLAGS=-static
INCLUDE=-Iinclude
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man
PCDIR=$(PREFIX)/share/pkgconfig
OUTDIR=.build
.DEFAULT_GOAL=all

-- 
2.37.3
Details
Message ID
<40f066ef-7a56-baa8-8807-49d3e3a27a2f@bitfehler.net>
In-Reply-To
<20220928150159.12016-1-txgk@bk.ru> (view parent)
DKIM signature
missing
Download raw message
On 9/28/22 17:01, Grigory Kirillov wrote:
> This makes Makefile POSIX-compliant by getting rid of non-standard
> operators. When there's a need for an user to build project with
> values from environment variables, they can pass -e flag to make.

I am in fact not entirely sure that this is desirable. I'd be curious: 
what make are you using that you'd need this? I am pretty sure there is 
very little software out there that you could actually build with pure 
POSIX make?

Conrad
Details
Message ID
<YzWPwORexThJ6A+d@haier.my.domain>
In-Reply-To
<40f066ef-7a56-baa8-8807-49d3e3a27a2f@bitfehler.net> (view parent)
DKIM signature
missing
Download raw message
On Thu, Sep 29, 2022 at 12:01:16PM +0200, Conrad Hoffmann wrote:
> On 9/28/22 17:01, Grigory Kirillov wrote:
> > This makes Makefile POSIX-compliant by getting rid of non-standard
> > operators. When there's a need for an user to build project with
> > values from environment variables, they can pass -e flag to make.
> 
> I am in fact not entirely sure that this is desirable. I'd be curious: what
> make are you using that you'd need this? I am pretty sure there is very
> little software out there that you could actually build with pure POSIX
> make?
> 
> Conrad

I don't think this is the only true way to organize a Makefile,
I just thought it worth mentioning that the Makefile used in scd2html
is fairly easy to make POSIX-compliant (as far as I know, in some BSDs'
environments they prefer to use built-in make, which doesn't support
some GNU extensions; however, in most cases GNU make is available). It
was also a good opportunity for me to try email-based patch workflow :^)
Feel free to ignore this proposal
Reply to thread Export thread (mbox)