Skip to content

Commit 0921809

Browse files
committed
Merge branch 'ad/set-default-target-in-makefiles'
Correct the default target in Documentation/Makefile, and future-proof all Makefiles from similar breakages by declaring the default target (which happens to be "all") upfront. * ad/set-default-target-in-makefiles: Makefile: set default goals in makefiles
2 parents 9b07c15 + 5309c1e commit 0921809

File tree

15 files changed

+46
-11
lines changed

15 files changed

+46
-11
lines changed

Documentation/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# The default target of this Makefile is...
2+
all::
3+
14
# Import tree-wide shared Makefile behavior and libraries
25
include ../shared.mak
36

@@ -238,7 +241,7 @@ DEFAULT_EDITOR_SQ = $(subst ','\'',$(DEFAULT_EDITOR))
238241
ASCIIDOC_EXTRA += -a 'git-default-editor=$(DEFAULT_EDITOR_SQ)'
239242
endif
240243

241-
all: html man
244+
all:: html man
242245

243246
html: $(DOC_HTML)
244247

contrib/credential/libsecret/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# The default target of this Makefile is...
2+
all::
3+
14
MAIN:=git-credential-libsecret
25
all:: $(MAIN)
36

contrib/credential/osxkeychain/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# The default target of this Makefile is...
12
all:: git-credential-osxkeychain
23

34
CC = gcc

contrib/credential/wincred/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
all: git-credential-wincred.exe
1+
# The default target of this Makefile is...
2+
all:: git-credential-wincred.exe
23

34
-include ../../../config.mak.autogen
45
-include ../../../config.mak

contrib/diff-highlight/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
all: diff-highlight
1+
# The default target of this Makefile is...
2+
all:: diff-highlight
23

34
PERL_PATH = /usr/bin/perl
45
-include ../../config.mak

contrib/diff-highlight/t/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# The default target of this Makefile is...
2+
all::
3+
14
-include ../../../config.mak.autogen
25
-include ../../../config.mak
36

@@ -6,7 +9,7 @@ SHELL_PATH ?= $(SHELL)
69
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
710
T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
811

9-
all: test
12+
all:: test
1013
test: $(T)
1114

1215
.PHONY: help clean all test $(T)

contrib/mw-to-git/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
#
1313
# make install
1414

15+
# The default target of this Makefile is...
16+
all::
17+
1518
GIT_MEDIAWIKI_PM=Git/Mediawiki.pm
1619
SCRIPT_PERL=git-remote-mediawiki.perl
1720
SCRIPT_PERL+=git-mw.perl
@@ -27,7 +30,7 @@ INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/ \
2730
DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
2831
INSTLIBDIR_SQ = $(subst ','\'',$(INSTLIBDIR))
2932

30-
all: build
33+
all:: build
3134

3235
test: all
3336
$(MAKE) -C t

contrib/mw-to-git/t/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
#
99
## Test git-remote-mediawiki
1010

11-
all: test
11+
# The default target of this Makefile is...
12+
all:: test
1213

1314
-include ../../../config.mak.autogen
1415
-include ../../../config.mak

contrib/persistent-https/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# The default target of this Makefile is...
16+
all::
17+
1518
BUILD_LABEL=$(shell cut -d" " -f3 ../../GIT-VERSION-FILE)
1619
TAR_OUT=$(shell go env GOOS)_$(shell go env GOARCH).tar.gz
1720

18-
all: git-remote-persistent-https git-remote-persistent-https--proxy \
21+
all:: git-remote-persistent-https git-remote-persistent-https--proxy \
1922
git-remote-persistent-http
2023

2124
git-remote-persistent-https--proxy: git-remote-persistent-https

contrib/subtree/t/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
# Copyright (c) 2005 Junio C Hamano
44
#
55

6+
# The default target of this Makefile is...
7+
all::
8+
69
-include ../../../config.mak.autogen
710
-include ../../../config.mak
811

@@ -31,7 +34,7 @@ TSVN = $(sort $(wildcard t91[0-9][0-9]-*.sh))
3134
TGITWEB = $(sort $(wildcard t95[0-9][0-9]-*.sh))
3235
THELPERS = $(sort $(filter-out $(T),$(wildcard *.sh)))
3336

34-
all: $(DEFAULT_TEST_TARGET)
37+
all:: $(DEFAULT_TEST_TARGET)
3538

3639
test: pre-clean $(TEST_LINT)
3740
$(MAKE) aggregate-results-and-cleanup

0 commit comments

Comments
 (0)