From patchwork Mon Sep 28 00:09:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Hutchings X-Patchwork-Id: 7274901 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 788B19F32B for ; Mon, 28 Sep 2015 00:09:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BD295207C7 for ; Mon, 28 Sep 2015 00:09:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 03083207C6 for ; Mon, 28 Sep 2015 00:09:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753534AbbI1AJR (ORCPT ); Sun, 27 Sep 2015 20:09:17 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:36172 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753398AbbI1AJQ (ORCPT ); Sun, 27 Sep 2015 20:09:16 -0400 Received: from deadeye.wl.decadent.org.uk ([192.168.4.247] helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84) (envelope-from ) id 1ZgM0C-0002sc-1a; Mon, 28 Sep 2015 01:09:08 +0100 Received: from ben by deadeye with local (Exim 4.86) (envelope-from ) id 1ZgM06-0000EG-TN; Mon, 28 Sep 2015 01:09:02 +0100 Message-ID: <1443398942.2517.12.camel@decadent.org.uk> Subject: [PATCH v2 1/2] Documentation: Avoid creating man pages in source tree From: Ben Hutchings To: Jonathan Corbet Cc: =?ISO-8859-1?Q?J=E9r=E9my?= Bobbio , reproducible-builds@lists.alioth.debian.org, linux-doc@vger.kernel.org, Randy Dunlap , Michal Marek , linux-kbuild Date: Mon, 28 Sep 2015 01:09:02 +0100 In-Reply-To: <1443398870.2517.11.camel@decadent.org.uk> References: <1443398870.2517.11.camel@decadent.org.uk> X-Mailer: Evolution 3.16.5-1 Mime-Version: 1.0 X-SA-Exim-Connect-IP: 192.168.4.247 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently kernel-doc generates a dummy DocBook file when asked to convert a C source file with no structured comments. For an out-of-tree build (objtree != srctree), the title of the output file is the absolute path name of the C source file, which later results in a manual page being created alongside the C source file. Change the title to be a relative path. Signed-off-by: Ben Hutchings --- scripts/kernel-doc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 9a08fb5..8c47afa 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -2391,12 +2391,13 @@ sub process_file($) { my $descr; my $in_purpose = 0; my $initial_section_counter = $section_counter; + my ($orig_file) = @_; if (defined($ENV{'SRCTREE'})) { - $file = "$ENV{'SRCTREE'}" . "/" . "@_"; + $file = "$ENV{'SRCTREE'}" . "/" . $orig_file; } else { - $file = "@_"; + $file = $orig_file; } if (defined($source_map{$file})) { $file = $source_map{$file}; @@ -2640,7 +2641,7 @@ sub process_file($) { print "\n"; print " \n"; print " \n"; - print " ${file}\n"; + print " ${orig_file}\n"; print " \n"; print " \n"; print " Document generation inconsistency\n"; @@ -2654,7 +2655,7 @@ sub process_file($) { print " \n"; print " The template for this document tried to insert\n"; print " the structured comment from the file\n"; - print " ${file} at this point,\n"; + print " ${orig_file} at this point,\n"; print " but none was found.\n"; print " This dummy section is inserted to allow\n"; print " generation to continue.\n";