Skip to content

Commit 0b5ea16

Browse files
committed
git-gui: Make 'make' quieter by default
To fit nicely into the output of the git.git project's own quieter Makefile, we want to make the git-gui Makefile nice and quiet too. Signed-off-by: Shawn O. Pearce <[email protected]>
1 parent c3e8a0a commit 0b5ea16

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

Makefile

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
all::
22

3+
# Define V=1 to have a more verbose compile.
4+
#
5+
36
GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
47
@$(SHELL_PATH) ./GIT-VERSION-GEN
58
-include GIT-VERSION-FILE
@@ -19,27 +22,32 @@ ifndef INSTALL
1922
INSTALL = install
2023
endif
2124

25+
ifndef V
26+
QUIET_GEN = @echo ' ' GEN $@;
27+
QUIET_BUILT_IN = @echo ' ' BUILTIN $@;
28+
endif
29+
2230
DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
2331
gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
2432
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
2533

2634
git-gui: git-gui.sh GIT-VERSION-FILE CREDITS-FILE
27-
rm -f $@ $@+
35+
$(QUIET_GEN)rm -f $@ $@+ && \
2836
sed -n \
2937
-e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
3038
-e 's/@@GITGUI_VERSION@@/$(GITGUI_VERSION)/g' \
3139
-e '1,/^set gitgui_credits /p' \
32-
$@.sh >$@+
33-
cat CREDITS-FILE >>$@+
34-
sed -e '1,/^set gitgui_credits /d' $@.sh >>$@+
35-
chmod +x $@+
40+
$@.sh >$@+ && \
41+
cat CREDITS-FILE >>$@+ && \
42+
sed -e '1,/^set gitgui_credits /d' $@.sh >>$@+ && \
43+
chmod +x $@+ && \
3644
mv $@+ $@
3745

3846
CREDITS-FILE: CREDITS-GEN .FORCE-CREDITS-FILE
39-
$(SHELL_PATH) ./CREDITS-GEN
47+
$(QUIET_GEN)$(SHELL_PATH) ./CREDITS-GEN
4048

4149
$(GITGUI_BUILT_INS): git-gui
42-
rm -f $@ && ln git-gui $@
50+
$(QUIET_BUILT_IN)rm -f $@ && ln git-gui $@
4351

4452
all:: $(ALL_PROGRAMS)
4553

0 commit comments

Comments
 (0)