From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 08E213858D28 for ; Sun, 26 May 2024 22:58:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 08E213858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 08E213858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716764323; cv=none; b=o2LfvvLQq7+Y70TJM1RGcJsJgIxR28qMAimRJ4p23QhyShpFkHHLl/EIZvy+eOQdvUbxTsQ48Dc9nFMprVXJXzsLCsiPF8WC0FarDqCDxPRSw85ev2p5s6pe+yXw1EFZ4DWV6yS3MODRYPIitbarUUq5LU6zTmTkY+Ui3H2uyc0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1716764323; c=relaxed/simple; bh=HMRCgziI1jvnjMZxnt8DspJaha5qpxtaafsNfStqyiA=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=gNLNWeu/KWxP+4MAD/K+ec+U1nREMfRzji3ECdDxDpQPOw14J1l+ogCQbqql6vhowySawIzIo4xcohwlREj6NJx6Iloc3n+WOaJHoIbeWDxfkzfIEV4DyhuZ/BCAmTqf01Khn4ve46sSN7D5P4pxnkYTf1IwpWacivD0PNL4yuk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1716764321; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=VvfBDpEbKl6XoxDvdnba9GViU+AQolGXhk8+R6mz+5E=; b=ZNt11JkUV7+BlhGcchTJs8hXLQuBsB8Ct5SDn7IfT+W88wkstRSpbRNvTCRnCy751pC6Zd qKh2oBMnjJBY0W/JLxJIZ99tZStN9ZOuVUIJuaF6YrJuk6mgCi8Pz56idkMkxEZGr9Eqxi GRzc4RrdQeFSf48800HLXP+FpluT5Nk= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-456-mKvB4T-YOU-L4iF7QugPRA-1; Sun, 26 May 2024 18:58:40 -0400 X-MC-Unique: mKvB4T-YOU-L4iF7QugPRA-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-357bcbedd25so812571f8f.2 for ; Sun, 26 May 2024 15:58:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716764318; x=1717369118; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VvfBDpEbKl6XoxDvdnba9GViU+AQolGXhk8+R6mz+5E=; b=vUj8V/TTxrzZwEeVRoMD/whmqNNxYlL4J1Apl49o706zs+kfz8NCW7MZuYLz9pdUXi 8lve/jAzVVePDETwLhzbbZiEs/U7W5V5z36chmyEI9rs5JLlG6nUTeN5A5NgBI2Qj9iw RsjIsFlH2Xm5F79f3g2zGOPYnhtqFpcZPFug2OVNZgm1EY/o4cwABQeHy89Co+Kace8q m+o8Wu9oG8zTUFf6Aak/egc/Op8z08bv7rqh14pA/mg7H00SnMUOlZTXAq88DngxaRi8 GRuAm7tVz525/GVAe5X478CmdhL/RCOhGPYuiQRBmZN5iX4ViWLVVsBsOkFPYugXUmNj BIug== X-Forwarded-Encrypted: i=1; AJvYcCXhYZUflHtA/PN7ZIA5QsfU+XzghFROaICdXn4Ogsx4DBGU6IaPqYQGCBfzD/MYnTAfsTZP3jZhg/CgRi3mDZT+6yEwfw9Y1Dp3ow== X-Gm-Message-State: AOJu0YxKH/OtDS4kAbiGPd1mdr5eAZ5xA2QgwfKUhFQmJE7hKH87SaGn ndiR0P3Ls9wsC1X26chWEcLgD1a6+V/tgtGEXjpel81UYcrdwmpfAkgVb+9bIBZZFzXCNGar7iR jjLqMgJCk90fy27tPMl9ARK0zSkKKy4Yjcshj2kqoSJKvZBeGHSkpVqAQ0LHTXz87pjI= X-Received: by 2002:a05:6000:1545:b0:357:bd78:4960 with SMTP id ffacd0b85a97d-357bd784a9cmr3137931f8f.25.1716764317960; Sun, 26 May 2024 15:58:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHnr/DzxNmGSZymNOK61R1qwGDO9Au5uwFAYoLBOpIplpH2t8tO68WFpsJrL0K68GnXc96DbQ== X-Received: by 2002:a05:6000:1545:b0:357:bd78:4960 with SMTP id ffacd0b85a97d-357bd784a9cmr3137919f8f.25.1716764317410; Sun, 26 May 2024 15:58:37 -0700 (PDT) Received: from localhost (host86-153-169-45.range86-153.btcentralplus.com. [86.153.169.45]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3587724c6f4sm2371721f8f.28.2024.05.26.15.58.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 15:58:37 -0700 (PDT) From: Andrew Burgess To: Joel Brobecker Cc: Simon Marchi , Eli Zaretskii , gdb-patches@sourceware.org, Joel Brobecker Subject: Re: [PATCH] gdb/doc: use silent-rules.mk in the Makefile In-Reply-To: <8734q4b5an.fsf@redhat.com> References: <868r1isaad.fsf@gnu.org> <87frvq43gj.fsf@redhat.com> <86wmp1rbi7.fsf@gnu.org> <874jc2ivcb.fsf@redhat.com> <81120371-21de-45ab-8ea7-bd8146a7f7a3@simark.ca> <87v84hhhou.fsf@redhat.com> <87sezlheyb.fsf@redhat.com> <87jzkvhfh3.fsf@redhat.com> <87jzk4ryc3.fsf@redhat.com> <8734q4b5an.fsf@redhat.com> Date: Sun, 26 May 2024 23:58:35 +0100 Message-ID: <87zfsc9o4k.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: First, massive apologies for blocking the release! I think the patch below should fix this issue. I've tried to explain myself in the commit message, so I'll not repeat it again here. I'm not actually at work for the next couple of days. I'll try to check for feedback on this each evening so I can respond to feedback and/or merge this, but apologies if I'm a little slow in replying. If the feedback is positive and someone wants to merge this, feel free. Anyway, let me know what you think. Thanks, Andrew --- commit bd4ee411ce843be8c32c660b1d1f56ff7f275286 Author: Andrew Burgess Date: Sun May 26 23:30:37 2024 +0100 gdb/doc: don't have .pod targets separate to man page targets While preparing the new release it was discovered that commit: commit 824083f34c222aa7419e2ea58e82d6f230d5f531 Date: Fri Apr 12 17:47:20 2024 +0100 gdb/doc: use silent-rules.mk in the Makefile was causing problems. Given a release tar file, an attempt to build and install GDB would give an error like this: [...] TEXI2POD gdb.pod cannot find GDBvn.texi at ../../../gdb-15.0.50.20240508/gdb/doc/../../etc/texi2pod.pl line 251, line 16. make[5]: *** [Makefile:663: gdb.pod] Error 2 The problem here is how the man pages are built, and how they are distributed within a release. Within the development (git) tree, the man page files are not part of the source tree, these files are built as needed. Within a release tar file though, the man pages are included. The idea being that a user can build and install GDB, including getting the man pages, without having to install the tools needed to generate the man pages. The man pages are generated in a two step process. First the .texi file is processed with texi2pod to create a .pod file, then this .pod file is processed to create the .1 or .5 man file. Prior to the above commit these two steps were combined into a single recipe, this meant that when a user performed a build/install from a release tree all of the dependencies, as well as the final result, were all present in the source tree, and so nothing needed to be rebuilt. However, the above commit split the two steps apart. Now we had a separate rule for building the .pod files, and the .1/.5 man page files depended on the relevant .pod file. As the .pod files are not shipped in a GDB release, this meant that one of the dependencies of the man page files was now missing. As a result if a user tried to install from a release tree a rebuild of the .pod files would be attempted, and if that succeeded then building the man pages would follow that. Unfortunately, building the .pod files would fail as the GDBvn.texi file, though present in the source tree, was not present in the build tree, which is where it is needed for the .pod file generation to work. To fix this, I propose merging the .pod creation and the .1/.5 man page creation back into a single recipe. Having these two steps split is probably the "cleaner" solution, but makes it harder for us to achieve our goal of shipping the prebuilt man page files. I've added a comment explaining what's going on (such a comment would have prevented this mistake having been made in the first place). One possibly weird thing here is that I have left both an ECHO_TEXI2POD and a ECHO_TEXI2MAN in the rule $(MAN1S) and $(MAN5S) recipes. This is 100% not going to break anything, these just print two different progress messages while executing the recipes, but I'm not sure if this is considered poor style or not. Maybe we're only supposed to have a single ECHO_* per recipe? Anyway, even if this is poor style, I figure it really is just a style thing. We can tweak this later as needed. Otherwise, this commit should fix the current issue blocking the next GDB release. diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in index 3f3fe7b7ed9..6a112b98d0e 100644 --- a/gdb/doc/Makefile.in +++ b/gdb/doc/Makefile.in @@ -658,17 +658,30 @@ annotate/index.html: $(ANNOTATE_DOC_FILES) -I $(srcdir) \ $(srcdir)/annotate.texinfo -# Man pages -%.pod : gdb.texinfo $(GDB_DOC_FILES) - $(ECHO_TEXI2POD) $(TEXI2POD) $(MANCONF) -D$* < $(srcdir)/gdb.texinfo > $@ - -$(MAN1S) : %.1 : %.pod $(GDB_DOC_FILES) +# Man pages. The TEXI2POD and TEXI2MAN steps are performed within a +# single recipe to support how we distribute GDB releases. A release +# includes the .1 and .5 man pages in the source tree, but not the +# .pod files. +# +# When building and installing a release of GDB it should not be +# necessary to rebuild the .1 or .5 man page files, nor should it be +# necessary to rebuild the .pod files. +# +# If we split the .pod creation from the creation of the .1 and .5 +# pages, then the .pod files must become a dependency, this will +# trigger an attempt to rebuild these files while building and +# installing a release of GDB, which is something we don't want. +$(MAN1S) : %.1 : $(GDB_DOC_FILES) + $(ECHO_TEXI2POD) $(TEXI2POD) $(MANCONF) -D$* < $(srcdir)/gdb.texinfo > $*.pod $(ECHO_TEXI2MAN) ($(POD2MAN1) $*.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) + $(SILENCE) rm -f $*.pod -$(MAN5S) : %.5 : %.pod $(GDB_DOC_FILES) +$(MAN5S) : %.5 : $(GDB_DOC_FILES) + $(ECHO_TEXI2POD) $(TEXI2POD) $(MANCONF) -D$* < $(srcdir)/gdb.texinfo > $*.pod $(ECHO_TEXI2MAN) ($(POD2MAN1) $*.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) + $(SILENCE) rm -f $*.pod force: