From: Johannes Sixt <J.Sixt@eudaptics.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: [PATCH] Avoid rebuilding everything if user changes CFLAGS on the make command line
Date: Wed, 07 Mar 2007 14:41:54 +0100 [thread overview]
Message-ID: <45EEC122.EA43CB72@eudaptics.com> (raw)
In-Reply-To: Pine.LNX.4.63.0703071319520.22628@wbgn013.biozentrum.uni-wuerzburg.de
From: Johannes Sixt <johannes.sixt@telecom.at>
The following sequence of commands is commonly used to recompile
selected files with different flags, for example, to change the debug
information:
make
rm builtin-diff.o
make CFLAGS="-g -O0"
However, the Makefile is clever enough to notice that the second 'make'
invocation changes the build flags and rebuilds everything.
This change exempts the value of CFLAGS (which is explicitly declared
as reserved for the user to change from the command line) from this
auto-detection.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
Johannes Schindelin wrote:
> GIT-CFLAGS: .FORCE-GIT-CFLAGS
> @FLAGS='$(TRACK_CFLAGS)'; \
> - if test x"$$FLAGS" != x"`cat GIT-CFLAGS 2>/dev/null`" ; then \
> + if test x"$$FLAGS" != x"`cat GIT-CFLAGS 2>/dev/null`" -a \
> + -z "$(IGNORE_GIT_CFLAGS)"; then \
> echo 1>&2 " * new build flags or prefix"; \
> echo "$$FLAGS" >GIT-CFLAGS; \
> fi
IMHO, the value of $(CFLAGS) (which the Makefile declares as "for the
users to override from the command line") should never take part in this
build-flags-change-autodetection.
-- Hannes
Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 9a37b15..8410530 100644
--- a/Makefile
+++ b/Makefile
@@ -812,7 +812,7 @@ tags:
find . -name '*.[hcS]' -print | xargs ctags -a
### Detect prefix changes
-TRACK_CFLAGS = $(subst ','\'',$(ALL_CFLAGS)):\
+TRACK_CFLAGS = $(subst ','\'',$(BASIC_CFLAGS)):\
$(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ)
GIT-CFLAGS: .FORCE-GIT-CFLAGS
--
1.5.0.2.279.g4808
next prev parent reply other threads:[~2007-03-07 13:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-06 21:50 [PATCH] Makefile: do not optimize when DEBUG=1 Johannes Schindelin
2007-03-07 9:26 ` Johannes Sixt
2007-03-07 12:37 ` Johannes Schindelin
2007-03-07 13:41 ` Johannes Sixt [this message]
2007-03-07 18:01 ` [PATCH] Avoid rebuilding everything if user changes CFLAGS on the make command line Junio C Hamano
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=45EEC122.EA43CB72@eudaptics.com \
--to=j.sixt@eudaptics.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
/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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.