git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: [PATCH] Makefile: determine the list of header files using a glob
Date: Fri, 27 Nov 2009 09:04:53 +0100	[thread overview]
Message-ID: <4B0F8825.3040107@viscovery.net> (raw)

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

             reply	other threads:[~2009-11-27  8:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-27  8:04 Johannes Sixt [this message]
2009-11-27  8:26 ` [PATCH] Makefile: determine the list of header files using a glob 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

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=4B0F8825.3040107@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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).