Skip to content

Commit

Permalink
subtree: make "all" default target of Makefile
Browse files Browse the repository at this point in the history
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 <jacknagel@gmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Aug 18, 2014
1 parent da33a97 commit 960160b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contrib/subtree/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# The default target of this Makefile is...
all::

-include ../../config.mak.autogen
-include ../../config.mak

Expand Down Expand Up @@ -34,7 +37,7 @@ GIT_SUBTREE_XML := git-subtree.xml
GIT_SUBTREE_TXT := git-subtree.txt
GIT_SUBTREE_HTML := git-subtree.html

all: $(GIT_SUBTREE)
all:: $(GIT_SUBTREE)

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

0 comments on commit 960160b

Please sign in to comment.