Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2216215ybc; Sun, 17 Nov 2019 16:20:39 -0800 (PST) X-Google-Smtp-Source: APXvYqyXKvKDwIso9hnXkGn9NZG9GzUNQ0Zl+Tvw7XA7xTLEeiyFRkeFIsChBhQhop8wOQvGcLhW X-Received: by 2002:a17:906:1da1:: with SMTP id u1mr22615558ejh.275.1574036439006; Sun, 17 Nov 2019 16:20:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574036438; cv=none; d=google.com; s=arc-20160816; b=ytP8wnOicMDqRPbjDmCgirdtt2hTqzOY6WVrnr3dxLII8ORJfMuDs3QSUzYVSBWN+5 TGKSqmArEPW4cWKXUhs9WeUbJ6X8HoxBCFBlA2uiyQEV+0Gtx23Jji1SKCqYo5wdahgZ HUonWTnDiNZQjlF9IMmKrzMltFbYiDG+S/ChOtESmo997LF6+MdWOFqYz2XY7hQ83Bm2 zzJYBSimyImMvG6WJpZcJZk+iUEB0wFfCT0DcpkkO11uDGsR/8f25xQMM3VnRUknGp4p Z0llbkFe/YUENYfZOPH1Ku4w3tgmS3VVgrSYPNZC+njGaFdzK9r7lpMNF+JnHRI6OIOo S5zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=2fdS7kMfmR6oyNZKoCSS091Xe4zADe96xKwvxeaKDak=; b=C+aF+WVTsDBiInflyG1qqWBEQAVek6+WSltP7PjBMPvbjbrjY3Cs0Ro35LAE3EPYc7 gZs+mLmIjlUoSlsX9I0jWoQ9i35XgLWjMgwSHN9ErldoS/mRvtPX1MbnqKAHykICIMFa mK2IOIBI39K0UoUB6GiR08VfWhXG1fQ4qrjSHtiZfn7wpipS9LE1V0QrrKq3RIRozUek IVRxb+4zwuqbFh1A6S0zF4LHElR2g7HOCv9/5BMY6zhTSdJBCotpi7cQqIay/3mASp/b RW4DoylqyFkthiF7Ax/yHw+gMp3+9DPh7raB3er5M2qoeSPJeUkU8pJV7/7LwWuBck6A SHKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=fY4VifiO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id be7si10331729edb.438.2019.11.17.16.20.05; Sun, 17 Nov 2019 16:20:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=fY4VifiO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726322AbfKRAP7 (ORCPT + 99 others); Sun, 17 Nov 2019 19:15:59 -0500 Received: from conssluserg-02.nifty.com ([210.131.2.81]:47071 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726284AbfKRAP6 (ORCPT ); Sun, 17 Nov 2019 19:15:58 -0500 Received: from mail-vk1-f173.google.com (mail-vk1-f173.google.com [209.85.221.173]) (authenticated) by conssluserg-02.nifty.com with ESMTP id xAI0Fot3021357; Mon, 18 Nov 2019 09:15:51 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com xAI0Fot3021357 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1574036151; bh=2fdS7kMfmR6oyNZKoCSS091Xe4zADe96xKwvxeaKDak=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=fY4VifiOns06P1Ey+PAugS+QTyjD1WTe+KjIbURzNMtI5bOh6fCR1QcHycIB33zdH rDzqHZTdvXKFWA0zcPqXsbv4/M5qKSRL+6qZ9DbMxc0XbFnJJeifpamKtL8obJxD1M WtLjccZ4l/esCrIDVpAU6BUo9Tu2JxC4fFadxPZIWzpK5PhXFXLiEYA+OjOGagG5N5 749VDAr8F2TaOrkjc5xovvMQJsZIoVftfo1J8L6QhQsUiJw+DTULQPrV6fdYBvgoSO 4oVoQmrBubpNSfFX2SVR9WHdFrAoKIQ9ZgDRxJDhnjcmwqeLYlAdjKsGQ9TXlfNjx1 YCN7rHRtpxHmQ== X-Nifty-SrcIP: [209.85.221.173] Received: by mail-vk1-f173.google.com with SMTP id k24so3671303vko.7; Sun, 17 Nov 2019 16:15:51 -0800 (PST) X-Gm-Message-State: APjAAAWR+nWVz29whKOxn/ZIAh34v+ZdkU4fAfHnK49Yhjf+a92Q9ExR JcCs8fOqTJnw0NZnBq2nGwzH6R+ojBpbQ1JJIGg= X-Received: by 2002:ac5:cc43:: with SMTP id l3mr6251229vkm.96.1574036150024; Sun, 17 Nov 2019 16:15:50 -0800 (PST) MIME-Version: 1.0 References: <20190528121148.GA18162@lst.de> In-Reply-To: From: Masahiro Yamada Date: Mon, 18 Nov 2019 09:15:13 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: building individual files in subdirectories To: Christoph Hellwig , Jens Axboe Cc: Linux Kbuild mailing list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jens, (related to https://lkml.org/lkml/2019/11/15/1152) I received questions about single builds not working properly some times in the past. For example, the following is a post from Christoph to kbuild ML, and my reply to it. On Wed, May 29, 2019 at 10:12 AM Masahiro Yamada wrote: > > On Tue, May 28, 2019 at 9:12 PM Christoph Hellwig wrote: > > > > A few kernel modules have source files in multiple subdirectories. > > Trying to build just a single object of a source file in such a > > subdirectory currently doesn't work. > > > > For example: > > > > hch@brick:~/work/xfs$ make fs/xfs/libxfs/xfs_alloc.o > > CALL scripts/checksyscalls.sh > > CALL scripts/atomic/check-atomics.sh > > DESCEND objtool > > scripts/Makefile.build:42: fs/xfs/libxfs/Makefile: No such file or directory > > make[1]: *** No rule to make target 'fs/xfs/libxfs/Makefile'. Stop. > > make: *** [Makefile:1747: fs/xfs/libxfs/xfs_alloc.o] Error 2 > > > > Is there any reasonably easy way to get this to work? > > > While single targets are useful, > they never work correctly. > subdir-ccflags-y from upper Makefiles > are not inherited. > > I want to implement single targets correctly, but > I have never got around to it. > > "make fs/xfs/" is an alternative solution > although it will compile much more than you want. > > Another solution is to put a dummy > fs/xfs/libxfs/Makefile > > -- > Best Regards > Masahiro Yamada -- Best Regards Masahiro Yamada