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 9B599385840B for ; Fri, 31 May 2024 08:18:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9B599385840B 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 9B599385840B 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=1717143542; cv=none; b=OFgR/I1OzQSIJh/XercgTk41TaRj4iUVMMD5T2mDQ6pLwzYye13DYH1f5sAHIbZyIQa4dLXHckBo8aNYapZwacFRlCO6YyJtNPvfwXD+OZIYnHZ3G/+6aek0s3ipKGlxD0xKX8jPM61F0q432mgeYjBViwas3zYmRRj+nlk1Z1M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717143542; c=relaxed/simple; bh=Q/9UJfPosB7AXwyCJmDQ2yAdJXN4J5quefqPbX/wR3U=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=OZr8ssuEKwtv9dskWi4WaTzUSLu0z5gCg1sLydEKzKGLgw3LcQ83oisaz4bmRv4z51V01x9ANjnjBgC3jOa9XYwDYzt7PPOupqu5LjwwOKUbXAhCkZz9qFhKIcrleNGyehlp/s4/lRTcfK/5ZePdaW9wkM4YY60lRQdE5Wg0yMU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717143535; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tY6cm0bm28NIU8OfivQCTN/OuuGNF0ydWl6PrLKzS3g=; b=Kw0Hj0bVwF7b1neIAEpFjNmRHRrUU9YRI4j3MNgt00Ae8JERHWeLgbdNAKFWMl97ZcBcEt Y6DEWFAgUUx6a+P3fPlLFQdNV/YVl6BzeSvQCWgbOxXCw/HSJRjqHKE3ohCdzkGHniM3fR bJOQKJfX8x72GFugF69HSrpuVDaD9Pc= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-168-Q9fOSP6sOquhBGPOSXOB3Q-1; Fri, 31 May 2024 04:18:54 -0400 X-MC-Unique: Q9fOSP6sOquhBGPOSXOB3Q-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-420fe1575bbso14130085e9.2 for ; Fri, 31 May 2024 01:18:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717143532; x=1717748332; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tY6cm0bm28NIU8OfivQCTN/OuuGNF0ydWl6PrLKzS3g=; b=D7wae2BuYtHuRcH6eGMhMTmFPeY0DNU3j5d+aMlM/aZkZu7+MRQwNmOO/O5ppyhQ94 yOZAvs5TCnyhBZC84x4+ml2rLOlGvoaGXv4B5J6H/Lc/XvGHTDKoTr1QTMhdXW36vQp6 47mESiB0uBKlCWfCpt6xEUUe1bQA2ukMmZJYkuQkDNsQDMwL6oz9kctfox/Mvml9zuVX FwXuH9tatEeS0z9/CwsH4gqsGSUiacnnSrMkiwcEoUhyXQTITrrbz49ZUCpX/C6zZOfC H7mcd6uBiv0xgio2T+KJ6XroELQeg6ZC0cnJGNLuksRxteyW3DQZGDWHemjtJ8dv1JUi lzbA== X-Gm-Message-State: AOJu0Yy10oq4o3EtMq648lMQdUuU/SPS0pj/GJwrLS51X6W+NeMAX275 ATJfqMQyT5kx/X1R7IwGpkisb1zk7QR8w1lKb4Kr8dv7g/Sa81juYGYGKllH0mSThvx/OeW0eEC QsupO7/nwN5kBQ0cmpaHiGlv+v3lyra26zClPSjy8UsLawpjKGf2hsoedE46+7lQytC5DOMtD4n x7xVBOxC7Kc3UWHZnRlg3DgLuOpMKxQY7N+y6DxigyVa8= X-Received: by 2002:a05:600c:34d2:b0:41f:b0e7:f299 with SMTP id 5b1f17b1804b1-4212e049e91mr9331535e9.9.1717143532220; Fri, 31 May 2024 01:18:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHQxeXQ/6EIrchIc9Qtt/qdXH1wxpiFQm/QPj444gPfG1kdBUT9jyYD11BB27ryGyVk3w7TRg== X-Received: by 2002:a05:600c:34d2:b0:41f:b0e7:f299 with SMTP id 5b1f17b1804b1-4212e049e91mr9331335e9.9.1717143531623; Fri, 31 May 2024 01:18:51 -0700 (PDT) Received: from localhost ([2a00:23c7:c696:e701:85a5:8a0c:1403:2dc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4212706a135sm47254135e9.28.2024.05.31.01.18.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 01:18:50 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv2 3/5] gdb/doc: also look in srcdir when running TEXI2POD Date: Fri, 31 May 2024 09:18:40 +0100 Message-Id: X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-12.1 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: In gdb/doc/Makefile.in the TEXI2POD variable is used to invoke texi2pod.pl, which process the .texinfo files. This also handles the 'include' directives within the .texinfo files. Like the texi2dvi and texi2pdf tools, texi2pod.pl handles the -I flag to add search directories for resolving 'include' directives within .texinfo files. When GDB runs TEXI2POD we include gdb-cfg.texi, which then includes GDBvn.texi. When building from a git checkout the gdb-cfg.texi files and GDBvn.texi files will be created in the build directory, which is where texi2pod.pl is invoked, so the files will be found just fine. However, for a GDB release we ship gdb-cfg.texi and GDBvn.texi in the source tree, along with the generated manual (.1 and .5) files. So when building a release, what normally happens is that we spot that the .1 and .5 man files are up to date, and don't run the recipe to regenerate these files. However, if we deliberately touch the *.texinfo files in a release source tree, and then try to rebuild the man files, we'll get an error like this: make: Entering directory '/tmp/release-build/build/gdb/doc' TEXI2POD gdb.1 cannot find GDBvn.texi at ../../../gdb-16.0.50.20240529/gdb/doc/../../etc/texi2pod.pl line 251, line 16. make: *** [Makefile:664: gdb.1] Error 2 make: Leaving directory '/tmp/release-build/build/gdb/doc' The problem is that texi2pod.pl doesn't know to look in the source tree for the GDBvn.texi file. If we compare this to the recipe for creating (for example) gdb.dvi, which uses texi2dvi, this recipe adds '-I $(srcdir)' to the texi2dvi command line, which allows texi2dvi to find GDBvn.texi in the source tree. In this commit I add a similar -I option to the texi2pod.pl command line. After this, given a GDB release, it is possible to edit (or just touch) the gdb.texinfo file and rebuild the man pages, the GDBvn.texi will be picked up from the source tree. If however a dependency for GDBvn.texi is changed in a release tree then GDBvn.texi will be regenerated into the build directory and this will be picked up in preference to the GDBvn.texi in the source tree, just as you would want. --- gdb/doc/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in index e5f8a11008e..e5304404ba8 100644 --- a/gdb/doc/Makefile.in +++ b/gdb/doc/Makefile.in @@ -176,7 +176,7 @@ ANNOTATE_DOC_FILES = \ MANCONF = -Dman TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl \ - $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS) + $(MAKEINFOFLAGS) $(MAKEINFO_EXTRA_FLAGS) -I $(srcdir) # Shell snippet which will provide the full filename of the # version.subst file to use. If there is a copy in the build -- 2.25.4