Re: [PATCH] Makefile: extend NO_TCLTK=NoThanks to cover docs

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

 



Ævar Arnfjörð Bjarmason  <avarab@xxxxxxxxx> writes:

> Extend the NO_TCLTK=NoThanks flag to be understood by the
> Documentation Makefile.
>
> Before this change compiling and installing with NO_TCLTK would result
> in no git-gui, gitk or git-citool being installed, but their
> respective manual pages would still be installed.

Thanks, but I personally do not perceive it to be a problem.

It is perfectly OK to install programs without installing docs, and
also it is OK to install docs without programs.  I do not see why
gitk.html and the reference to it from the main ToC in git.html must
be removed when you are not installing gitk.

Lack of an option to skip them from the documentation is something
we might want to improve, but you should be able to install the docs
for programs you do not happen to have, and I think it should be the
default.

By the way, to be more explicit than merely to hint, I think this
patch needs to also update Documentation/cmd-list.perl so that under
NO_TCLTK, the entry for gitk is omitted from cmds-mainporcelain.txt,
etc. to be a complete solution to your original problem.

> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>
> ---
>  Documentation/Makefile | 23 ++++++++++++++++++-----
>  Makefile               | 39 +++++++++++++++++++++------------------
>  2 files changed, 39 insertions(+), 23 deletions(-)
>
> diff --git a/Documentation/Makefile b/Documentation/Makefile
> index d079d7c73a..d53979939e 100644
> --- a/Documentation/Makefile
> +++ b/Documentation/Makefile
> @@ -1,5 +1,7 @@
>  # Guard against environment variables
>  MAN1_TXT =
> +MAN1_TXT_WIP =
> +TCLTK_FILES =

The latter name loses the fact that it is to hold candidates to be
on MAN1_TXT that happen to be conditionally included; calling it
MAN1_TXT_TCLTK or something, perhaps, may be an improvement.

The former name makes it look it is work-in-progress, but in fact
they are definite and unconditional part of MAN1_TXT.  Perhaps
MAN1_TXT_CORE or something?

> ...
> +MAN1_TXT_WIP += git.txt
> +MAN1_TXT_WIP += gitremote-helpers.txt
> +MAN1_TXT_WIP += gitweb.txt
> +
> +ifndef NO_TCLTK
> +MAN1_TXT_WIP += gitk.txt
> +MAN1_TXT = $(MAN1_TXT_WIP)
> +else
> +TCLTK_FILES += git-gui.txt
> +TCLTK_FILES += gitk.txt
> +TCLTK_FILES += git-citool.txt
> +MAN1_TXT = $(filter-out \
> +		$(TCLTK_FILES), \
> +		$(MAN1_TXT_WIP))
> +endif
>  
>  MAN5_TXT += gitattributes.txt
>  MAN5_TXT += githooks.txt
> diff --git a/Makefile b/Makefile
> index bc4fc8eeab..8abb23f6ce 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2372,21 +2372,21 @@ export DEFAULT_EDITOR DEFAULT_PAGER
>  
>  .PHONY: doc man man-perl html info pdf
>  doc: man-perl
> -	$(MAKE) -C Documentation all
> +	$(MAKE) -C Documentation all NO_TCLTK='$(NO_TCLTK)'
> ...
>  pdf:
> -	$(MAKE) -C Documentation pdf
> +	$(MAKE) -C Documentation pdf NO_TCLTK='$(NO_TCLTK)'

Since we are assuming GNU make anyway, can we just say "export
NO_TCLTK" just once, or would it be too magical and create
maintenance burden?



[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