guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 06/13] build: Generate man pages after compiling guile object


From: Eric Bavier
Subject: Re: [PATCH 06/13] build: Generate man pages after compiling guile objects.
Date: Fri, 29 Jan 2016 10:46:55 -0600
User-agent: Roundcube Webmail/1.0.6

On 2016-01-29 10:17, Mathieu Lirzin wrote:
Eric Bavier <address@hidden> writes:

On Thu, 28 Jan 2016 18:00:35 +0100
Mathieu Lirzin <address@hidden> wrote:

OTOH I must admit that for maintainability reasons I would prefer
avoiding complexity in Makefiles as much as possible.  This means
using Automake's abstract concepts as much as possible, having a
simple dependency graph on top of that, and put things that don't fit
well in this scheme in individual "build-aux/" scripts.  For that
reason I still prefer the embed help2man solution.  but otherwise it
looks nice.  :)

I sympathize with the concerns for maintainability.  In this case, it
seems to me that a few lines of make/shell would be preferable to 20k
lines of perl.  Perhaps the simpler attached patch is better?

A few lines of Make/Shell seems more maintainable than a full perl
program.  But in this case the maintenance is handled upstream, so it
only consists in updating the script periodically (which is still not
ideal).

Your patch is definitely better now since the hack is localized to a
specific target.  Let's use this solution!  I have attached an updated
version which simplifies how silent rules are handled and integrates
changes from my initial patch.

Are you OK with it?

This improves compilation speed since scripts are not compiled twice.

It helps immensely on my little netbook :)

+# Man pages are generated using GNU help2man.
+gen_man = LANGUAGE= $(top_builddir)/pre-inst-env $(HELP2MAN)

I like what you did with sub_commands_mans and gen_man

+doc/guix-%.1: guix/scripts/%.scm $(GOBJECTS)
+       -$(AM_V_HELP2MAN)case '$?' in \
+         *$<*) $(gen_man) --output="$@" "guix `basename "$<" .scm`";; \
+         *)    : ;; \
+       esac

The `basename "$<" .scm` could be reduced to $* here.

In my patch I was trying to avoid printing the case et al in verbose mode. This should be fine though; anyone reading the output of a verbose build might not be put off my the sh.

The rest LGTM!

ps: I was speaking of 20KB (790 lines of perl) not 20K lines of code.
:)

heh :)

--
`~Eric



reply via email to

[Prev in Thread] Current Thread [Next in Thread]