Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753446AbcKUIyA (ORCPT ); Mon, 21 Nov 2016 03:54:00 -0500 Received: from ozlabs.org ([103.22.144.67]:46677 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752180AbcKUIx7 (ORCPT ); Mon, 21 Nov 2016 03:53:59 -0500 From: Michael Ellerman To: "Zhangjian \(Bamvor\)" , shuahkh@osg.samsung.com Cc: linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, khilman@linaro.org, broonie@kernel.org, Bamvor Zhang Jian Subject: Re: [PATCH RFC 1/6] selftests: remove duplicated all and clean target In-Reply-To: <1ffc34d0-0a4c-efd3-ed3d-6073b2ea32ac@huawei.com> References: <1477047694-24122-1-git-send-email-bamvor.zhangjian@huawei.com> <1477047694-24122-2-git-send-email-bamvor.zhangjian@huawei.com> <87mvgxgjuu.fsf@concordia.ellerman.id.au> <1ffc34d0-0a4c-efd3-ed3d-6073b2ea32ac@huawei.com> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Mon, 21 Nov 2016 19:53:54 +1100 Message-ID: <87shqlw6vx.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1547 Lines: 41 "Zhangjian (Bamvor)" writes: > On 2016/11/18 18:31, Michael Ellerman wrote: > >bamvor.zhangjian@huawei.com writes: > >> From: Bamvor Jian Zhang > >> Currently, kselftest use TEST_PROGS, TEST_PROGS_EXTENDED, TEST_FILES to > >> indicate the default test program, extended test program and test files. > >> These lead to duplicated all and clean targets. > >> > >> In order to remove them, introduce TEST_GEN_PROGS, > >> TEST_GEN_PROGS_EXTENDED, TEST_GEN_FILES to indicate the compiled > >> objected. > > > >It's nice to be able to drop the clean rules, but renaming all those > >variables causes a lot of churn. > > > >I think it would be better if we add a new variable, maybe NO_CLEAN, > >which can be used to specify anything in TEST_PROGS/EXTENDED which > >should *not* be cleaned. > > > >And then the default clean rule will just do: > > > >clean: > > $(RM) -fr $(filter-out $(NO_CLEAN),$(TEST_PROGS)) > Maybe I lost somewhere. I add these variable for all and > clean target. They will be used to output the objects to OUTPUT > directory. No you're right, that won't work as I described it. I reviewed this patch first and didn't look at how it was required for patch 6 to work (and the change log doesn't mention that you need it for patch 6 :) > Could you please explain in details how should I do it for > "all" target if I do not introduce TEST_GEN_PROGS, > TEST_GEN_PROGS_EXTENDED and TEST_GEN_FILES? I'll have to think about it a bit more. cheers