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 9A38B39AF0D8 for ; Thu, 6 Jun 2024 17:50:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9A38B39AF0D8 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 9A38B39AF0D8 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=1717696219; cv=none; b=bIkJf1S6MC1sLfOpCo+bSaNg73+7F9ZuwuRLl4hUF3JZhD8YVw4GKkfmZ5iXY7mFG3O1hv0TjneNC5x5cD8cZ7gIU10eQfQZapcGCgbT8U2IQEcsjKOp47mnntnqrof8FRuLdufvPjaqo7MtWE9oPe2rSamqw7PEwnE19ozlp2o= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1717696219; c=relaxed/simple; bh=V5jAVPJsigRv2xPtrm2EnbEGKLM6L+e6wCAa/20pOnc=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=mdSh823T+XCyHaCv9D3TO0iZo8dEe0NAQUi1QLVLOwGE2w5E1ZEsLmZHyPH9y/Gbz93fDNp1/AH0x/2Y8//OcK5dnwg4VEioe+cKEJekNzrOACkzZZdO4bDTXwAVyVJxOe6BmfSECaXt9x73o5oe2sFqKDQrPn2++oHDFRK81KQ= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717696215; 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=C1tB+afWIDmJhaZO5PH3w1JBmxJPqka54+CUhxNy6UM=; b=ceVyDuy9TBhDhZ/wv4Gh2pMJqukTCBPLuXg7F1zvWCUdogmtJBPEdEBFC6mqlXEqdScb+V d0ByNBfWowSfta5Awy3SAaol+z9+cf94U0bX0ZfEite62qSDYOH2KYXeeYwUUFikASSota s5J8psXFR+GitJqviBP/C9FzgKwRoN4= Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com [209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-30-1yTblLWhNC21lLip2S2L8Q-1; Thu, 06 Jun 2024 13:50:13 -0400 X-MC-Unique: 1yTblLWhNC21lLip2S2L8Q-1 Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-57a460247f3so747492a12.3 for ; Thu, 06 Jun 2024 10:50:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717696210; x=1718301010; 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=C1tB+afWIDmJhaZO5PH3w1JBmxJPqka54+CUhxNy6UM=; b=SXVSUNmQLwsvlBVLFNoZ6iKgerZ6eANXgZBMBuPZ1uQZKdUb9mjaqNddnaMGknb5hI 0Tk+kG5frHZdrSWb+Gb9+nTXMXMTSCcDs22mEuAfp0LV45dthi24XqH0ZfL91/lcEqME /hXhjVCHH2xiK1GaFIycr/fcGr6rVUSXlVdwbgEr05QqhlJNv1grEDLdRlpazUmZGAGJ zXK9eYkphld1L8xrzq0z6ZIbCGP6EuX2OfkOjDMLH/nFy8f9FgUIHTRBzy1oclvuOFaQ wz+ej11bd8HKcnIMqv3XXS5IHfykL6YhwnQcUMB+kw2BgKqPVALfWIURVskvwwFguGk5 3RfQ== X-Gm-Message-State: AOJu0YyOF7g9rSw0xMZo3GzzT4EsgITjknC7h+eRd2GkXiRq/8AtQJlG Oi3zCCoHlpj+IVjWK2akpBXMrbRy84GHIrxfSxCHGsIjaoZlmsiOLpcMDYMkF52vggKK7wFQVf/ pLDl1IEqHhSQodDo2NOGgJgMVXB8VJNChSlED/UPMzHGtYVPpA9ZamqcFWEKT2ksPoMiG6IGLtI cEowJbrjEFhMwThC7itLMhDCTM11p+GFfavyPyxGdMG0U= X-Received: by 2002:a50:a6dc:0:b0:578:649c:9e3d with SMTP id 4fb4d7f45d1cf-57c508665d8mr71633a12.9.1717696210080; Thu, 06 Jun 2024 10:50:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHfHfZNtMgPwuHlHbAD+5wMkfKzbNaBkWw7ygqV1DHC3QeQOnR/VT3pycs1/RsLAZbFrgoUYg== X-Received: by 2002:a50:a6dc:0:b0:578:649c:9e3d with SMTP id 4fb4d7f45d1cf-57c508665d8mr71619a12.9.1717696209649; Thu, 06 Jun 2024 10:50:09 -0700 (PDT) Received: from localhost (92.40.184.206.threembb.co.uk. [92.40.184.206]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-57aae20234csm1406989a12.65.2024.06.06.10.50.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 10:50:09 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCHv3 4/6] gdb/doc: also look in srcdir when running TEXI2POD Date: Thu, 6 Jun 2024 18:49:56 +0100 Message-Id: <6ffc9bcbb47ea2022d06e388f2ff3682d1e610ad.1717696065.git.aburgess@redhat.com> 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.0 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 eb800bf3848..7b7b85dae10 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) POD2MAN = pod2man --center="GNU Development Tools" -- 2.25.4