From mboxrd@z Thu Jan 1 00:00:00 1970 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 Message-ID: References: <1453666771-16869-1-git-send-email-mthl@gnu.org> <1453666771-16869-7-git-send-email-mthl@gnu.org> <87d1somgfd.fsf@gnu.org> <87zivs2jej.fsf@gnu.org> <20160127203742.52245ef3@openmailbox.org> <87oac5k8sp.fsf@gnu.org> <7bfbfb841466c6889effbd21d089d616@openmailbox.org> <87k2mtk5ak.fsf@gnu.org> <20160128182733.5291643b@openmailbox.org> <87y4b8nywm.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35182) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPCCY-0000VO-Gq for guix-devel@gnu.org; Fri, 29 Jan 2016 11:47:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aPCCU-0001F0-0D for guix-devel@gnu.org; Fri, 29 Jan 2016 11:47:14 -0500 Received: from smtp1.openmailbox.org ([62.4.1.35]:51923) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPCCT-0001EY-Kp for guix-devel@gnu.org; Fri, 29 Jan 2016 11:47:09 -0500 In-Reply-To: <87y4b8nywm.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Mathieu Lirzin Cc: guix-devel@gnu.org On 2016-01-29 10:17, Mathieu Lirzin wrote: > Eric Bavier writes: > >> On Thu, 28 Jan 2016 18:00:35 +0100 >> Mathieu Lirzin 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