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

[PATCH 2/2] Makefile: add NO_GIT_SVN knob to skip building/installing git-svn

From
Wesley Schwengle <wesleys@opperschaap.net>
Date
Aug 27, 2026, 16:51 UTC
Message-ID
<20260827165134.848207-3-wesleys@opperschaap.net>
In-Reply-To
<20260827165134.848207-1-wesleys@opperschaap.net>
This option also implies that NO_SVN_TESTS is enabled.
Signed-off-by: Wesley Schwengle <wesleys@opperschaap.net>
---
 Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/Makefile b/Makefile
index d4b775953d..e4b2f5fa0b 100644
--- a/Makefile
+++ b/Makefile
@@ -81,20 +81,23 @@ include shared.mak
 #
 # Define NO_SYS_SELECT_H if you don't have sys/select.h.
 #
 # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.
 # Enable it on Windows.  By default, symrefs are still used.
 #
 # Define NO_SVN_TESTS if you want to skip time-consuming SVN interoperability
 # tests.  These tests take up a significant amount of the total test time
 # but are not needed unless you plan to talk to SVN repos.
 #
+# Define NO_GIT_SVN if you don't want git-svn built or installed at all.
+# Implies NO_SVN_TESTS.
+#
 # Define NO_FINK if you are building on Darwin/Mac OS X, have Fink
 # installed in /sw, but don't want GIT to link against any libraries
 # installed there.  If defined you may specify your own (or Fink's)
 # include directories and library directories by defining CFLAGS
 # and LDFLAGS appropriately.
 #
 # Define NO_DARWIN_PORTS if you are building on Darwin/Mac OS X,
 # have DarwinPorts (which is an old name for MacPorts) installed
 # in /opt/local, but don't want GIT to
 # link against any libraries installed there.  If defined you may
@@ -741,21 +744,23 @@ SCRIPT_SH += git-web--browse.sh
 
 SCRIPT_LIB += git-mergetool--lib
 SCRIPT_LIB += git-sh-i18n
 SCRIPT_LIB += git-sh-setup
 
 SCRIPT_PERL += git-archimport.perl
 SCRIPT_PERL += git-cvsexportcommit.perl
 SCRIPT_PERL += git-cvsimport.perl
 SCRIPT_PERL += git-cvsserver.perl
 SCRIPT_PERL += git-send-email.perl
+ifndef NO_GIT_SVN
 SCRIPT_PERL += git-svn.perl
+endif
 
 SCRIPT_PYTHON += git-p4.py
 
 # Generated files for scripts
 SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))
 SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))
 SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON))
 
 # Individual rules to allow e.g.
 # "make -C ../.. SCRIPT_PERL=contrib/foo/bar.perl build-perl-script"
@@ -3408,20 +3413,23 @@ $(test_bindir_programs): bin-wrappers/%: bin-wrappers/wrap-for-bin.sh
 	     -e 's|@GITPERLLIB@|$(shell pwd)/perl/build/lib|' \
 	     -e 's|@MERGE_TOOLS_DIR@|$(shell pwd)/mergetools|' \
 	     -e 's|@TEMPLATE_DIR@|$(shell pwd)/templates/blt|' \
 	     -e 's|@PROG@|$(shell pwd)/$(patsubst test-%,t/helper/test-%,$(@F))$(if $(filter-out $(BINDIR_PROGRAMS_NO_X),$(@F)),$(X),)|' < $< > $@ && \
 	chmod +x $@
 
 # GNU make supports exporting all variables by "export" without parameters.
 # However, the environment gets quite big, and some programs have problems
 # with that.
 
+ifdef NO_GIT_SVN
+NO_SVN_TESTS = YesPlease
+endif
 export NO_SVN_TESTS
 export TEST_NO_MALLOC_CHECK
 
 ### Testing rules
 
 test: all
 	$(MAKE) -C t/ all
 ifdef TEST_CONTRIB_TOO
 	$(MAKE) -C contrib/ test
 endif
-- 
2.55.0.827.g48ce2c92dc
Previous: Wesley SchwengleNext: Wesley Schwengle
Message 2 of 7 in “git-svn: silence bogus v1-layout migration message”
  1. 0/2 git-svn: silence bogus v1-layout migration messageWesley Schwengle, Aug 27, 2026
  2. 2/2 Makefile: add NO_GIT_SVN knob to skip building/installing git-svnWesley Schwengle, Aug 27, 2026
  3. 1/2 git-svn: don't print v1-layout migration noise when there's nothing to migrateWesley Schwengle, Aug 27, 2026
  4. Junio C HamanoAug 27, 2026
  5. 0/2 git-svn: don't print v1-layout migration noise when there's nothing to migrateWesley Schwengle, Aug 27, 2026
  6. 1/2 git-svn: don't print v1-layout migration noise when there's nothing to migrateWesley Schwengle, Aug 27, 2026
  7. 2/2 Makefile: add NO_GIT_SVN knob to skip building/installing git-svnWesley Schwengle, Aug 27, 2026

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.