From: Jonathan Nieder <jrnieder@gmail•com>
To: Junio C Hamano <gitster@pobox•com>
Cc: git@vger•kernel.org, Linus Torvalds <torvalds@linux-foundation•org>
Subject: [PATCH 3/5] Makefile: learn to generate listings for targets requiring special flags
Date: Wed, 6 Jan 2010 02:06:03 -0600 [thread overview]
Message-ID: <20100106080603.GD7298@progeny.tock> (raw)
In-Reply-To: <20100106080216.GA7298@progeny.tock>
'make git.s' to debug code generation of main() fails because
git.c makes use of preprocessor symbols such as GIT_VERSION that
are not set. make does not generate code listings for
builtin_help.c, exec_cmd.c, builtin-init-db.c, config.c, http.c,
or http-walker.c either, for the same reason.
So pass the flags used to generate each .o file when generating
the corresponding assembler listing.
Cc: Linus Torvalds <torvalds@linux-foundation•org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail•com>
---
Makefile | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index 81190a6..3d774c6 100644
--- a/Makefile
+++ b/Makefile
@@ -1468,7 +1468,7 @@ strip: $(PROGRAMS) git$X
$(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X
git.o: common-cmds.h
-git.o: ALL_CFLAGS += -DGIT_VERSION='"$(GIT_VERSION)"' \
+git.s git.o: ALL_CFLAGS += -DGIT_VERSION='"$(GIT_VERSION)"' \
'-DGIT_HTML_PATH="$(htmldir_SQ)"'
git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
@@ -1476,7 +1476,7 @@ git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
$(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
builtin-help.o: common-cmds.h
-builtin-help.o: ALL_CFLAGS += \
+builtin-help.s builtin-help.o: ALL_CFLAGS += \
'-DGIT_HTML_PATH="$(htmldir_SQ)"' \
'-DGIT_MAN_PATH="$(mandir_SQ)"' \
'-DGIT_INFO_PATH="$(infodir_SQ)"'
@@ -1637,21 +1637,21 @@ git.o git.spec \
%.o: %.S
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
-exec_cmd.o: ALL_CFLAGS += \
+exec_cmd.s exec_cmd.o: ALL_CFLAGS += \
'-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \
'-DBINDIR="$(bindir_relative_SQ)"' \
'-DPREFIX="$(prefix_SQ)"'
-builtin-init-db.o: ALL_CFLAGS += \
+builtin-init-db.s builtin-init-db.o: ALL_CFLAGS += \
-DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"'
-config.o: ALL_CFLAGS += -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"'
+config.s config.o: ALL_CFLAGS += -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"'
-http.o: ALL_CFLAGS += -DGIT_USER_AGENT='"git/$(GIT_VERSION)"'
+http.s http.o: ALL_CFLAGS += -DGIT_USER_AGENT='"git/$(GIT_VERSION)"'
ifdef NO_EXPAT
http-walker.o: http.h
-http-walker.o: ALL_CFLAGS += -DNO_EXPAT
+http-walker.s http-walker.o: ALL_CFLAGS += -DNO_EXPAT
endif
git-%$X: %.o $(GITLIBS)
--
1.6.6.rc2
next prev parent reply other threads:[~2010-01-06 8:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-28 11:25 [PATCH 0/4] Makefile fixes Jonathan Nieder
2009-11-28 11:31 ` [PATCH 1/4] Makefile: fix http-push.o dependencies Jonathan Nieder
2009-11-28 18:05 ` Junio C Hamano
2009-11-28 11:33 ` [PATCH 2/4] Makefile: make ppc/sha1ppc.o depend on GIT-CFLAGS Jonathan Nieder
2010-01-06 6:37 ` [PATCH v2] " Jonathan Nieder
2010-01-06 18:17 ` Nicolas Pitre
2009-11-28 11:37 ` [PATCH 3/4] Makefile: fix .s pattern rule dependencies Jonathan Nieder
2010-01-06 8:02 ` [PATCH v2 0/5] Makefile: fix generation of assembler listings Jonathan Nieder
2010-01-06 8:04 ` [PATCH 1/5] Makefile: regenerate assembler listings when asked Jonathan Nieder
2010-01-06 8:05 ` [PATCH 2/5] Makefile: use target-specific variable to pass flags to cc Jonathan Nieder
2010-01-07 7:42 ` Jonathan Nieder
2010-01-06 8:06 ` Jonathan Nieder [this message]
2010-01-06 8:06 ` [PATCH 4/5] Makefile: consolidate .FORCE-* targets Jonathan Nieder
2010-01-06 8:16 ` [PATCH git-gui 5/5] git-gui/Makefile: " Jonathan Nieder
2010-01-07 2:20 ` Shawn O. Pearce
2010-01-06 9:07 ` [PATCH v2 0/5] Makefile: fix generation of assembler listings Linus Torvalds
2009-11-28 11:41 ` [PATCH 4/4] Makefile: do not clean arm directory Jonathan Nieder
2010-01-01 0:05 ` [PATCH 0/4] Makefile fixes Nanako Shiraishi
2010-01-06 1:07 ` Junio C Hamano
2010-01-06 4:20 ` Jonathan Nieder
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=20100106080603.GD7298@progeny.tock \
--to=jrnieder@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=torvalds@linux-foundation$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox