[PATCH 0/2] Support "CFLAGS=... ./configure", etc.

1 view
Skip to first unread message

Rob Browning

unread,
Jun 25, 2022, 12:52:28 PM6/25/22
to bup-...@googlegroups.com
Proposed. As mentioned in the commit, for now these choices are
cleared by a "make clean", which we may want to change eventually.

Rob Browning (2):
GNUMakefile: don't manipulate user CFLAGS
Respect/prefer/remember user specified CPPFLAGS/CFLAGS/LDFLAGS

GNUmakefile | 24 +++++++++++-------------
README.md | 7 +++++++
config/config.vars.in | 4 ++++
3 files changed, 22 insertions(+), 13 deletions(-)

--
2.30.2

Rob Browning

unread,
Jun 25, 2022, 12:52:29 PM6/25/22
to bup-...@googlegroups.com
Signed-off-by: Rob Browning <r...@defaultvalue.org>
---
GNUmakefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/GNUmakefile b/GNUmakefile
index 20754e57..7989dbf4 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -69,7 +69,7 @@ config/config.vars: configure config/configure config/configure.inc config/*.in
# _XOPEN_SOURCE version, i.e. -Werror crashes on a mismatch, so for
# now, we're just going to let Python's version win.

-helpers_cflags := $(bup_python_cflags) $(bup_shared_cflags) -I$(CURDIR)/src
+helpers_cflags = $(bup_python_cflags) $(bup_shared_cflags) -I$(CURDIR)/src
helpers_ldflags := $(bup_python_ldflags) $(bup_shared_ldflags)

ifneq ($(strip $(bup_readline_cflags)),)
@@ -154,7 +154,7 @@ install: all
$(INSTALL) -pm 0644 lib/bup/source_info.py $(dest_libdir)/bup/; \
fi

-embed_cflags := $(bup_python_cflags_embed) $(bup_shared_cflags) -I$(CURDIR)/src
+embed_cflags = $(bup_python_cflags_embed) $(bup_shared_cflags) -I$(CURDIR)/src
embed_ldflags := $(bup_python_ldflags_embed) $(bup_shared_ldflags)

config/config.h: config/config.vars
@@ -176,13 +176,13 @@ dev/python: dev/python-proposed

clean_paths += dev/bup-exec
generated_dependencies += dev/bup-exec.d
-dev/bup-exec: CFLAGS += -D BUP_DEV_BUP_EXEC=1
+dev/bup-exec: bup_shared_cflags += -D BUP_DEV_BUP_EXEC=1
dev/bup-exec: lib/cmd/bup.c src/bup/compat.c src/bup/io.c
$(cc_bin)

clean_paths += dev/bup-python
generated_dependencies += dev/bup-python.d
-dev/bup-python: CFLAGS += -D BUP_DEV_BUP_PYTHON=1
+dev/bup-python: bup_shared_cflags += -D BUP_DEV_BUP_PYTHON=1
dev/bup-python: lib/cmd/bup.c src/bup/compat.c src/bup/io.c
$(cc_bin)

--
2.30.2

Rob Browning

unread,
Jul 1, 2022, 2:40:18 PM7/1/22
to bup-...@googlegroups.com

Pushed.

--
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
Reply all
Reply to author
Forward
0 new messages