Re: [PATCH] Makefile: correct default docs build target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Adam Dinwoodie <adam@xxxxxxxxxxxxx> writes:
>
>> Put the "all" target definition near the top of Documentation/Makefile,
>> so that attempts to run make in the documentation directory actually
>> build the documentation.
>
> Good eyes.  To make the intent even more clear, please adopt the
> trick (or "convention") used by t/Makefile and our main Makefile to
> have an empty "all::" at the very beginning of the file, instead of
> moving things around, to avoid this kind of mistake to ever enter
> the repository again.
>
> Thanks.
>
>
> [Footnote]
>
> * If existing "all" targets are single-colon rules by mistake, they
>   need to be corrected.  There is no reason why these phony targets
>   should be anything but double-colon rules).

Yikes, it turns out this is needed, but because there is only one
place right now, fixing it is easy.  Something like this, perhaps.



diff --git c/Documentation/Makefile w/Documentation/Makefile
index aedfe99d1d..ddf3aa8fac 100644
--- c/Documentation/Makefile
+++ w/Documentation/Makefile
@@ -1,3 +1,6 @@
+# The default target of this Makefile is...
+all::
+
 # Import tree-wide shared Makefile behavior and libraries
 include ../shared.mak
 
@@ -238,7 +241,7 @@ DEFAULT_EDITOR_SQ = $(subst ','\'',$(DEFAULT_EDITOR))
 ASCIIDOC_EXTRA += -a 'git-default-editor=$(DEFAULT_EDITOR_SQ)'
 endif
 
-all: html man
+all:: html man
 
 html: $(DOC_HTML)
 




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux