Skip to content

Commit 960160b

Browse files
peffgitster
authored andcommitted
subtree: make "all" default target of Makefile
You should be able to run "make" in contrib/subtree with no arguments and get the "all" target. This was broken by 8e2a5cc (contrib/subtree/Makefile: use GIT-VERSION-FILE, 2014-05-06), which put the rule for GIT-VERSION-FILE higher in the file. We can fix this by putting an empty "all::" target at the top of the file, just like our main Makefile does, and document that fact. That fixes this instance and future-proofs against it happening again. Reported-by: Jack Nagel <[email protected]> Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent da33a97 commit 960160b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

contrib/subtree/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

@@ -34,7 +37,7 @@ GIT_SUBTREE_XML := git-subtree.xml
3437
GIT_SUBTREE_TXT := git-subtree.txt
3538
GIT_SUBTREE_HTML := git-subtree.html
3639

37-
all: $(GIT_SUBTREE)
40+
all:: $(GIT_SUBTREE)
3841

3942
$(GIT_SUBTREE): $(GIT_SUBTREE_SH)
4043
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' $< >$@

0 commit comments

Comments
 (0)