From patchwork Mon Apr 16 19:07:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 10343715 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 145DD60216 for ; Mon, 16 Apr 2018 19:08:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F13D32844B for ; Mon, 16 Apr 2018 19:08:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E134F285EE; Mon, 16 Apr 2018 19:08:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 72F1D286BD for ; Mon, 16 Apr 2018 19:08:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751164AbeDPTIA (ORCPT ); Mon, 16 Apr 2018 15:08:00 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:42333 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751146AbeDPTH7 (ORCPT ); Mon, 16 Apr 2018 15:07:59 -0400 Received: by mail-qk0-f193.google.com with SMTP id d193so6357019qke.9 for ; Mon, 16 Apr 2018 12:07:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:user-agent:mime-version; bh=FU75uJ7wtjwonpjVDWiCyanEwEZR5VdmXGnnU+9rgjA=; b=W4YTPjhskfQIHlNug+9bTafhxdg7lSJZ0SUBQGwam8358tgKt8ModQnCG+c+1pMHdx wFhmfVWOHx5pyovqBS5C9lBmVV/7SYaI3/E3SCseBcA7vAc1Fxw5dPFnsq7KV+3A4zRo MyXzI/asV4KPC5HtIP7nXg74Y+E7enSIlw86Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:user-agent :mime-version; bh=FU75uJ7wtjwonpjVDWiCyanEwEZR5VdmXGnnU+9rgjA=; b=g6lV5e+X7uPShxjl1GLqf74vxbLZRME3f3RpVxlGP5y+bpeVQzmX+DC73QwPViKz2b tadn1vlXLTKeuL6NXKEVb4vzqyRdROwd2j53BuadGGgXI3lo1T6UPx/kkCGnBFySExIL UtTtxzy+av1Oyw5Jp8hheR793FpL3vjuPb6f9S0YBfQPTrgdmYdsQlbuz5rZQf9MSH6i u+iQMLY4U3yIXxagdX2c6gh2FNrtuTt8FfgJa5bE721+B2NcZhNfOksxjj2kPUol7muc m1HzwfCyueznPrnCSt4C/mNoVLvO4jn4ncLibOK2dDpRpEC0SLdUWxYQ86Qre3moyYth dmCA== X-Gm-Message-State: ALQs6tAMrI0Gjwy+871K0yBzRRhAM4n59E4excZyzZg1NcIZzsvt+EgK 3YMfGucYXurCUIwjT/Vnwnc3qQ== X-Google-Smtp-Source: AIpwx4+/cm0qxXh+4SCgVQx6SySjYoP6ve8tfIPwSYXNIfKMa8WO5G2ywkuYAB+X95wGSmERxf0RTA== X-Received: by 10.55.77.207 with SMTP id a198mr18443480qkb.241.1523905678984; Mon, 16 Apr 2018 12:07:58 -0700 (PDT) Received: from xanadu.home (modemcable228.104-82-70.mc.videotron.ca. [70.82.104.228]) by smtp.gmail.com with ESMTPSA id z19sm9887573qka.39.2018.04.16.12.07.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Apr 2018 12:07:58 -0700 (PDT) Date: Mon, 16 Apr 2018 15:07:57 -0400 (EDT) From: Nicolas Pitre To: Masahiro Yamada cc: linux-kbuild@vger.kernel.org Subject: [PATCH] fixdep: suppress consecutive / from file paths in dependency list files Message-ID: User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Underscores in symbol names are translated into slashes for path names. Filesystems treat consecutive slashes as if there was only one, so let's do the same in the dependency list for easier grepping, etc. Signed-off-by: Nicolas Pitre --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index f387538c58..850966f3d6 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -115,7 +115,7 @@ static void usage(void) */ static void print_dep(const char *m, int slen, const char *dir) { - int c, i; + int c, prev_c = '/', i; printf(" $(wildcard %s/", dir); for (i = 0; i < slen; i++) { @@ -124,7 +124,9 @@ static void print_dep(const char *m, int slen, const char *dir) c = '/'; else c = tolower(c); - putchar(c); + if (c != '/' || prev_c != '/') + putchar(c); + prev_c = c; } printf(".h) \\\n"); }