From: Jeff King <peff@peff.net>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
"Thomas Gummerer" <t.gummerer@gmail.com>,
"Beat Bolli" <dev+git@drbeat.li>,
"Lars Schneider" <larsxschneider@gmail.com>,
"Matthieu Moy" <Matthieu.Moy@imag.fr>
Subject: Re: [PATCH v2 6/6] Makefile: allow for combining DEVELOPER=1 and CFLAGS="..."
Date: Fri, 22 Feb 2019 10:29:26 -0500 [thread overview]
Message-ID: <20190222152926.GC21524@sigill.intra.peff.net> (raw)
In-Reply-To: <20190222144127.32248-7-avarab@gmail.com>
On Fri, Feb 22, 2019 at 03:41:27PM +0100, Ævar Arnfjörð Bjarmason wrote:
> So let's introduce a "DEVELOPER_CFLAGS" variable in config.mak.dev and
> add it to ALL_CFLAGS. Before this the ALL_CFLAGS variable
> would (basically, there's some nuance we won't go into) be set to:
Yeah, I definitely think this is the right direction, and the patch
looks good to me.
> Examples of things that weren't possible before, but are now:
>
> # Use -O0 instead of -O2 for less painful debuggng
> DEVELOPER=1 CFLAGS="-O0 -g"
Sort an aside, but in my config.mak I have:
O=0
CFLAGS = -g -O$(O)
which lets me do "make O=2", which is nice and short. I wonder if other
people would want that, too.
(I default to -O0 because 99% of my compiles are for development and
debugging, so the compile being fast is more important than the build
result being fast; for perf testing or daily use, I use O=2).
> So we could have gotten away with the much smaller change of changing
> "CFLAGS" in config.mak.dev to "DEVELOPER_CFLAGS" and adding that to
> ALL_CFLAGS earlier in the Makefile "before" the config.mak.*
> includes. But I think it's more readable to use variables "after"
> they're included.
I think the reordering does make things more readable overall. And it
may be more sensible if config.mak uses any ":=" assignments.
-Peff
next prev parent reply other threads:[~2019-02-22 15:29 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-22 10:56 [PATCH] Makefile: remove an out-of-date comment Ævar Arnfjörð Bjarmason
2019-02-22 14:41 ` [PATCH v2 0/6] Makefile: allow for combining DEVELOPER= and CFLAGS="..." Ævar Arnfjörð Bjarmason
2019-02-22 15:16 ` Jeff King
2019-02-22 21:59 ` Ævar Arnfjörð Bjarmason
2019-02-23 13:22 ` Jeff King
2019-02-22 14:41 ` [PATCH v2 1/6] Makefile: remove an out-of-date comment Ævar Arnfjörð Bjarmason
2019-02-22 14:41 ` [PATCH v2 2/6] Makefile: move "strip" assignment down from flags Ævar Arnfjörð Bjarmason
2019-02-22 15:18 ` Jeff King
2019-02-22 21:58 ` Ramsay Jones
2019-02-23 13:23 ` Jeff King
2019-02-22 14:41 ` [PATCH v2 3/6] Makefile: add/remove comments at top and tweak whitespace Ævar Arnfjörð Bjarmason
2019-02-22 14:41 ` [PATCH v2 4/6] Makefile: Move *_LIBS assignment into its own section Ævar Arnfjörð Bjarmason
2019-02-22 15:21 ` Jeff King
2019-02-22 15:49 ` Eric Sunshine
2019-02-22 14:41 ` [PATCH v2 5/6] Makefile: move the setting of *FLAGS closer to "include" Ævar Arnfjörð Bjarmason
2019-02-22 23:19 ` Junio C Hamano
2019-02-22 14:41 ` [PATCH v2 6/6] Makefile: allow for combining DEVELOPER=1 and CFLAGS="..." Ævar Arnfjörð Bjarmason
2019-02-22 15:29 ` Jeff King [this message]
2019-02-22 23:23 ` Junio C Hamano
2019-02-22 15:09 ` [PATCH] Makefile: remove an out-of-date comment Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190222152926.GC21524@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=Matthieu.Moy@imag.fr \
--cc=avarab@gmail.com \
--cc=dev+git@drbeat.li \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=larsxschneider@gmail.com \
--cc=pclouds@gmail.com \
--cc=t.gummerer@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).