Source: cal
Version: 4.1-1
Tags: patch
User: [email protected]
Usertags: pac-bti

Hi,
currently cal's Makefile is overriding the value of CFLAGS and CC.

The attached patch ensures CFLAGS is appended to rather than
overwritten, and that CC is set only if unset.

See 
https://wiki.debian.org/ToolChain/PACBTI#Packages_overriding_the_default_build_flags
From: Emanuele Rocca <[email protected]>
Date: Tue, 6 May 2025 13:38:12 +0200
Subject: [PATCH] Honor CC and CFLAGS environment variables

---
 src/makefile.unx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/makefile.unx b/src/makefile.unx
index cf1fa32..2a6261a 100644
--- a/src/makefile.unx
+++ b/src/makefile.unx
@@ -10,11 +10,11 @@
 DEFAULT_DATA_DIR="\"/etc/\""
 
 RM=rm -f
-CC=gcc
+CC ?= gcc
 
 # Using -Wall will create some warnings on SunOS that can be ignored.
 # CFLAGS=-O2 -Wall -DUNIX -DUSE_REMINDER -DPREFIX=$(DEFAULT_DATA_DIR)
-CFLAGS=-O2 -Wall -DUNIX -DUSE_REMINDER -DPREFIX=$(DEFAULT_DATA_DIR) -DHAVE_LOCALE_H -DHAVE_LANGINFO_H
+CFLAGS+=-O2 -Wall -DUNIX -DUSE_REMINDER -DPREFIX=$(DEFAULT_DATA_DIR) -DHAVE_LOCALE_H -DHAVE_LANGINFO_H
 
 BINDIR=/usr/bin
 MANDIR=/usr/man
-- 
2.39.5

Reply via email to