List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH] cgit.mk: fix dependency handling
@ 2013-04-04 17:32 john
  2013-04-05 12:48 ` Jason
  0 siblings, 1 reply; 2+ messages in thread
From: john @ 2013-04-04 17:32 UTC (permalink / raw)


Git calculates the dependency files to be included using a simply
expanded Makefile variable, so it does not include the CGit objects that
are added after that Makefile has been processed.

We therefore need to include the dependency files ourselves in order to
get the dependency calculations right.  Do this.

Signed-off-by: John Keeping <john at keeping.me.uk>
---
I missed this when changing this to use Git's Makefile - it all worked
nicely until I started jumping between branches :-(

 cgit.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/cgit.mk b/cgit.mk
index e1aed63..3a3c901 100644
--- a/cgit.mk
+++ b/cgit.mk
@@ -60,6 +60,14 @@ $(CGIT_VERSION_OBJS): EXTRA_CPPFLAGS = \
 	-DCGIT_VERSION='"$(CGIT_VERSION)"'
 
 
+# Git handles dependencies using ":=" so dependencies in CGIT_OBJ are not
+# handled by that and we must handle them ourselves.
+cgit_dep_files := $(foreach f,$(CGIT_OBJS),$(dir $f).depend/$(notdir $f).d)
+cgit_dep_files_present := $(wildcard $(cgit_dep_files))
+ifneq ($(cgit_dep_files_present),)
+include $(cgit_dep_files_present)
+endif
+
 ifeq ($(wildcard $(CGIT_PREFIX).depend),)
 missing_dep_dirs += $(CGIT_PREFIX).depend
 endif
-- 
1.8.2.540.gf023cfe





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

* [PATCH] cgit.mk: fix dependency handling
  2013-04-04 17:32 [PATCH] cgit.mk: fix dependency handling john
@ 2013-04-05 12:48 ` Jason
  0 siblings, 0 replies; 2+ messages in thread
From: Jason @ 2013-04-05 12:48 UTC (permalink / raw)


Merged to wip.




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

end of thread, other threads:[~2013-04-05 12:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-04 17:32 [PATCH] cgit.mk: fix dependency handling john
2013-04-05 12:48 ` Jason

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