-
Notifications
You must be signed in to change notification settings - Fork 1
/
0001-disable-gitweb.patch
132 lines (120 loc) · 3.71 KB
/
0001-disable-gitweb.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Marko Lemmetty <marko.lemmetty@jollamobile.com>
Date: Thu, 6 Feb 2020 17:14:23 +0200
Subject: [PATCH] disable gitweb
---
Documentation/Makefile | 4 ++++
Makefile | 24 +++++++++++++++++++++++-
2 files changed, 27 insertions(+), 1 deletion(-)
diff --git a/Documentation/Makefile b/Documentation/Makefile
index ed656db2ae90c1f5e0498867ec170395f6898b1f..5997c6766a88ef5efbaae559592d468b4d81bd73 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -17,7 +17,9 @@ MAN1_TXT += $(filter-out \
$(wildcard git-*.txt))
MAN1_TXT += git.txt
MAN1_TXT += gitk.txt
+ifdef USE_GITWEB
MAN1_TXT += gitweb.txt
+endif
# man5 / man7 guides (note: new guides should also be added to command-list.txt)
MAN5_TXT += gitattributes.txt
@@ -26,7 +28,9 @@ MAN5_TXT += gitignore.txt
MAN5_TXT += gitmailmap.txt
MAN5_TXT += gitmodules.txt
MAN5_TXT += gitrepository-layout.txt
+ifdef USE_GITWEB
MAN5_TXT += gitweb.conf.txt
+endif
MAN7_TXT += gitcli.txt
MAN7_TXT += gitcore-tutorial.txt
diff --git a/Makefile b/Makefile
index 12be39ac49789898227d025c5249ce5d2842ae47..428462c4f8c3fca5b40add60069e33c27942b6d8 100644
--- a/Makefile
+++ b/Makefile
@@ -651,10 +651,16 @@ clean-perl-script:
clean-python-script:
$(RM) $(SCRIPT_PYTHON_GEN)
+ifdef USE_GITWEB
SCRIPTS = $(SCRIPT_SH_GEN) \
$(SCRIPT_PERL_GEN) \
$(SCRIPT_PYTHON_GEN) \
git-instaweb
+else
+SCRIPTS = $(SCRIPT_SH_GEN) \
+ $(SCRIPT_PERL_GEN) \
+ $(SCRIPT_PYTHON_GEN)
+endif
ETAGS_TARGET = TAGS
@@ -2362,6 +2368,7 @@ GIT-PERL-HEADER: $(PERL_HEADER_TEMPLATE) GIT-PERL-DEFINES Makefile
perllibdir:
@echo '$(perllibdir_SQ)'
+ifdef USE_GITWEB
.PHONY: gitweb
gitweb:
$(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) all
@@ -2370,7 +2377,9 @@ git-instaweb: git-instaweb.sh GIT-SCRIPT-DEFINES
$(QUIET_GEN)$(cmd_munge_script) && \
chmod +x $@+ && \
mv $@+ $@
+endif # USE_GITWEB
else # NO_PERL
+ifdef USE_GITWEB
$(SCRIPT_PERL_GEN) git-instaweb: % : unimplemented.sh
$(QUIET_GEN) \
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
@@ -2378,8 +2387,10 @@ $(SCRIPT_PERL_GEN) git-instaweb: % : unimplemented.sh
unimplemented.sh >$@+ && \
chmod +x $@+ && \
mv $@+ $@
+endif # USE_GITWEB
endif # NO_PERL
+
# This makes sure we depend on the NO_PYTHON setting itself.
$(SCRIPT_PYTHON_GEN): GIT-BUILD-OPTIONS
@@ -3044,7 +3055,9 @@ ifndef NO_PERL
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perllibdir_SQ)'
(cd perl/build/lib && $(TAR) cf - .) | \
(cd '$(DESTDIR_SQ)$(perllibdir_SQ)' && umask 022 && $(TAR) xof -)
+ifdef USE_GITWEB
$(MAKE) -C gitweb install
+endif # USE_GITWEB
endif
ifndef NO_TCLTK
$(MAKE) -C gitk-git install
@@ -3098,11 +3111,16 @@ endif
ln -s "git-remote-http$X" "$$execdir/$$p" 2>/dev/null || \
cp "$$execdir/git-remote-http$X" "$$execdir/$$p" || exit; } \
done
-
+ifdef USE_GITWEB
.PHONY: install-gitweb install-doc install-man install-man-perl install-html install-info install-pdf
+else
+.PHONY: install-doc install-man install-man-perl install-html install-info install-pdf
+endif
.PHONY: quick-install-doc quick-install-man quick-install-html
+ifdef USE_GITWEB
install-gitweb:
$(MAKE) -C gitweb install
+endif
install-doc: install-man-perl
$(MAKE) -C Documentation install
@@ -3246,7 +3264,9 @@ clean: profile-clean coverage-clean cocciclean
$(MAKE) -C Documentation/ clean
$(RM) Documentation/GIT-EXCLUDED-PROGRAMS
ifndef NO_PERL
+ifdef USE_GITWEB
$(MAKE) -C gitweb clean
+endif # USE_GITWEB
$(RM) -r perl/build/
endif
$(MAKE) -C templates/ clean
@@ -3283,7 +3303,9 @@ ALL_COMMANDS += git
ALL_COMMANDS += git-citool
ALL_COMMANDS += git-gui
ALL_COMMANDS += gitk
+ifdef USE_GITWEB
ALL_COMMANDS += gitweb
+endif
.PHONY: check-docs
check-docs::