tChange variables in Makfile for POSIX-compliance - wmutils - X windows manipulation utilities
(HTM) git clone git://z3bra.org/wmutils
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 43cfe64796c8df2648071aa15983e0ff8b998858
(DIR) parent ddf0c5b66b546622c7b2e4ed7978ac9682dbba7f
(HTM) Author: z3bra <willy@mailoo.org>
Date: Tue, 9 Jun 2015 23:29:34 +0200
Change variables in Makfile for POSIX-compliance
POSIX only specifies one variable attribution:
CC = cc
All the other (:=, ?=, ...) are implementation specific and interfere
with the .POSIX: target. For example, using
CC ?= cc
Would make the $(CC) macro be assigned to 'cc' if the $CC environment
variable is empty.
The problem here is that the .POSIX target implies that if the $(CC)
macro is empty, it should be set to it's default, POSIX value: 'c99'.
Thus, the ?= assignment is useless in the caase of a POSIX makefile.
To use the environment variables, POSIX specifies the `-e` flags, which
will make make(1) use environment variables instead of it's own local
variables.
Please use it instead starting from now. Thanks.
Also, I'm sorry I asked dcat to change the CC declaration in the
previous commit. That's my fault bro, I didn't tested.
Diffstat:
M config.mk | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
(DIR) diff --git a/config.mk b/config.mk
t@@ -1,9 +1,9 @@
-PREFIX ?= /usr
-MANPREFIX := $(PREFIX)/man
+PREFIX = /usr
+MANPREFIX = $(PREFIX)/man
-CC ?= cc
-LD := $(CC)
+CC = cc
+LD = $(CC)
-CFLAGS += -std=c99 -pedantic -Wall -Os
-LDFLAGS += -lxcb
+CFLAGS = -std=c99 -pedantic -Wall -Os
+LDFLAGS = -lxcb