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

[PATCH 1/3] Makefile: drop dependency between git-instaweb and gitweb

From
Jeff King <peff@peff.net>
Date
May 29, 2015, 07:25 UTC
Message-ID
<20150529072545.GA9670@peff.net>
In-Reply-To
<20150529072119.GA5415@peff.net>

The rule for "git-instaweb" depends on "gitweb". This makes no sense, because:

  1. git-instaweb has no build-time dependency on gitweb; it
     is a run-time dependency
  2. gitweb is a directory that we want to recursively make
     in. As a result, its recipe is marked .PHONY, which
     causes "make" to rebuild git-instaweb every time it is
     run.
Signed-off-by: Jeff King <peff@peff.net>
---
Note that this actually means we won't build "gitweb" at all with just
"make". It's possible that might break somebody's packaging script that
does:
  make &&
  cp gitweb/gitweb /some/place

I'm not incredibly concerned with that, as it was only being built as a bizarre side effect here, and they should probably be doing "make gitweb" (or "cd gitweb && make") if that's what they want to build.

But if we do want to build it by default, we can add it into the "all::" rule, as we do for "templates".

 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 323c401..6283353 100644
--- a/Makefile
+++ b/Makefile
@@ -1784,7 +1784,7 @@ GIT-PERL-DEFINES: FORCE
 gitweb:
 	$(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) all
 
-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 $@+ $@
-- 
2.4.2.668.gc3b1ade.dirty
Previous: Jeff KingNext: Jeff King
Message 2 of 4 in “fix minor Makefile annoyances”
  1. 0/3 fix minor Makefile annoyancesJeff King, May 29, 2015
  2. 1/3 Makefile: drop dependency between git-instaweb and gitwebJeff King, May 29, 2015
  3. 2/3 Makefile: avoid timestamp updates to GIT-BUILD-OPTIONSJeff King, May 29, 2015
  4. 3/3 Makefile: silence perl/PM.stamp recipeJeff King, May 29, 2015

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.