From: Jonathan Nieder <jrnieder@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Erik Faye-Lund <kusmabite@googlemail.com>,
Sverre Rabbelier <srabbelier@gmail.com>,
Andreas Schwab <schwab@linux-m68k.org>
Subject: [PATCH 02/12] Makefile: make sure test helpers are rebuilt when headers change
Date: Tue, 26 Jan 2010 09:45:54 -0600 [thread overview]
Message-ID: <20100126154554.GC4895@progeny.tock> (raw)
In-Reply-To: <20100126154357.GA4895@progeny.tock>
It is not worth the bother to maintain an up-to-date list of
which headers each test helper uses, so depend on $(LIB_H) to
catch them all.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
This applies to maint. Please let me know if you are interested
in the corresponding patch for master.
Makefile | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/Makefile b/Makefile
index bad8f80..1670ee8 100644
--- a/Makefile
+++ b/Makefile
@@ -402,6 +402,18 @@ PROGRAMS += git-upload-pack$X
PROGRAMS += git-var$X
PROGRAMS += git-http-backend$X
+TEST_PROGRAMS += test-chmtime$X
+TEST_PROGRAMS += test-ctype$X
+TEST_PROGRAMS += test-date$X
+TEST_PROGRAMS += test-delta$X
+TEST_PROGRAMS += test-dump-cache-tree$X
+TEST_PROGRAMS += test-genrandom$X
+TEST_PROGRAMS += test-match-trees$X
+TEST_PROGRAMS += test-parse-options$X
+TEST_PROGRAMS += test-path-utils$X
+TEST_PROGRAMS += test-sha1$X
+TEST_PROGRAMS += test-sigchain$X
+
# List built-in command $C whose implementation cmd_$C() is not in
# builtin-$C.o but is linked in as part of some other command.
BUILT_INS += $(patsubst builtin-%.o,git-%$X,$(BUILTIN_OBJS))
@@ -695,6 +707,8 @@ BUILTIN_OBJS += builtin-verify-pack.o
BUILTIN_OBJS += builtin-verify-tag.o
BUILTIN_OBJS += builtin-write-tree.o
+TEST_OBJS := $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))
+
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
EXTLIBS =
@@ -1642,7 +1656,7 @@ git-remote-curl$X: remote-curl.o http.o http-walker.o $(GITLIBS)
$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
$(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
-$(patsubst git-%$X,%.o,$(PROGRAMS)) git.o: $(LIB_H) $(wildcard */*.h)
+$(patsubst git-%$X,%.o,$(PROGRAMS)) $(TEST_OBJS) git.o: $(LIB_H) $(wildcard */*.h)
builtin-branch.o builtin-checkout.o builtin-clone.o builtin-reset.o branch.o: branch.h
builtin-bundle.o bundle.o transport.o: bundle.h
builtin-bisect--helper.o builtin-rev-list.o bisect.o: bisect.h
@@ -1732,18 +1746,6 @@ endif
### Testing rules
-TEST_PROGRAMS += test-chmtime$X
-TEST_PROGRAMS += test-ctype$X
-TEST_PROGRAMS += test-date$X
-TEST_PROGRAMS += test-delta$X
-TEST_PROGRAMS += test-dump-cache-tree$X
-TEST_PROGRAMS += test-genrandom$X
-TEST_PROGRAMS += test-match-trees$X
-TEST_PROGRAMS += test-parse-options$X
-TEST_PROGRAMS += test-path-utils$X
-TEST_PROGRAMS += test-sha1$X
-TEST_PROGRAMS += test-sigchain$X
-
all:: $(TEST_PROGRAMS)
# GNU make supports exporting all variables by "export" without parameters.
@@ -1763,9 +1765,7 @@ test-delta$X: diff-delta.o patch-delta.o
test-parse-options$X: parse-options.o
-test-parse-options.o: parse-options.h
-
-.PRECIOUS: $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))
+.PRECIOUS: $(TEST_OBJS)
test-%$X: test-%.o $(GITLIBS)
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
--
1.6.6
next prev parent reply other threads:[~2010-01-26 15:46 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-23 14:42 [PATCH 0/5] Makefile: add missing header dependency rules Jonathan Nieder
2010-01-23 14:43 ` [PATCH 1/5] Makefile: add missing header file dependencies Jonathan Nieder
2010-01-23 14:44 ` [PATCH 2/5] Makefile: make sure test helpers are rebuilt when headers change Jonathan Nieder
2010-01-23 14:44 ` [PATCH 3/5] Makefile: remove wt-status.h from LIB_H Jonathan Nieder
2010-01-23 14:45 ` [PATCH 4/5] Makefile: clean up http-walker.o dependency rules Jonathan Nieder
2010-01-23 14:45 ` [PATCH 5/5] Makefile: drop dependency on $(wildcard */*.h) Jonathan Nieder
2010-01-25 4:44 ` [PATCH 0/5] Makefile: add missing header dependency rules Junio C Hamano
2010-01-26 15:43 ` [PATCH 00/12] " Jonathan Nieder
2010-01-26 15:44 ` [PATCH 01/12] Makefile: add missing header file dependencies Jonathan Nieder
2010-01-26 15:45 ` Jonathan Nieder [this message]
2010-01-26 15:46 ` [PATCH 03/12] Makefile: remove wt-status.h from LIB_H Jonathan Nieder
2010-01-26 15:46 ` [PATCH 04/12] Makefile: clean up http-walker.o dependency rules Jonathan Nieder
2010-01-26 15:46 ` [PATCH 05/12] Makefile: drop dependency on $(wildcard */*.h) Jonathan Nieder
2010-01-26 15:47 ` [PATCH 06/12] Makefile: transport.o depends on branch.h now Jonathan Nieder
2010-01-26 15:49 ` [PATCH 07/12] Makefile: rearrange dependency rules Jonathan Nieder
2010-01-26 15:51 ` [PATCH 08/12] Makefile: disable default implicit rules Jonathan Nieder
2010-01-26 15:52 ` [PATCH 09/12] Makefile: list generated object files in OBJECTS Jonathan Nieder
2010-01-26 15:52 ` [PATCH 10/12] Makefile: lazily compute header dependencies Jonathan Nieder
2010-01-26 15:54 ` [PATCH 11/12] Makefile: list standalone program object files in PROGRAM_OBJS Jonathan Nieder
2010-01-27 9:07 ` [PATCH v2 " Jonathan Nieder
2010-01-26 15:57 ` [PATCH 12/12] Teach Makefile to check header dependencies Jonathan Nieder
2010-01-31 20:42 ` Junio C Hamano
2010-01-31 21:14 ` Jonathan Nieder
2010-01-31 21:26 ` Junio C Hamano
2010-01-31 21:37 ` [PATCH 14/12] Makefile: always remove .depend directories on 'make clean' Jonathan Nieder
2010-01-31 21:23 ` [PATCH 13/12] Makefile: tuck away generated makefile fragments in .depend Jonathan Nieder
2010-01-26 16:19 ` [PATCH 00/12] Re: Makefile: add missing header dependency rules 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=20100126154554.GC4895@progeny.tock \
--to=jrnieder@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=kusmabite@googlemail.com \
--cc=schwab@linux-m68k.org \
--cc=srabbelier@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.
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 NNTP newsgroup(s).