git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 02/13] Makefile: fix git-instaweb dependency on gitweb

From
Jeff King <peff@peff.net>
Date
Feb 5, 2014, 17:49 UTC
Message-ID
<20140205174923.GB15218@sigill.intra.peff.net>
In-Reply-To
<20140205174823.GA15070@sigill.intra.peff.net>

We build git-instaweb if NO_PERL is not defined, and it in turns depends on "gitweb", which causes us to descend into the gitweb subdir and recursively invoke make. But because gitweb is marked as .PHONY, this forces a rebuild of git-instaweb every time we run make.

We can drop the dependency of git-instaweb on gitweb. However, that means we do not recurse into "gitweb" at all, so we have to add back in the dependency to "all".

Note that the other subdirectories (like git-gui/ or perl/) are handled directly as build commands of "all", and we could simply do the same thing here. However, this patch keeps "gitweb" as a target so that "make gitweb" continues to work, in case anybody is using that.

Signed-off-by: Jeff King <peff@peff.net>
---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 3cd4a92..1f3e5d9 100644
--- a/Makefile
+++ b/Makefile
@@ -1818,8 +1818,9 @@ GIT-PERL-DEFINES: FORCE
 .PHONY: gitweb
 gitweb:
 	$(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) all
+all:: gitweb
 
-git-instaweb: git-instaweb.sh gitweb GIT-SCRIPT-DEFINES
+git-instaweb: git-instaweb.sh GIT-SCRIPT-DEFINES
 	$(QUIET_GEN)$(cmd_munge_script) && \
 	chmod +x $@+ && \
 	mv $@+ $@
-- 
1.8.5.2.500.g8060133
Previous: Jeff KingNext: Jeff King
Message 3 of 28 in “makefile refactoring”
  1. 0/13 makefile refactoringJeff King, Feb 5, 2014
  2. 01/13 Makefile: drop USE_GETTEXT_SCHEME from GIT-CFLAGSJeff King, Feb 5, 2014
  3. 02/13 Makefile: fix git-instaweb dependency on gitwebJeff King, Feb 5, 2014
  4. 03/13 Makefile: introduce make-var helper functionJeff King, Feb 5, 2014
  5. Eric SunshineFeb 6, 2014
  6. 04/13 Makefile: use tempfile/mv strategy for GIT-*Jeff King, Feb 5, 2014
  7. 05/13 Makefile: prefer printf to echo for GIT-*Jeff King, Feb 5, 2014
  8. 06/13 Makefile: store GIT-* sentinel files in MAKE/Jeff King, Feb 5, 2014
  9. Junio C HamanoFeb 5, 2014
  10. 07/13 Makefile: always create files via make-varJeff King, Feb 5, 2014
  11. 08/13 Makefile: introduce sq function for shell-quotingJeff King, Feb 5, 2014
  12. Junio C HamanoFeb 5, 2014
  13. 09/13 Makefile: add c-quote helper functionJeff King, Feb 5, 2014
  14. Junio C HamanoFeb 5, 2014
  15. Jeff KingFeb 5, 2014
  16. 10/13 Makefile: drop *_SQ variablesJeff King, Feb 5, 2014
  17. Junio C HamanoFeb 5, 2014
  18. 11/13 Makefile: auto-build C strings from make variablesJeff King, Feb 5, 2014
  19. Junio C HamanoFeb 5, 2014
  20. Jeff KingFeb 5, 2014
  21. 12/13 Makefile: teach scripts to include make variablesJeff King, Feb 5, 2014
  22. Junio C HamanoFeb 5, 2014
  23. Jeff KingFeb 5, 2014
  24. Thomas RastFeb 8, 2014
  25. Jeff KingFeb 10, 2014
  26. 13/13 move LESS/LV pager environment to MakefileJeff King, Feb 5, 2014
  27. Jeff KingFeb 5, 2014
  28. Jeff KingFeb 5, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.