aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJulian Phillips <julian@quantumfyre.co.uk>2007-05-31 00:18:24 +0100
committerJunio C Hamano <junkio@cox.net>2007-05-30 18:23:37 -0700
commit5c5ba73b21a6910ee67d97cb87a5d78409112375 (patch)
treed7a70ddee20f7530cd2bd789f8977b87a86f32b6 /Makefile
parent65c6aca4d4c6fabc2767b8fa1ce7e67d3d594b1e (diff)
downloadgit-5c5ba73b21a6910ee67d97cb87a5d78409112375.tar.gz
git-5c5ba73b21a6910ee67d97cb87a5d78409112375.tar.xz
Makefile: Use generic rule to build test programs
Use a generic make rule to build all the test programs, rather than specifically mentioning each one. Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 5 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index 75277343f..cac0a4a2e 100644
--- a/Makefile
+++ b/Makefile
@@ -942,7 +942,7 @@ endif
### Testing rules
-TEST_PROGRAMS = test-chmtime$X test-genrandom$X
+TEST_PROGRAMS = test-chmtime$X test-genrandom$X test-date$X test-delta$X test-sha1$X test-match-trees$X
all:: $(TEST_PROGRAMS)
@@ -955,26 +955,12 @@ export NO_SVN_TESTS
test: all
$(MAKE) -C t/ all
-test-date$X: test-date.c date.o ctype.o
- $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) test-date.c date.o ctype.o
+test-date$X: date.o ctype.o
-test-delta$X: test-delta.o diff-delta.o patch-delta.o $(GITLIBS)
- $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
+test-delta$X: diff-delta.o patch-delta.o
-test-dump-cache-tree$X: dump-cache-tree.o $(GITLIBS)
- $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
-
-test-sha1$X: test-sha1.o $(GITLIBS)
- $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
-
-test-match-trees$X: test-match-trees.o $(GITLIBS)
- $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
-
-test-chmtime$X: test-chmtime.c
- $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $<
-
-test-genrandom$X: test-genrandom.c
- $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $<
+test-%$X: test-%.o $(GITLIBS)
+ $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
check-sha1:: test-sha1$X
./test-sha1.sh