git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Makefile: determine the list of header files using a glob
@ 2009-11-27  8:04 Johannes Sixt
  2009-11-27  8:26 ` Mike Hommey
  2009-11-27  9:36 ` Johannes Schindelin
  0 siblings, 2 replies; 28+ messages in thread
From: Johannes Sixt @ 2009-11-27  8:04 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List

From: Johannes Sixt <j6t@kdbg.org>

The list of header files was incomplete because a number of header files
were added to the code base, but were not added to the list LIB_H that we
have in the Makefile. This meant that no rebuild was triggered if one of
the missing headers was changed because we do not have automatic
dependency tracking, either.

Sidestep the issue by computing the list using $(wildcard).

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
---
 Makefile |   63 +------------------------------------------------------------
 1 files changed, 2 insertions(+), 61 deletions(-)

diff --git a/Makefile b/Makefile
index 5a0b3d4..279c7e4 100644
--- a/Makefile
+++ b/Makefile
@@ -326,7 +326,6 @@ BUILTIN_OBJS =
 BUILT_INS =
 COMPAT_CFLAGS =
 COMPAT_OBJS =
-LIB_H =
 LIB_OBJS =
 PROGRAMS =
 SCRIPT_PERL =
@@ -429,65 +428,7 @@ export PERL_PATH
 LIB_FILE=libgit.a
 XDIFF_LIB=xdiff/lib.a

-LIB_H += advice.h
-LIB_H += archive.h
-LIB_H += attr.h
-LIB_H += blob.h
-LIB_H += builtin.h
-LIB_H += cache.h
-LIB_H += cache-tree.h
-LIB_H += commit.h
-LIB_H += compat/bswap.h
-LIB_H += compat/cygwin.h
-LIB_H += compat/mingw.h
-LIB_H += csum-file.h
-LIB_H += decorate.h
-LIB_H += delta.h
-LIB_H += diffcore.h
-LIB_H += diff.h
-LIB_H += dir.h
-LIB_H += fsck.h
-LIB_H += git-compat-util.h
-LIB_H += graph.h
-LIB_H += grep.h
-LIB_H += hash.h
-LIB_H += help.h
-LIB_H += levenshtein.h
-LIB_H += list-objects.h
-LIB_H += ll-merge.h
-LIB_H += log-tree.h
-LIB_H += mailmap.h
-LIB_H += merge-recursive.h
-LIB_H += notes.h
-LIB_H += object.h
-LIB_H += pack.h
-LIB_H += pack-refs.h
-LIB_H += pack-revindex.h
-LIB_H += parse-options.h
-LIB_H += patch-ids.h
-LIB_H += pkt-line.h
-LIB_H += progress.h
-LIB_H += quote.h
-LIB_H += reflog-walk.h
-LIB_H += refs.h
-LIB_H += remote.h
-LIB_H += rerere.h
-LIB_H += revision.h
-LIB_H += run-command.h
-LIB_H += sha1-lookup.h
-LIB_H += sideband.h
-LIB_H += sigchain.h
-LIB_H += strbuf.h
-LIB_H += string-list.h
-LIB_H += submodule.h
-LIB_H += tag.h
-LIB_H += transport.h
-LIB_H += tree.h
-LIB_H += tree-walk.h
-LIB_H += unpack-trees.h
-LIB_H += userdiff.h
-LIB_H += utf8.h
-LIB_H += wt-status.h
+LIB_H = $(wildcard *.h */*.h compat/*/*.h)

 LIB_OBJS += abspath.o
 LIB_OBJS += advice.o
@@ -1611,7 +1552,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)) git.o: $(LIB_H)
 builtin-revert.o wt-status.o: wt-status.h

 $(LIB_FILE): $(LIB_OBJS)
-- 
1.6.6.rc0.43.g50037

^ permalink raw reply related	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2010-01-07 13:22 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-27  8:04 [PATCH] Makefile: determine the list of header files using a glob Johannes Sixt
2009-11-27  8:26 ` Mike Hommey
2009-11-27  8:50   ` Johannes Sixt
2009-11-27  8:58     ` Mike Hommey
2009-11-27 18:28       ` Junio C Hamano
2009-12-30  8:00         ` Mike Hommey
2009-12-30  8:45           ` Junio C Hamano
2009-11-27  9:36 ` Johannes Schindelin
2009-11-27 17:45   ` [PATCH/RFC 0/2] Lazily generate header dependencies Jonathan Nieder
2009-11-27 17:49     ` [PATCH/RFC 1/2] Makefile: use target-specific variable to pass flags to cc Jonathan Nieder
2009-11-27 17:50     ` [PATCH/RFC 2/2] Makefile: automatically compute header dependencies Jonathan Nieder
2009-11-27 22:57       ` Sverre Rabbelier
2009-11-28  4:24         ` Jonathan Nieder
2009-11-28  9:29       ` [PATCH/RFC 2/2 v3] Makefile: lazily " Jonathan Nieder
2009-11-28  9:26         ` Andreas Schwab
2009-11-28 11:49           ` Jonathan Nieder
2010-01-01  0:05     ` [PATCH/RFC 0/2] Lazily generate " Nanako Shiraishi
2010-01-06  1:06       ` Junio C Hamano
2010-01-06  9:26         ` Johannes Schindelin
2010-01-06  9:36           ` Jonathan Nieder
2010-01-07  7:13       ` [PATCH v2 0/5] " Jonathan Nieder
2010-01-07  7:16         ` [PATCH 1/5] Makefile: rearrange dependency rules Jonathan Nieder
2010-01-07  7:18         ` [PATCH 2/5] Makefile: clear list of default rules Jonathan Nieder
2010-01-07  7:19         ` [PATCH 3/5] Makefile: add OBJECTS variable listing object files Jonathan Nieder
2010-01-07  7:23         ` [PATCH 4/5] Makefile: lazily compute header dependencies Jonathan Nieder
2010-01-07  7:30         ` [PATCH/RFC 5/5] Teach Makefile to check " Jonathan Nieder
2010-01-07 13:22         ` [PATCH v2 0/5] Lazily generate " Erik Faye-Lund
2009-11-27 18:28   ` [PATCH] Makefile: determine the list of header files using a glob Junio C Hamano

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).