From patchwork Fri Mar 6 11:09:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 184255 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp7295204ile; Fri, 6 Mar 2020 03:12:11 -0800 (PST) X-Google-Smtp-Source: ADFU+vvQ5nq1Zg4JOycsUBjU8kAavuSxdwZd1FaTRFgrOp4yHS2GcGL0U/HExITvQd30+cRm44A+ X-Received: by 2002:ac8:60ce:: with SMTP id i14mr2217741qtm.212.1583493131143; Fri, 06 Mar 2020 03:12:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583493131; cv=none; d=google.com; s=arc-20160816; b=jPrOzLdo3UWb2EK22zODlKNKQVLHr40PtBrSidGqpksNx32cBaxO7wSI9Fv9w1UQB1 I+nvrH5eLzlVZ43FRHo1QSI/1RQ9ZjCOMFi6bu/4uEbeRRGY0ptdGZzyvxqLurLy1mld nArYEtJcZVdQfTS+AuF9d1NdNtYzw9Or3x1xuGd4V3iHP18n5bgtRM7ntMg1St/PDUh9 +yGM9R/n0m706axXs8gR6ESsaz6uX1pC4gF6K1olXNqLEkp6v7TZQLHNifTNV2zyly93 UhHVULwBWO4DUsnnoRgSTj5Wr8io8LRCddxhECNEAqCQKq0p9HRHoqPBLWj9BkEsq19F jhpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=AaYzuDEpKUEZmukyHkMDOESReHv5q9LdwP18n+bqCHQ=; b=yBzh7IKHtEhzY5YrquhG3zZY3rWjcb6c/EvnQYjMxeAcb8DL5Q9di9XdTyMMhlCkgi AJ/KWST8fu5GOF5LJIX2mStQ7BfJXol4Zk9t18AGgMI0PFziB5uIYxgXqyA7Ih3aU2sZ xubC7VmBc+V3vBgK0z3ANp147AovVU7g5g3mvVUaFRHESICz541CKPYiBqiTQ7YRGHJ9 1UqqUp1PWg9jjSZzJ8iI6c5BCFuS4LPkFOgRa35qEnYOscRTLhwJ1VHmkuEpij9dcRED FfaCVQkVaMLgTdxBps6zOtiOP17EcZzbAp9UO9Ln+//zcxteByKFuizJ/YBVuXPc69OQ pAyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CbCyKgUR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k9si835343qvp.81.2020.03.06.03.12.10 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Mar 2020 03:12:11 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CbCyKgUR; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAAtm-0006jN-EY for patch@linaro.org; Fri, 06 Mar 2020 06:12:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38750) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAAro-00032S-Ku for qemu-devel@nongnu.org; Fri, 06 Mar 2020 06:10:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jAArn-0004Dp-7V for qemu-devel@nongnu.org; Fri, 06 Mar 2020 06:10:08 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:44360) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jAArn-0004Bl-0z for qemu-devel@nongnu.org; Fri, 06 Mar 2020 06:10:07 -0500 Received: by mail-wr1-x434.google.com with SMTP id n7so1838111wrt.11 for ; Fri, 06 Mar 2020 03:10:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=AaYzuDEpKUEZmukyHkMDOESReHv5q9LdwP18n+bqCHQ=; b=CbCyKgUR1/ptLLNcXP+rpR1j/LiJnJfQyw5/VwmJJqKVTqETgi2CZ5VmzkrfSqOJal 3hrr5LdqBbCkgLm6i4Gwhf8yaSFdTYppsCxpR1dToMZsMEieIEtkhp3gyP3gKGQdIVqD 4gNqmzXSrpah+yHHB8TMmPye9UrhQ1QwhdsLDMAs/80Eh+fjhnutTk9Qmuqt873OMo0A K+Phn0ZqvsM3CwSz0pbWPrXaFU545JYitznyF6KYgUnlkXeHUBfvp8EzXzNbd5KVZO4C aXuyYfFbYuCVknafQoIVTyJHuMIj/wJHRb2V7hcubVRyHSwIly0FHuOnUnv/qfQAB3i8 11Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AaYzuDEpKUEZmukyHkMDOESReHv5q9LdwP18n+bqCHQ=; b=BevuuhMGBa5iVDt6X6AgVYtvr0yEw8MSIY2P94o0WQ4JEYRqFR5A3wYAo01iSvmagm x+JNwSMbOgeJTAH0PKS8xbZt1WUWHi32wjg9zReFmst5vIA0FB+6zPvl6K2lyCqxfwV/ aIKsbdgsW0cLRQUsvPQgmAnd+2MJwjjSsJbhGGVdvk5ud3n8EfBcNr1zz/L+EWz8LeLo bRPQO42XFN1oLUak7nZCd2AwlvgEmlZs+aGkr+hwckc3qgUmtxyTRy1Tq3SSe+q1cy0s F+HqJ2PXPhL57zekxR9BAEJkRdooT2AZ4bymasPY7zTioy2vN5hVhS4xHKFK1unwnb4I vbrg== X-Gm-Message-State: ANhLgQ0qrlc3JLei43zMeKrBaD9BAC34GGDJzTULR7GVfvEgACfjrqBx LBreWJXymjSPbBrBrlac/L8zWDT9VvFLGQ== X-Received: by 2002:adf:a512:: with SMTP id i18mr3567233wrb.61.1583493005680; Fri, 06 Mar 2020 03:10:05 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id y10sm12553029wma.26.2020.03.06.03.10.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Mar 2020 03:10:05 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 03/33] texi2pod: parse @include directives outside "@c man" blocks Date: Fri, 6 Mar 2020 11:09:29 +0000 Message-Id: <20200306110959.29461-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200306110959.29461-1-peter.maydell@linaro.org> References: <20200306110959.29461-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::434 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Paolo Bonzini This enables splitting the huge qemu-doc.texi file and keeping parallel Texinfo and rST versions of the documentation. texi2pod is not going to live much longer and hardly anyone cares about its upstream status, so the temporary fork should be acceptable. Signed-off-by: Paolo Bonzini Reviewed-by: Peter Maydell Reviewed-by: Alex Bennée Tested-by: Alex Bennée Signed-off-by: Peter Maydell Message-id: 20200228153619.9906-4-peter.maydell@linaro.org Message-id: 20200226113034.6741-4-pbonzini@redhat.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- scripts/texi2pod.pl | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) -- 2.20.1 diff --git a/scripts/texi2pod.pl b/scripts/texi2pod.pl index 839b7917cf7..8bfc6f6f4c4 100755 --- a/scripts/texi2pod.pl +++ b/scripts/texi2pod.pl @@ -143,6 +143,24 @@ while(<$inf>) { next; }; + # Single line command handlers. + + /^\@include\s+(.+)$/ and do { + push @instack, $inf; + $inf = gensym(); + $file = postprocess($1); + + # Try cwd and $ibase, then explicit -I paths. + $done = 0; + foreach $path ("", $ibase, @ipath) { + $mypath = $file; + $mypath = $path . "/" . $mypath if ($path ne ""); + open($inf, "<" . $mypath) and ($done = 1, last); + } + die "cannot find $file" if !$done; + next; + }; + next unless $output; # Discard comments. (Can't do it above, because then we'd never see @@ -242,24 +260,6 @@ while(<$inf>) { s/>/>/g; } - # Single line command handlers. - - /^\@include\s+(.+)$/ and do { - push @instack, $inf; - $inf = gensym(); - $file = postprocess($1); - - # Try cwd and $ibase, then explicit -I paths. - $done = 0; - foreach $path ("", $ibase, @ipath) { - $mypath = $file; - $mypath = $path . "/" . $mypath if ($path ne ""); - open($inf, "<" . $mypath) and ($done = 1, last); - } - die "cannot find $file" if !$done; - next; - }; - /^\@(?:section|unnumbered|unnumberedsec|center)\s+(.+)$/ and $_ = "\n=head2 $1\n"; /^\@subsection\s+(.+)$/